Skip to content

Commit

Permalink
tests: update simple tests to be compatible with kind
Browse files Browse the repository at this point in the history
  • Loading branch information
rquitales committed Mar 12, 2024
1 parent 8b47f89 commit e2daf80
Show file tree
Hide file tree
Showing 12 changed files with 11 additions and 54 deletions.
1 change: 1 addition & 0 deletions tests/sdk/dotnet/dotnet_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ func TestDotnet_Basic(t *testing.T) {
}

func TestDotnet_Guestbook(t *testing.T) {
tests.SkipIfShort(t) // An external load balancer is required.
test := baseOptions.With(integration.ProgramTestOptions{
Dir: "guestbook",
Quick: true,
Expand Down
1 change: 0 additions & 1 deletion tests/sdk/dotnet/kustomize/helloWorld/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ commonLabels:

resources:
- deployment.yaml
- service.yaml
- configMap.yaml
12 changes: 0 additions & 12 deletions tests/sdk/dotnet/kustomize/helloWorld/service.yaml

This file was deleted.

1 change: 1 addition & 0 deletions tests/sdk/go/go_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,7 @@ func TestGo(t *testing.T) {
})

t.Run("Import Deployment Created by Helm", func(t *testing.T) {
tests.SkipIfShort(t)
baseDir := filepath.Join(cwd, "helm-import-deployment", "step1")
namespace := getRandomNamespace("importdepl")
chartPath := filepath.Join(baseDir, "./nginx")
Expand Down
1 change: 0 additions & 1 deletion tests/sdk/go/kustomize/helloWorld/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ commonLabels:

resources:
- deployment.yaml
- service.yaml
- configMap.yaml
12 changes: 0 additions & 12 deletions tests/sdk/go/kustomize/helloWorld/service.yaml

This file was deleted.

5 changes: 5 additions & 0 deletions tests/sdk/nodejs/nodejs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,7 @@ func TestCRDs(t *testing.T) {
}

func TestPod(t *testing.T) {
tests.SkipIfShort(t) // statuses are different in Kind cluster
test := baseOptions.With(integration.ProgramTestOptions{
Dir: filepath.Join("delete-before-replace", "step1"),
Quick: true,
Expand Down Expand Up @@ -794,6 +795,7 @@ func TestGet(t *testing.T) {
}

func TestIstio(t *testing.T) {
tests.SkipIfShort(t)
test := baseOptions.With(integration.ProgramTestOptions{
Dir: filepath.Join("istio", "step1"),
Quick: true,
Expand Down Expand Up @@ -1153,6 +1155,7 @@ func TestRenderYAML(t *testing.T) {
assert.Equal(t, len(files), 2)
},
})

integration.ProgramTest(t, &test)
}

Expand Down Expand Up @@ -1954,6 +1957,7 @@ func TestClientSideDriftCorrectSSA(t *testing.T) {
// 5. Re-enable access to the unreachable cluster and run `pulumi up` again.
// 6. Validate that the resource in the unreachable cluster was updated.
func TestSkipUpdateUnreachableFlag(t *testing.T) {
tests.SkipIfShort(t)
var ns0, ns1, cm0, cm1 string

test := baseOptions.With(integration.ProgramTestOptions{
Expand Down Expand Up @@ -2264,6 +2268,7 @@ func TestEmptyItemNormalization(t *testing.T) {
// 3. Update the DeploymentPatch resource to further patch the deployment, setting the image to nginx:1.14.0,
// and verify that other fields managed by kubectl-client-side-apply remain unaffected (Step 2).
func TestFieldManagerPatchResources(t *testing.T) {
tests.SkipIfShort(t)
testFolder := "field-manager-patch-resources"

createDeployment := func() string {
Expand Down
6 changes: 4 additions & 2 deletions tests/sdk/nodejs/provider/step1/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,17 @@ import * as path from "path";
const ns1 = new k8s.core.v1.Namespace("ns1");
const ns2 = new k8s.core.v1.Namespace("ns2");

const kcfg = process.env.KUBECONFIG|| path.join(os.homedir(), ".kube", "config");

// Create a new provider using the contents of a k8s config.
const kubeconfigContentsProvider = new k8s.Provider("kubeconfigContentsProvider", {
kubeconfig: fs.readFileSync(path.join(os.homedir(), ".kube", "config")).toString(),
kubeconfig: fs.readFileSync(kcfg).toString(),
namespace: ns1.metadata.name,
});

// Create a new provider using the path to a k8s config.
const kubeconfigPathProvider = new k8s.Provider("kubeconfigPathProvider", {
kubeconfig: "~/.kube/config",
kubeconfig: kcfg,
namespace: ns1.metadata.name,
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ commonLabels:

resources:
- deployment.yaml
- service.yaml
- configMap.yaml

This file was deleted.

1 change: 0 additions & 1 deletion tests/sdk/python/kustomize/helloWorld/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ commonLabels:

resources:
- deployment.yaml
- service.yaml
- configMap.yaml
12 changes: 0 additions & 12 deletions tests/sdk/python/kustomize/helloWorld/service.yaml

This file was deleted.

0 comments on commit e2daf80

Please sign in to comment.