From 7a0c666cc0afe196873d8c7bd562bdd0596492d2 Mon Sep 17 00:00:00 2001 From: Anton Tayanovskyy Date: Tue, 26 Dec 2023 16:20:14 -0500 Subject: [PATCH] Skip refresh checks for tests that fail it --- examples/examples_nodejs_test.go | 31 +++++++++++++++++-------------- examples/examples_py_test.go | 2 +- examples/examples_test.go | 10 ++++++++++ 3 files changed, 28 insertions(+), 15 deletions(-) diff --git a/examples/examples_nodejs_test.go b/examples/examples_nodejs_test.go index a3dcbcc4a39..612bc16c06b 100644 --- a/examples/examples_nodejs_test.go +++ b/examples/examples_nodejs_test.go @@ -66,7 +66,7 @@ func TestAccExpress(t *testing.T) { Dir: filepath.Join(getCwd(t), "express"), RunUpdateTest: true, }) - + skipRefresh(&test) integration.ProgramTest(t, &test) } @@ -106,6 +106,7 @@ func TestAccBucket(t *testing.T) { }, }) + skipRefresh(&test) integration.ProgramTest(t, &test) } @@ -115,7 +116,7 @@ func TestAccCloudWatch(t *testing.T) { Dir: filepath.Join(getCwd(t), "cloudwatch"), RunUpdateTest: true, }) - + skipRefresh(&test) integration.ProgramTest(t, &test) } @@ -125,7 +126,7 @@ func TestAccLogGroup(t *testing.T) { Dir: filepath.Join(getCwd(t), "logGroup"), RunUpdateTest: false, }) - + skipRefresh(&test) integration.ProgramTest(t, &test) } @@ -135,7 +136,7 @@ func TestAccQueue(t *testing.T) { Dir: filepath.Join(getCwd(t), "queue"), RunUpdateTest: true, }) - + skipRefresh(&test) integration.ProgramTest(t, &test) } @@ -144,7 +145,7 @@ func TestAccEventBus(t *testing.T) { With(integration.ProgramTestOptions{ Dir: filepath.Join(getCwd(t), "eventbus"), }) - + skipRefresh(&test) integration.ProgramTest(t, &test) } @@ -154,7 +155,7 @@ func TestAccStream(t *testing.T) { Dir: filepath.Join(getCwd(t), "stream"), RunUpdateTest: true, }) - + skipRefresh(&test) integration.ProgramTest(t, &test) } @@ -164,7 +165,7 @@ func TestAccTable(t *testing.T) { Dir: filepath.Join(getCwd(t), "table"), RunUpdateTest: true, }) - + skipRefresh(&test) integration.ProgramTest(t, &test) } @@ -174,7 +175,7 @@ func TestAccTopic(t *testing.T) { Dir: filepath.Join(getCwd(t), "topic"), RunUpdateTest: true, }) - + skipRefresh(&test) integration.ProgramTest(t, &test) } @@ -189,7 +190,7 @@ func TestAccSecretCapture(t *testing.T) { assert.NotContains(t, "s3cr3t", string(byts)) }, }) - + skipRefresh(&test) integration.ProgramTest(t, &test) } @@ -225,6 +226,7 @@ func TestAccCallbackFunction(t *testing.T) { } }, }) + skipRefresh(&test) integration.ProgramTest(t, &test) } @@ -255,7 +257,7 @@ func TestAccRoute53(t *testing.T) { Dir: filepath.Join(getCwd(t), "route53"), RunUpdateTest: true, }) - + skipRefresh(&test) integration.ProgramTest(t, &test) } @@ -265,7 +267,7 @@ func TestAccLambdaLayer(t *testing.T) { Dir: filepath.Join(getCwd(t), "lambda-layer-old"), RunUpdateTest: true, }) - + skipRefresh(&test) integration.ProgramTest(t, &test) } @@ -275,7 +277,7 @@ func TestAccLambdaContainerImages(t *testing.T) { RunUpdateTest: false, // new feature! Dir: filepath.Join(getCwd(t), "lambda-container-image"), }) - + skipRefresh(&test) integration.ProgramTest(t, &test) } @@ -285,7 +287,7 @@ func TestAccLambdaLayerNewEnums(t *testing.T) { Dir: filepath.Join(getCwd(t), "lambda-layer-new"), RunUpdateTest: false, }) - + skipRefresh(&test) integration.ProgramTest(t, &test) } @@ -316,7 +318,7 @@ func TestAccDeleteBeforeCreate(t *testing.T) { }, }, }) - + skipRefresh(&test) integration.ProgramTest(t, &test) } @@ -446,6 +448,7 @@ func TestAccWafV2(t *testing.T) { With(integration.ProgramTestOptions{ Dir: filepath.Join(getCwd(t), "wafv2"), }) + skipRefresh(&test) integration.ProgramTest(t, &test) } diff --git a/examples/examples_py_test.go b/examples/examples_py_test.go index c925b4b0bea..a2974a349b9 100644 --- a/examples/examples_py_test.go +++ b/examples/examples_py_test.go @@ -41,7 +41,7 @@ func TestAccCodeBuildProjectPy(t *testing.T) { Dir: filepath.Join(getCwd(t), "codebuild-project-py"), RunUpdateTest: false, }) - + skipRefresh(&test) integration.ProgramTest(t, &test) } diff --git a/examples/examples_test.go b/examples/examples_test.go index 392989d5c36..f6632119226 100644 --- a/examples/examples_test.go +++ b/examples/examples_test.go @@ -585,3 +585,13 @@ func TestWrongStateMaxItemOneDiffProduced(t *testing.T) { ` replay(t, repro) } + +// A lot of tests do not currently refresh cleanly. The work to root cause each tests has not been +// done yet but the common causes are listed here: +// +// TODO[pulumi/pulumi-aws#2246] specifically affects overlays such as bucket.onObjectCreated; may be worked around +// TODO[pulumi/pulumi#6235] +// TODO[pulumi/pulumi-terraform-bridge#1595] +func skipRefresh(opts *integration.ProgramTestOptions) { + opts.SkipRefresh = true +}