Skip to content

Commit

Permalink
fix(tests): rm old KUBERNETES_CONTEXT check to run full test suite
Browse files Browse the repository at this point in the history
  • Loading branch information
metral committed May 6, 2020
1 parent 6f9c014 commit d5dde74
Show file tree
Hide file tree
Showing 21 changed files with 0 additions and 211 deletions.
8 changes: 0 additions & 8 deletions tests/examples/examples_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -243,13 +243,6 @@ func skipIfShort(t *testing.T) {
}
}

func checkKubeCtx(t *testing.T) {
env := os.Getenv("KUBERNETES_CONTEXT")
if env == "" {
t.Skipf("Skipping test due to missing KUBERNETES_CONTEXT environment variable")
}
}

func getCwd(t *testing.T) string {
cwd, err := os.Getwd()
if err != nil {
Expand All @@ -260,7 +253,6 @@ func getCwd(t *testing.T) string {
}

func getBaseOptions(t *testing.T) integration.ProgramTestOptions {
checkKubeCtx(t)
return integration.ProgramTestOptions{
Dependencies: []string{
"@pulumi/kubernetes",
Expand Down
30 changes: 0 additions & 30 deletions tests/examples/python/python_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,6 @@ var baseOptions = &integration.ProgramTestOptions{
}

func TestSmoke(t *testing.T) {
kubectx := os.Getenv("KUBERNETES_CONTEXT")
if kubectx == "" {
t.Skipf("Skipping test due to missing KUBERNETES_CONTEXT variable")
}

cwd, err := os.Getwd()
if !assert.NoError(t, err) {
t.FailNow()
Expand All @@ -54,11 +49,6 @@ func TestSmoke(t *testing.T) {

// Smoke test for .get support.
func TestGet(t *testing.T) {
kubectx := os.Getenv("KUBERNETES_CONTEXT")
if kubectx == "" {
t.Skipf("Skipping test due to missing KUBERNETES_CONTEXT variable")
}

cwd, err := os.Getwd()
if !assert.NoError(t, err) {
t.FailNow()
Expand All @@ -71,11 +61,6 @@ func TestGet(t *testing.T) {
}

func TestYaml(t *testing.T) {
kubectx := os.Getenv("KUBERNETES_CONTEXT")
if kubectx == "" {
t.Skipf("Skipping test due to missing KUBERNETES_CONTEXT variable")
}

cwd, err := os.Getwd()
if !assert.NoError(t, err) {
t.FailNow()
Expand Down Expand Up @@ -183,11 +168,6 @@ func TestYaml(t *testing.T) {
}

func TestGuestbook(t *testing.T) {
kubectx := os.Getenv("KUBERNETES_CONTEXT")
if kubectx == "" {
t.Skipf("Skipping test due to missing KUBERNETES_CONTEXT variable")
}

cwd, err := os.Getwd()
if !assert.NoError(t, err) {
t.FailNow()
Expand Down Expand Up @@ -280,11 +260,6 @@ func TestGuestbook(t *testing.T) {

// Smoke test for first-class Kubernetes providers.
func TestProvider(t *testing.T) {
kubectx := os.Getenv("KUBERNETES_CONTEXT")
if kubectx == "" {
t.Skipf("Skipping test due to missing KUBERNETES_CONTEXT variable")
}

cwd, err := os.Getwd()
if !assert.NoError(t, err) {
t.FailNow()
Expand All @@ -296,11 +271,6 @@ func TestProvider(t *testing.T) {
}

func TestHelm(t *testing.T) {
kubectx := os.Getenv("KUBERNETES_CONTEXT")
if kubectx == "" {
t.Skipf("Skipping test due to missing KUBERNETES_CONTEXT variable")
}

cwd, err := os.Getwd()
if !assert.NoError(t, err) {
t.FailNow()
Expand Down
7 changes: 0 additions & 7 deletions tests/integration/aliases/aliases_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
package ints

import (
"os"
"testing"

"github.com/pulumi/pulumi-kubernetes/provider/v2/pkg/openapi"
Expand All @@ -25,12 +24,6 @@ import (
)

func TestAliases(t *testing.T) {
kubectx := os.Getenv("KUBERNETES_CONTEXT")

if kubectx == "" {
t.Skipf("Skipping test due to missing KUBERNETES_CONTEXT variable")
}

integration.ProgramTest(t, &integration.ProgramTestOptions{
Dir: "step1",
Dependencies: []string{"@pulumi/kubernetes"},
Expand Down
7 changes: 0 additions & 7 deletions tests/integration/autonaming/autonaming_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
package ints

import (
"os"
"strings"
"testing"

Expand All @@ -32,12 +31,6 @@ var step2Name interface{}
var step3Name interface{}

func TestAutonaming(t *testing.T) {
kubectx := os.Getenv("KUBERNETES_CONTEXT")

if kubectx == "" {
t.Skipf("Skipping test due to missing KUBERNETES_CONTEXT variable")
}

integration.ProgramTest(t, &integration.ProgramTestOptions{
Dir: "step1",
Dependencies: []string{"@pulumi/kubernetes"},
Expand Down
7 changes: 0 additions & 7 deletions tests/integration/crds/crd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
package ints

import (
"os"
"testing"

"github.com/pulumi/pulumi-kubernetes/tests/v2"
Expand All @@ -27,12 +26,6 @@ import (
)

func TestCRDs(t *testing.T) {
kubectx := os.Getenv("KUBERNETES_CONTEXT")

if kubectx == "" {
t.Skipf("Skipping test due to missing KUBERNETES_CONTEXT variable")
}

integration.ProgramTest(t, &integration.ProgramTestOptions{
Dir: "step1",
Dependencies: []string{"@pulumi/kubernetes"},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
package ints

import (
"os"
"testing"

"github.com/pulumi/pulumi-kubernetes/provider/v2/pkg/openapi"
Expand All @@ -27,12 +26,6 @@ import (
)

func TestPod(t *testing.T) {
kubectx := os.Getenv("KUBERNETES_CONTEXT")

if kubectx == "" {
t.Skipf("Skipping test due to missing KUBERNETES_CONTEXT variable")
}

integration.ProgramTest(t, &integration.ProgramTestOptions{
Dir: "step1",
Dependencies: []string{"@pulumi/kubernetes"},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
package ints

import (
"os"
"strings"
"testing"

Expand All @@ -29,12 +28,6 @@ import (
)

func TestDeploymentRollout(t *testing.T) {
kubectx := os.Getenv("KUBERNETES_CONTEXT")

if kubectx == "" {
t.Skipf("Skipping test due to missing KUBERNETES_CONTEXT variable")
}

integration.ProgramTest(t, &integration.ProgramTestOptions{
Dir: "step1",
Dependencies: []string{"@pulumi/kubernetes"},
Expand Down
49 changes: 0 additions & 49 deletions tests/integration/dotnet/dotnet_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
package ints

import (
"os"
"testing"

"github.com/pulumi/pulumi/pkg/v2/testing/integration"
Expand All @@ -25,12 +24,6 @@ import (
)

func TestDotnet_Basic(t *testing.T) {
kubectx := os.Getenv("KUBERNETES_CONTEXT")

if kubectx == "" {
t.Skipf("Skipping test due to missing KUBERNETES_CONTEXT variable")
}

integration.ProgramTest(t, &integration.ProgramTestOptions{
Dir: "basic",
Dependencies: []string{"Pulumi.Kubernetes"},
Expand All @@ -41,12 +34,6 @@ func TestDotnet_Basic(t *testing.T) {
}

func TestDotnet_Guestbook(t *testing.T) {
kubectx := os.Getenv("KUBERNETES_CONTEXT")

if kubectx == "" {
t.Skipf("Skipping test due to missing KUBERNETES_CONTEXT variable")
}

integration.ProgramTest(t, &integration.ProgramTestOptions{
Dir: "guestbook",
Dependencies: []string{"Pulumi.Kubernetes"},
Expand All @@ -55,12 +42,6 @@ func TestDotnet_Guestbook(t *testing.T) {
}

func TestDotnet_YamlUrl(t *testing.T) {
kubectx := os.Getenv("KUBERNETES_CONTEXT")

if kubectx == "" {
t.Skipf("Skipping test due to missing KUBERNETES_CONTEXT variable")
}

integration.ProgramTest(t, &integration.ProgramTestOptions{
Dir: "yaml-url",
Dependencies: []string{"Pulumi.Kubernetes"},
Expand All @@ -75,12 +56,6 @@ func TestDotnet_YamlUrl(t *testing.T) {
}

func TestDotnet_YamlLocal(t *testing.T) {
kubectx := os.Getenv("KUBERNETES_CONTEXT")

if kubectx == "" {
t.Skipf("Skipping test due to missing KUBERNETES_CONTEXT variable")
}

integration.ProgramTest(t, &integration.ProgramTestOptions{
Dir: "yaml-local",
Dependencies: []string{"Pulumi.Kubernetes"},
Expand All @@ -95,12 +70,6 @@ func TestDotnet_YamlLocal(t *testing.T) {
}

func TestDotnet_Helm(t *testing.T) {
kubectx := os.Getenv("KUBERNETES_CONTEXT")

if kubectx == "" {
t.Skipf("Skipping test due to missing KUBERNETES_CONTEXT variable")
}

integration.ProgramTest(t, &integration.ProgramTestOptions{
Dir: "helm",
Dependencies: []string{"Pulumi.Kubernetes"},
Expand All @@ -123,12 +92,6 @@ func TestDotnet_Helm(t *testing.T) {
}

func TestDotnet_HelmLocal(t *testing.T) {
kubectx := os.Getenv("KUBERNETES_CONTEXT")

if kubectx == "" {
t.Skipf("Skipping test due to missing KUBERNETES_CONTEXT variable")
}

integration.ProgramTest(t, &integration.ProgramTestOptions{
Dir: "helm-local",
Dependencies: []string{"Pulumi.Kubernetes"},
Expand All @@ -142,12 +105,6 @@ func TestDotnet_HelmLocal(t *testing.T) {
}

func TestDotnet_HelmApiVersions(t *testing.T) {
kubectx := os.Getenv("KUBERNETES_CONTEXT")

if kubectx == "" {
t.Skipf("Skipping test due to missing KUBERNETES_CONTEXT variable")
}

integration.ProgramTest(t, &integration.ProgramTestOptions{
Dir: "helm-api-versions",
Dependencies: []string{"Pulumi.Kubernetes"},
Expand All @@ -160,12 +117,6 @@ func TestDotnet_HelmApiVersions(t *testing.T) {
}

func TestDotnet_CustomResource(t *testing.T) {
kubectx := os.Getenv("KUBERNETES_CONTEXT")

if kubectx == "" {
t.Skipf("Skipping test due to missing KUBERNETES_CONTEXT variable")
}

integration.ProgramTest(t, &integration.ProgramTestOptions{
Dir: "custom-resource",
Dependencies: []string{"Pulumi.Kubernetes"},
Expand Down
7 changes: 0 additions & 7 deletions tests/integration/dry-run/dryrun_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,12 @@
package ints

import (
"os"
"testing"

"github.com/pulumi/pulumi/pkg/v2/testing/integration"
)

func TestDryRun(t *testing.T) {
kubectx := os.Getenv("KUBERNETES_CONTEXT")

if kubectx == "" {
t.Skipf("Skipping test due to missing KUBERNETES_CONTEXT variable")
}

integration.ProgramTest(t, &integration.ProgramTestOptions{
Dir: "step1",
Dependencies: []string{"@pulumi/kubernetes"},
Expand Down
7 changes: 0 additions & 7 deletions tests/integration/empty-array/emptyarray_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,12 @@
package ints

import (
"os"
"testing"

"github.com/pulumi/pulumi/pkg/v2/testing/integration"
)

func TestEmptyArray(t *testing.T) {
kubectx := os.Getenv("KUBERNETES_CONTEXT")

if kubectx == "" {
t.Skipf("Skipping test due to missing KUBERNETES_CONTEXT variable")
}

integration.ProgramTest(t, &integration.ProgramTestOptions{
Dir: "step1",
Dependencies: []string{"@pulumi/kubernetes"},
Expand Down
7 changes: 0 additions & 7 deletions tests/integration/get/get_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
package ints

import (
"os"
"testing"

"github.com/pulumi/pulumi-kubernetes/provider/v2/pkg/openapi"
Expand All @@ -27,12 +26,6 @@ import (
)

func TestGet(t *testing.T) {
kubectx := os.Getenv("KUBERNETES_CONTEXT")

if kubectx == "" {
t.Skipf("Skipping test due to missing KUBERNETES_CONTEXT variable")
}

integration.ProgramTest(t, &integration.ProgramTestOptions{
Dir: "step1",
Dependencies: []string{"@pulumi/kubernetes"},
Expand Down
7 changes: 0 additions & 7 deletions tests/integration/go/go_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,13 @@
package ints

import (
"os"
"testing"

"github.com/pulumi/pulumi/pkg/v2/testing/integration"
)

func TestGo_Basic(t *testing.T) {
t.Skip("temporarily skip while we make an initial release of the package")
kubectx := os.Getenv("KUBERNETES_CONTEXT")

if kubectx == "" {
t.Skipf("Skipping test due to missing KUBERNETES_CONTEXT variable")
}

integration.ProgramTest(t, &integration.ProgramTestOptions{
Dir: "basic",
Dependencies: []string{
Expand Down
Loading

0 comments on commit d5dde74

Please sign in to comment.