diff --git a/provider/go.mod b/provider/go.mod index 18ad1810b3..d138897776 100644 --- a/provider/go.mod +++ b/provider/go.mod @@ -19,8 +19,8 @@ require ( github.com/pkg/errors v0.9.1 github.com/pulumi/cloud-ready-checks v1.2.0 github.com/pulumi/pulumi-kubernetes/sdk/v4 v4.19.0 - github.com/pulumi/pulumi/pkg/v3 v3.143.0 - github.com/pulumi/pulumi/sdk/v3 v3.143.0 + github.com/pulumi/pulumi/pkg/v3 v3.144.1 + github.com/pulumi/pulumi/sdk/v3 v3.144.1 github.com/stretchr/testify v1.10.0 golang.org/x/crypto v0.31.0 golang.org/x/exp v0.0.0-20241210194714-1829a127f884 diff --git a/provider/go.sum b/provider/go.sum index de51e908a6..19542b25ae 100644 --- a/provider/go.sum +++ b/provider/go.sum @@ -687,8 +687,12 @@ github.com/pulumi/inflector v0.1.1 h1:dvlxlWtXwOJTUUtcYDvwnl6Mpg33prhK+7mzeF+Sob github.com/pulumi/inflector v0.1.1/go.mod h1:HUFCjcPTz96YtTuUlwG3i3EZG4WlniBvR9bd+iJxCUY= github.com/pulumi/pulumi/pkg/v3 v3.143.0 h1:diAlaNVZSRc59ePqbMuvuf/AwecpZyjhh1pGvmLEUwg= github.com/pulumi/pulumi/pkg/v3 v3.143.0/go.mod h1:XzjN1uQI2HWXYolT2L4RIXzvLEnWTSOzFgFFIUfFEa8= +github.com/pulumi/pulumi/pkg/v3 v3.144.1 h1:64mVLQDEZa2GN52rTKSyXlA3r+APoqDXrNdkzlASyvs= +github.com/pulumi/pulumi/pkg/v3 v3.144.1/go.mod h1:q2wZOcwXVI/+OBtEXD6mLS7shhRMgsIGTo/uWfo0q04= github.com/pulumi/pulumi/sdk/v3 v3.143.0 h1:z1m8Fc6l723eU2J/bP7UHE5t6WbBu4iIDAl1WaalQk4= github.com/pulumi/pulumi/sdk/v3 v3.143.0/go.mod h1:OFpZabILGxrFqzcABFpMCksrHGVp4ymRM2BkKjlazDY= +github.com/pulumi/pulumi/sdk/v3 v3.144.1 h1:QQtCDERihhlfvcmRzqHeBmOER1Fg1VkFj9933Lxqv00= +github.com/pulumi/pulumi/sdk/v3 v3.144.1/go.mod h1:/6gxU2XirnLlImBy5OoqV6I4HcjOf+IznNIZNZExZzo= github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis= diff --git a/tests/ci-cluster/package.json b/tests/ci-cluster/package.json index 2741fa204c..a961396779 100644 --- a/tests/ci-cluster/package.json +++ b/tests/ci-cluster/package.json @@ -4,8 +4,8 @@ "@types/node": "latest" }, "dependencies": { - "@pulumi/gcp": "^5.4.0", - "@pulumi/kubernetes": "^3.2.0", - "@pulumi/pulumi": "^3.2.1" + "@pulumi/gcp": "5.26.0", + "@pulumi/kubernetes": "3.30.2", + "@pulumi/pulumi": "3.144.1" } } diff --git a/tests/go.mod b/tests/go.mod index 47747369bb..c8f6da8b05 100644 --- a/tests/go.mod +++ b/tests/go.mod @@ -12,11 +12,11 @@ replace ( require ( github.com/onsi/gomega v1.35.1 github.com/pkg/errors v0.9.1 - github.com/pulumi/providertest v0.0.12 + github.com/pulumi/providertest v0.1.3 github.com/pulumi/pulumi-kubernetes/provider/v4 v4.0.0 github.com/pulumi/pulumi-kubernetes/sdk/v4 v4.19.0 - github.com/pulumi/pulumi/pkg/v3 v3.143.0 - github.com/pulumi/pulumi/sdk/v3 v3.143.0 + github.com/pulumi/pulumi/pkg/v3 v3.144.1 + github.com/pulumi/pulumi/sdk/v3 v3.144.1 github.com/pulumiverse/pulumi-time/sdk v0.0.0-20231010123146-089d7304da13 github.com/stretchr/testify v1.10.0 golang.org/x/exp v0.0.0-20241210194714-1829a127f884 diff --git a/tests/go.sum b/tests/go.sum index cabe960689..cf52a0eb09 100644 --- a/tests/go.sum +++ b/tests/go.sum @@ -629,10 +629,16 @@ github.com/pulumi/esc v0.10.0 h1:jzBKzkLVW0mePeanDRfqSQoCJ5yrkux0jIwAkUxpRKE= github.com/pulumi/esc v0.10.0/go.mod h1:2Bfa+FWj/xl8CKqRTWbWgDX0SOD4opdQgvYSURTGK2c= github.com/pulumi/providertest v0.0.12 h1:UjcFQHHs4AGJyJqxhvC2q8yVQ7Li+UyCyP95HZcK03U= github.com/pulumi/providertest v0.0.12/go.mod h1:REAoaN+hGOtdWJGirfWYqcSjCejlbGfzyVTUuemJTuE= +github.com/pulumi/providertest v0.1.3 h1:GpNKRy/haNjRHiUA9bi4diU4Op2zf3axYXbga5AepHg= +github.com/pulumi/providertest v0.1.3/go.mod h1:GcsqEGgSngwaNOD+kICJPIUQlnA911fGBU8HDlJvVL0= github.com/pulumi/pulumi/pkg/v3 v3.143.0 h1:diAlaNVZSRc59ePqbMuvuf/AwecpZyjhh1pGvmLEUwg= github.com/pulumi/pulumi/pkg/v3 v3.143.0/go.mod h1:XzjN1uQI2HWXYolT2L4RIXzvLEnWTSOzFgFFIUfFEa8= +github.com/pulumi/pulumi/pkg/v3 v3.144.1 h1:64mVLQDEZa2GN52rTKSyXlA3r+APoqDXrNdkzlASyvs= +github.com/pulumi/pulumi/pkg/v3 v3.144.1/go.mod h1:q2wZOcwXVI/+OBtEXD6mLS7shhRMgsIGTo/uWfo0q04= github.com/pulumi/pulumi/sdk/v3 v3.143.0 h1:z1m8Fc6l723eU2J/bP7UHE5t6WbBu4iIDAl1WaalQk4= github.com/pulumi/pulumi/sdk/v3 v3.143.0/go.mod h1:OFpZabILGxrFqzcABFpMCksrHGVp4ymRM2BkKjlazDY= +github.com/pulumi/pulumi/sdk/v3 v3.144.1 h1:QQtCDERihhlfvcmRzqHeBmOER1Fg1VkFj9933Lxqv00= +github.com/pulumi/pulumi/sdk/v3 v3.144.1/go.mod h1:/6gxU2XirnLlImBy5OoqV6I4HcjOf+IznNIZNZExZzo= github.com/pulumiverse/pulumi-time/sdk v0.0.0-20231010123146-089d7304da13 h1:4U7DFIlSggj/4iLbis2Bckayed+OhaYKE7bncZwQCYI= github.com/pulumiverse/pulumi-time/sdk v0.0.0-20231010123146-089d7304da13/go.mod h1:NUa1zA74DF002WrM6iF111A6UjX9knPpXufVRvBwNyg= github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= diff --git a/tests/sdk/java/await_test.go b/tests/sdk/java/await_test.go index fa9bd249ce..2aae07c161 100644 --- a/tests/sdk/java/await_test.go +++ b/tests/sdk/java/await_test.go @@ -58,23 +58,23 @@ func TestAwaitDaemonSet(t *testing.T) { opttest.SkipInstall(), ) t.Cleanup(func() { - test.Destroy() + test.Destroy(t) }) // Create a new DS that takes a few seconds to become ready. - up := test.Up() + up := test.Up(t) t.Log(up.Summary.Message) assertReady(t, up.Outputs) - test.Refresh() // Exercise read-await logic. + test.Refresh(t) // Exercise read-await logic. // Update the DS to use a different but valid image tag. - test.UpdateSource("testdata/await/daemonset/step2") - up = test.Up() + test.UpdateSource(t, "testdata/await/daemonset/step2") + up = test.Up(t) assertReady(t, up.Outputs) // Update the DS to use an invalid image tag. It should never become ready. - test.UpdateSource("testdata/await/daemonset/step3") + test.UpdateSource(t, "testdata/await/daemonset/step3") _, err := test.CurrentStack().Up(context.Background()) assert.ErrorContains(t, err, `the Kubernetes API server reported that "default/await-daemonset" failed to fully initialize or become live: timed out waiting for the condition`) } @@ -87,16 +87,16 @@ func TestAwaitPVC(t *testing.T) { opttest.SkipInstall(), ) t.Cleanup(func() { - test.Destroy() + test.Destroy(t) }) // WaitUntilFirstConsumer PVC should still be Pending. - up := test.Up() + up := test.Up(t) assert.Equal(t, "Pending", up.Outputs["status"].Value) // Adding a Deployment to consume the PVC should succeed. - test.UpdateSource("testdata/await/pvc/step2") - up = test.Up() + test.UpdateSource(t, "testdata/await/pvc/step2") + up = test.Up(t) } func TestAwaitService(t *testing.T) { @@ -107,19 +107,19 @@ func TestAwaitService(t *testing.T) { opttest.SkipInstall(), ) t.Cleanup(func() { - test.Destroy() + test.Destroy(t) }) - up := test.Up() + up := test.Up(t) assert.Equal(t, float64(1), up.Outputs["replicas"].Value.(float64)) assert.Nil(t, up.Outputs["selector"].Value) - test.Refresh() + test.Refresh(t) - test.UpdateSource("testdata/await/service/step2") - up = test.Up() + test.UpdateSource(t, "testdata/await/service/step2") + up = test.Up(t) assert.Equal(t, float64(0), up.Outputs["replicas"].Value.(float64)) assert.Equal(t, up.Outputs["selector"], up.Outputs["label"]) - test.Refresh() + test.Refresh(t) } func TestAwaitServiceAccount(t *testing.T) { @@ -130,13 +130,13 @@ func TestAwaitServiceAccount(t *testing.T) { opttest.SkipInstall(), ) t.Cleanup(func() { - test.Destroy() + test.Destroy(t) }) - test.Up() - test.UpdateSource("testdata/await/service-account/step2") - test.Up() - test.Refresh() + test.Up(t) + test.UpdateSource(t, "testdata/await/service-account/step2") + test.Up(t) + test.Refresh(t) } func TestAwaitSkip(t *testing.T) { @@ -147,27 +147,27 @@ func TestAwaitSkip(t *testing.T) { opttest.SkipInstall(), ) t.Cleanup(func() { - test.Destroy() + test.Destroy(t) }) start := time.Now() - _ = test.Up(optup.ProgressStreams(os.Stdout)) + _ = test.Up(t, optup.ProgressStreams(os.Stdout)) took := time.Since(start) assert.Less(t, took, 2*time.Minute, "didn't skip pod's slow startup") start = time.Now() - _ = test.Refresh(optrefresh.ProgressStreams(os.Stdout)) + _ = test.Refresh(t, optrefresh.ProgressStreams(os.Stdout)) took = time.Since(start) assert.Less(t, took, 2*time.Minute, "didn't skip pod's slow read") - test.UpdateSource("testdata/await/skipawait/step2") + test.UpdateSource(t, "testdata/await/skipawait/step2") start = time.Now() - _ = test.Refresh(optrefresh.ProgressStreams(os.Stdout)) + _ = test.Refresh(t, optrefresh.ProgressStreams(os.Stdout)) took = time.Since(start) assert.Less(t, took, 2*time.Minute, "didn't skip pod's slow update") start = time.Now() - _ = test.Destroy(optdestroy.ProgressStreams(os.Stdout)) + _ = test.Destroy(t, optdestroy.ProgressStreams(os.Stdout)) took = time.Since(start) assert.Less(t, took, 2*time.Minute, "didn't skip config map's stuck delete") } diff --git a/tests/sdk/java/chartv4_test.go b/tests/sdk/java/chartv4_test.go index b12685898d..2f630ea4ca 100644 --- a/tests/sdk/java/chartv4_test.go +++ b/tests/sdk/java/chartv4_test.go @@ -13,9 +13,9 @@ func TestChartv4(t *testing.T) { test := pulumitest.NewPulumiTest(t, "testdata/chartv4", opttest.SkipInstall()) t.Logf("into %s", test.Source()) t.Cleanup(func() { - test.Destroy() + test.Destroy(t) }) - test.Preview() - test.Up() - test.Up(optup.ExpectNoChanges()) + test.Preview(t) + test.Up(t) + test.Up(t, optup.ExpectNoChanges()) } diff --git a/tests/sdk/java/config_test.go b/tests/sdk/java/config_test.go index d4c8f307cb..f7b693a5ab 100644 --- a/tests/sdk/java/config_test.go +++ b/tests/sdk/java/config_test.go @@ -14,19 +14,19 @@ func TestClusterIdentifier(t *testing.T) { ctx := context.Background() test := pulumitest.NewPulumiTest(t, "config/cluster-identifier") t.Cleanup(func() { - test.Destroy() + test.Destroy(t) }) - test.Up() + test.Up(t) - test.UpdateSource("config/cluster-identifier/step2") + test.UpdateSource(t, "config/cluster-identifier/step2") up, err := test.CurrentStack().Up(ctx) require.NoError(t, err) assert.Contains(t, up.StdOut, "updated") assert.NotContains(t, up.StdOut, "replaced") - test.UpdateSource("config/cluster-identifier/step3") + test.UpdateSource(t, "config/cluster-identifier/step3") up, err = test.CurrentStack().Up(ctx) require.NoError(t, err) diff --git a/tests/sdk/java/configmap_test.go b/tests/sdk/java/configmap_test.go index bd8d88179d..7aa7b069e5 100644 --- a/tests/sdk/java/configmap_test.go +++ b/tests/sdk/java/configmap_test.go @@ -16,11 +16,11 @@ func TestConfigMapAndSecretImmutability(t *testing.T) { opttest.SkipInstall(), ) t.Cleanup(func() { - test.Destroy() + test.Destroy(t) }) // Create the secrets/configmaps. - up := test.Up() + up := test.Up(t) // We will detect update/replacement behavior by observing effects on our // downstream dependencies. @@ -32,8 +32,8 @@ func TestConfigMapAndSecretImmutability(t *testing.T) { mutableConfigmap := up.Outputs["mutableConfigmap"].Value.(string) // Update the data of all our secrets and configmaps. - test.UpdateSource("testdata/immutability/step2") - up = test.Up() + test.UpdateSource(t, "testdata/immutability/step2") + up = test.Up(t) // Only the mutable configmap and secret should have been updated -- so no // impact on those two downstreams. @@ -53,8 +53,8 @@ func TestConfigMapAndSecretImmutability(t *testing.T) { // The final step only touches annotations. All resources should have been // updated. - test.UpdateSource("testdata/immutability/step3") - up = test.Up() + test.UpdateSource(t, "testdata/immutability/step3") + up = test.Up(t) assert.Equal(t, secret, up.Outputs["secret"].Value.(string)) assert.Equal(t, configmap, up.Outputs["configmap"].Value.(string)) assert.Equal(t, autonamedSecret, up.Outputs["autonamedSecret"].Value.(string)) diff --git a/tests/sdk/java/crd_java_test.go b/tests/sdk/java/crd_java_test.go index a328831185..0df659a8c5 100644 --- a/tests/sdk/java/crd_java_test.go +++ b/tests/sdk/java/crd_java_test.go @@ -31,16 +31,16 @@ func TestJavaCanCreateCRD(t *testing.T) { test := pulumitest.NewPulumiTest(t, "testdata/crd-java/step1") t.Logf("into %s", test.Source()) t.Cleanup(func() { - test.Destroy() + test.Destroy(t) }) - test.Preview() - test.Up() + test.Preview(t) + test.Up(t) // Step 2 adds a pulumi CRD get operation and ensures we can read its URN properly. - test.UpdateSource("testdata/crd-java/step2") - test.Preview() - test.Up() - up := test.Up(optup.ExpectNoChanges()) + test.UpdateSource(t, "testdata/crd-java/step2") + test.Preview(t) + test.Up(t) + up := test.Up(t, optup.ExpectNoChanges()) urn, ok := up.Outputs["urn"] require.True(t, ok) @@ -53,10 +53,10 @@ func TestJavaCanCreateCRD(t *testing.T) { assert.Contains(t, string(output), `"x-kubernetes-preserve-unknown-fields": true`) // Step 3 removes the `x-kubernetes-preserve-unknown-fields` field and ensures that the CRD is updated. - test.UpdateSource("testdata/crd-java/step3") - test.Preview() - test.Up() - up = test.Up(optup.ExpectNoChanges()) + test.UpdateSource(t, "testdata/crd-java/step3") + test.Preview(t) + test.Up(t) + up = test.Up(t, optup.ExpectNoChanges()) // Verify with kubectl that the CRD no longer has `x-kubernetes-*` fields set. output, err = tests.Kubectl("get crd javacrds.example.com -o json") diff --git a/tests/sdk/java/csa_to_ssa_test.go b/tests/sdk/java/csa_to_ssa_test.go index a72659517c..c71098d831 100644 --- a/tests/sdk/java/csa_to_ssa_test.go +++ b/tests/sdk/java/csa_to_ssa_test.go @@ -40,10 +40,10 @@ func TestCSAToSSANoManagedFields(t *testing.T) { test := pulumitest.NewPulumiTest(t, "testdata/csa-to-ssa", opttest.SkipInstall()) t.Logf("into %s", test.Source()) t.Cleanup(func() { - test.Destroy() + test.Destroy(t) }) - test.Preview() - test.Up() + test.Preview(t) + test.Up(t) outputs, err := test.CurrentStack().Outputs(ctx) require.NoError(t, err, "Failed to get outputs from stack") @@ -85,8 +85,8 @@ func TestCSAToSSANoManagedFields(t *testing.T) { require.Empty(t, dep.GetManagedFields(), "Failed to remove managedFields from deployment object") // 3. Apply step 2 of testdata where SSA mode is enabled, with a change in the image spec field. - test.UpdateSource("testdata/csa-to-ssa/step2") - test.Preview() - test.Up() - test.Up(optup.ExpectNoChanges()) + test.UpdateSource(t, "testdata/csa-to-ssa/step2") + test.Preview(t) + test.Up(t) + test.Up(t, optup.ExpectNoChanges()) } diff --git a/tests/sdk/java/kustomizev2_test.go b/tests/sdk/java/kustomizev2_test.go index ed3f3e299f..9f1113bf74 100644 --- a/tests/sdk/java/kustomizev2_test.go +++ b/tests/sdk/java/kustomizev2_test.go @@ -24,8 +24,8 @@ func TestKustomizeV2(t *testing.T) { ) t.Logf("into %s", test.Source()) t.Cleanup(func() { - test.Destroy() + test.Destroy(t) }) - test.Preview() - test.Up() + test.Preview(t) + test.Up(t) } diff --git a/tests/sdk/java/patch_test.go b/tests/sdk/java/patch_test.go index 7cd60dfa55..4255c2e5f2 100644 --- a/tests/sdk/java/patch_test.go +++ b/tests/sdk/java/patch_test.go @@ -85,15 +85,15 @@ func TestPatchResources(t *testing.T) { // 1. Create the resources. test := pulumitest.NewPulumiTest(t, filepath.Join(testFolder, language, "step1")) if language != "yaml" { - test.Install() + test.Install(t) } t.Logf("into %s", test.Source()) t.Cleanup(func() { - test.Destroy() + test.Destroy(t) }) - test.Preview() - outputs := test.Up().Outputs + test.Preview(t) + outputs := test.Up(t).Outputs // Validate the resources do not contain the patch fields. Get the program outputs for use with `kubectl`. namespace := outputs["nsName"].Value.(string) resources := []rsc{ @@ -135,12 +135,12 @@ func TestPatchResources(t *testing.T) { } // 2. Patch the resources. - test.UpdateSource(testFolder, language, "step2") + test.UpdateSource(t, testFolder, language, "step2") if language != "yaml" { - test.Install() + test.Install(t) } - test.Preview() - test.Up() + test.Preview(t) + test.Up(t) // Validate the resources contain the patch fields. for _, resource := range resources { @@ -166,13 +166,13 @@ func TestPatchResources(t *testing.T) { } // 3. Delete the Patch resources by reverting to the Pulumi program in step 1. - test.UpdateSource(testFolder, language, "step1") + test.UpdateSource(t, testFolder, language, "step1") if language != "yaml" { - test.Install() + test.Install(t) } - test.Preview() - test.Up() + test.Preview(t) + test.Up(t) // Validate the resources do not contain the patch fields, and the object has not been deleted from cluster. for _, resource := range resources { diff --git a/tests/sdk/java/preview_test.go b/tests/sdk/java/preview_test.go index b784570ca6..fcdcebf389 100644 --- a/tests/sdk/java/preview_test.go +++ b/tests/sdk/java/preview_test.go @@ -14,14 +14,14 @@ func TestPreviewReplacements(t *testing.T) { test := pulumitest.NewPulumiTest(t, "testdata/preview-replacements", opttest.SkipInstall()) t.Logf("into %s", test.Source()) t.Cleanup(func() { - test.Destroy() + test.Destroy(t) }) - test.Preview() - test.Up() + test.Preview(t) + test.Up(t) // Preview should not fail when there is a replacement due to immutable fields. - test.UpdateSource("testdata/preview-replacements", "step2") - test.Preview() + test.UpdateSource(t, "testdata/preview-replacements", "step2") + test.Preview(t) } // TestCRDPreviews ensures that CRDs are correctly previewed, and are not created or updated on the cluster. @@ -36,20 +36,20 @@ func TestCRDPreviews(t *testing.T) { test := pulumitest.NewPulumiTest(t, testFolder, opttest.SkipInstall()) t.Logf("into %s", test.Source()) t.Cleanup(func() { - test.Destroy() + test.Destroy(t) }) - test.Up() + test.Up(t) // 2. Preview should not actually update the CRD resource. Step 2 adds a new field ("testNewField") to the CRD. - test.UpdateSource(testFolder, "step2") - test.Preview() + test.UpdateSource(t, testFolder, "step2") + test.Preview(t) out, err := tests.Kubectl("get", "crd", crdName, "-o", "yaml") require.NoError(t, err, "unable to get CRD with kubectl") require.NotContains(t, string(out), "testNewField", "expected CRD to not have new field added in preview") // 3. Update should actually update the CRD resource. - test.Up() + test.Up(t) out, err = tests.Kubectl("get", "crd", crdName, "-o", "yaml") require.NoError(t, err, "unable to get CRD with kubectl") require.Contains(t, string(out), "testNewField", "expected CRD to have new field added in update operation") diff --git a/tests/sdk/java/yamlv2_test.go b/tests/sdk/java/yamlv2_test.go index 0984965c64..78add1c14c 100644 --- a/tests/sdk/java/yamlv2_test.go +++ b/tests/sdk/java/yamlv2_test.go @@ -18,10 +18,10 @@ func TestYamlV2(t *testing.T) { test := pulumitest.NewPulumiTest(t, "testdata/yamlv2", opttest.SkipInstall()) t.Logf("into %s", test.Source()) t.Cleanup(func() { - test.Destroy() + test.Destroy(t) }) - test.Preview() - test.Up() + test.Preview(t) + test.Up(t) } // TestJobUnreachable ensures that a panic does not occur when diffing Job resources against an unreachable API server. @@ -30,9 +30,9 @@ func TestJobUnreachable(t *testing.T) { test := pulumitest.NewPulumiTest(t, "testdata/job-unreachable", opttest.SkipInstall()) t.Logf("into %s", test.Source()) t.Cleanup(func() { - test.Destroy() + test.Destroy(t) }) - test.Preview() + test.Preview(t) // Create the job, but expect it to fail as the job is meant to fail. _, err := test.CurrentStack().Up(test.Context()) @@ -40,6 +40,6 @@ func TestJobUnreachable(t *testing.T) { // Re-run the Pulumi program with a malformed kubeconfig to simulate an unreachable API server. // This should not panic annd preview should succeed. - test.UpdateSource("testdata/job-unreachable/step2") - test.Preview() + test.UpdateSource(t, "testdata/job-unreachable/step2") + test.Preview(t) } diff --git a/tests/sdk/nodejs/await_test.go b/tests/sdk/nodejs/await_test.go index f80a2b4770..5e0a1798bf 100644 --- a/tests/sdk/nodejs/await_test.go +++ b/tests/sdk/nodejs/await_test.go @@ -179,7 +179,7 @@ func TestAwaitGeneric(t *testing.T) { ) dir := test.Source() t.Cleanup(func() { - test.Destroy() + test.Destroy(t) }) // Use kubectl to simulate an operator acting on our resources. @@ -190,14 +190,14 @@ func TestAwaitGeneric(t *testing.T) { }() // Create - up := test.Up(optup.EventStreams(ch), optup.ProgressStreams(os.Stdout), optup.ErrorProgressStreams(os.Stderr)) + up := test.Up(t, optup.EventStreams(ch), optup.ProgressStreams(os.Stdout), optup.ErrorProgressStreams(os.Stderr)) assertAllResourcesReady(t, up.Outputs) // Touch our resources and refresh in order to trigger an update later. touch(t, dir) // Read - refresh := test.Refresh(optrefresh.ProgressStreams(os.Stdout)) + refresh := test.Refresh(t, optrefresh.ProgressStreams(os.Stdout)) require.NotNil(t, refresh.Summary.ResourceChanges) assert.Equal(t, 5, (*refresh.Summary.ResourceChanges)["update"]) @@ -208,7 +208,7 @@ func TestAwaitGeneric(t *testing.T) { }() // Update - up = test.Up(optup.EventStreams(ch), optup.ProgressStreams(os.Stdout), optup.ErrorProgressStreams(os.Stderr)) + up = test.Up(t, optup.EventStreams(ch), optup.ProgressStreams(os.Stdout), optup.ErrorProgressStreams(os.Stderr)) assertAllResourcesReady(t, up.Outputs) }) @@ -222,7 +222,7 @@ func TestAwaitGeneric(t *testing.T) { ) dir := test.Source() t.Cleanup(func() { - test.Destroy() + test.Destroy(t) }) // Use kubectl to simulate an operator acting on our resources. @@ -233,7 +233,7 @@ func TestAwaitGeneric(t *testing.T) { }() // Create - up := test.Up(optup.EventStreams(ch), optup.ProgressStreams(os.Stdout), optup.ErrorProgressStreams(os.Stderr)) + up := test.Up(t, optup.EventStreams(ch), optup.ProgressStreams(os.Stdout), optup.ErrorProgressStreams(os.Stderr)) assertGenericResourceUntouched(t, up.Outputs) assertWaitForResourcesReady(t, up.Outputs) @@ -241,7 +241,7 @@ func TestAwaitGeneric(t *testing.T) { touch(t, dir) // Read - refresh := test.Refresh(optrefresh.ProgressStreams(os.Stdout)) + refresh := test.Refresh(t, optrefresh.ProgressStreams(os.Stdout)) require.NotNil(t, refresh.Summary.ResourceChanges) assert.Equal(t, 5, (*refresh.Summary.ResourceChanges)["update"]) @@ -252,7 +252,7 @@ func TestAwaitGeneric(t *testing.T) { }() // Update - up = test.Up(optup.EventStreams(ch), optup.ProgressStreams(os.Stdout), optup.ErrorProgressStreams(os.Stderr)) + up = test.Up(t, optup.EventStreams(ch), optup.ProgressStreams(os.Stdout), optup.ErrorProgressStreams(os.Stderr)) assertGenericResourceUntouched(t, up.Outputs) assertWaitForResourcesReady(t, up.Outputs) }) @@ -265,9 +265,9 @@ func TestAwaitCertManager(t *testing.T) { "testdata/await/cert-manager", ) t.Cleanup(func() { - test.Destroy() + test.Destroy(t) }) - test.Up(optup.ProgressStreams(os.Stdout)) - test.Destroy(optdestroy.ProgressStreams(os.Stdout)) + test.Up(t, optup.ProgressStreams(os.Stdout)) + test.Destroy(t, optdestroy.ProgressStreams(os.Stdout)) } diff --git a/tests/sdk/nodejs/examples/helm-local-panic/step1/package.json b/tests/sdk/nodejs/examples/helm-local-panic/step1/package.json index dccc67269a..e96d96e296 100644 --- a/tests/sdk/nodejs/examples/helm-local-panic/step1/package.json +++ b/tests/sdk/nodejs/examples/helm-local-panic/step1/package.json @@ -4,7 +4,7 @@ "@types/node": "^10.0.0" }, "dependencies": { - "@pulumi/pulumi": "^3.0.0", + "@pulumi/pulumi": "3.144.1", "@pulumi/kubernetes": "latest" } } diff --git a/tests/sdk/nodejs/examples/helm-no-default-provider/package.json b/tests/sdk/nodejs/examples/helm-no-default-provider/package.json index 040775317f..6943b8d8f9 100644 --- a/tests/sdk/nodejs/examples/helm-no-default-provider/package.json +++ b/tests/sdk/nodejs/examples/helm-no-default-provider/package.json @@ -4,8 +4,8 @@ "@types/node": "^14" }, "dependencies": { - "@pulumi/pulumi": "^3.0.0", - "@pulumi/kubernetes": "3.15.1", - "@pulumi/kubernetesx": "^0.1.5" + "@pulumi/pulumi": "3.144.1", + "@pulumi/kubernetes": "4.19.0", + "@pulumi/kubernetesx": "0.1.6" } } diff --git a/tests/sdk/nodejs/examples/helm-release-crd/step1/package.json b/tests/sdk/nodejs/examples/helm-release-crd/step1/package.json index 6320138920..8a3e1e286b 100644 --- a/tests/sdk/nodejs/examples/helm-release-crd/step1/package.json +++ b/tests/sdk/nodejs/examples/helm-release-crd/step1/package.json @@ -4,8 +4,8 @@ "@types/node": "^10.0.0" }, "dependencies": { - "@pulumi/pulumi": "^3.0.0", + "@pulumi/pulumi": "3.144.1", "@pulumi/kubernetes": "latest", - "@pulumi/kubernetesx": "^0.1.5" + "@pulumi/kubernetesx": "0.1.6" } } diff --git a/tests/sdk/nodejs/examples/helm-release-namespace/step1/package.json b/tests/sdk/nodejs/examples/helm-release-namespace/step1/package.json index 89b03f478c..258ac4df80 100644 --- a/tests/sdk/nodejs/examples/helm-release-namespace/step1/package.json +++ b/tests/sdk/nodejs/examples/helm-release-namespace/step1/package.json @@ -4,8 +4,8 @@ "@types/node": "^10.0.0" }, "dependencies": { - "@pulumi/pulumi": "^3.0.0", + "@pulumi/pulumi": "3.144.1", "@pulumi/kubernetes": "latest", - "@pulumi/kubernetesx": "^0.1.5" + "@pulumi/kubernetesx": "0.1.6" } } diff --git a/tests/sdk/nodejs/examples/helm-release-redis/step1/package.json b/tests/sdk/nodejs/examples/helm-release-redis/step1/package.json index d9e2b4fdd5..f49e5b3323 100644 --- a/tests/sdk/nodejs/examples/helm-release-redis/step1/package.json +++ b/tests/sdk/nodejs/examples/helm-release-redis/step1/package.json @@ -4,9 +4,9 @@ "@types/node": "^10.0.0" }, "dependencies": { - "@pulumi/pulumi": "^3.0.0", + "@pulumi/pulumi": "3.144.1", "@pulumi/kubernetes": "latest", - "@pulumi/kubernetesx": "^0.1.5", - "@pulumi/random": "^4.4.2" + "@pulumi/kubernetesx": "0.1.6", + "@pulumi/random": "4.16.8" } } diff --git a/tests/sdk/nodejs/examples/helm-release/step1/package.json b/tests/sdk/nodejs/examples/helm-release/step1/package.json index e72321629f..7f089117ce 100644 --- a/tests/sdk/nodejs/examples/helm-release/step1/package.json +++ b/tests/sdk/nodejs/examples/helm-release/step1/package.json @@ -4,8 +4,8 @@ "@types/node": "^10.0.0" }, "dependencies": { - "@pulumi/pulumi": "^3.0.0", + "@pulumi/pulumi": "3.144.1", "@pulumi/kubernetes": "latest", - "@pulumi/kubernetesx": "^0.1.5" + "@pulumi/kubernetesx": "0.1.6" } } diff --git a/tests/sdk/nodejs/examples/prometheus-operator/package.json b/tests/sdk/nodejs/examples/prometheus-operator/package.json index a4e06e6c72..9a5dad6cfe 100644 --- a/tests/sdk/nodejs/examples/prometheus-operator/package.json +++ b/tests/sdk/nodejs/examples/prometheus-operator/package.json @@ -2,7 +2,7 @@ "name": "prometheus-operator", "version": "0.1.0", "dependencies": { - "@pulumi/kubernetes": "^3.24.0", + "@pulumi/kubernetes": "3.30.2", "@pulumi/pulumi": "latest" }, "peerDependencies": { diff --git a/tests/sdk/nodejs/helm-preview-unreachable/package.json b/tests/sdk/nodejs/helm-preview-unreachable/package.json index 99fed57113..8cfb4f39eb 100644 --- a/tests/sdk/nodejs/helm-preview-unreachable/package.json +++ b/tests/sdk/nodejs/helm-preview-unreachable/package.json @@ -4,8 +4,8 @@ "@types/node": "^10.0.0" }, "dependencies": { - "@pulumi/pulumi": "^3.0.0", + "@pulumi/pulumi": "3.144.1", "@pulumi/kubernetes": "latest", - "@pulumi/random": "^4.15.1" + "@pulumi/random": "4.16.8" } } diff --git a/tests/sdk/nodejs/helm-release-unknowns/package.json b/tests/sdk/nodejs/helm-release-unknowns/package.json index 3a3891384a..d53a7e247d 100644 --- a/tests/sdk/nodejs/helm-release-unknowns/package.json +++ b/tests/sdk/nodejs/helm-release-unknowns/package.json @@ -4,9 +4,9 @@ "@types/node": "^10.0.0" }, "dependencies": { - "@pulumi/pulumi": "^3.0.0", + "@pulumi/pulumi": "3.144.1", "@pulumi/kubernetes": "latest", - "@pulumi/kubernetesx": "^0.1.5", - "@pulumi/random": "^4.15.1" + "@pulumi/kubernetesx": "0.1.6", + "@pulumi/random": "4.16.8" } } diff --git a/tests/sdk/nodejs/helm_test.go b/tests/sdk/nodejs/helm_test.go index e03b91fae5..e1670551f3 100644 --- a/tests/sdk/nodejs/helm_test.go +++ b/tests/sdk/nodejs/helm_test.go @@ -54,19 +54,19 @@ func TestHelmUnknowns(t *testing.T) { previewF := func(opts ...optpreview.Option) auto.PreviewResult { clearGrpcLog(t, test) - preview := test.Preview(opts...) + preview := test.Preview(t, opts...) t.Log(preview.StdOut) return preview } upF := func() auto.UpResult { clearGrpcLog(t, test) - up := test.Up() + up := test.Up(t) t.Log(up.StdOut) return up } lookup := func() grpclog.TypedEntry[rpc.CreateRequest, rpc.CreateResponse] { - creates, err := test.GrpcLog().Creates() + creates, err := test.GrpcLog(t).Creates() g.Expect(err).ToNot(HaveOccurred()) release := findByUrn(t, creates, urn("kubernetes:helm.sh/v3:Release", "release")) g.Expect(release).ToNot(BeNil()) @@ -190,8 +190,8 @@ func TestPreviewWithUnreachableCluster(t *testing.T) { test := pulumitest.NewPulumiTest(t, "helm-preview-unreachable") t.Cleanup(func() { - test.Destroy() + test.Destroy(t) }) - test.Preview() + test.Preview(t) } diff --git a/tests/sdk/nodejs/kustomizeHelmChart/step1/package.json b/tests/sdk/nodejs/kustomizeHelmChart/step1/package.json index c510b7a3e4..c3739b7240 100644 --- a/tests/sdk/nodejs/kustomizeHelmChart/step1/package.json +++ b/tests/sdk/nodejs/kustomizeHelmChart/step1/package.json @@ -6,7 +6,7 @@ }, "devDependencies": { "@types/node": "^9.3.0", - "@pulumi/random": "^4.13.2" + "@pulumi/random": "4.16.8" }, "peerDependencies": { "@pulumi/kubernetes": "latest" diff --git a/tests/sdk/nodejs/options/package.json b/tests/sdk/nodejs/options/package.json index cb56da9aaa..3a158a004e 100644 --- a/tests/sdk/nodejs/options/package.json +++ b/tests/sdk/nodejs/options/package.json @@ -5,8 +5,8 @@ "@types/node": "^16" }, "dependencies": { - "@pulumi/pulumi": "^3.0.0", - "@pulumi/kubernetes": "^4.0.0", + "@pulumi/pulumi": "3.144.1", + "@pulumi/kubernetes": "4.19.0", "@pulumiverse/time": "^0.0.16" } }