Skip to content

Commit

Permalink
Skip refresh checks for tests that fail it
Browse files Browse the repository at this point in the history
  • Loading branch information
t0yv0 committed Dec 26, 2023
1 parent 8934e10 commit 7a0c666
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 15 deletions.
31 changes: 17 additions & 14 deletions examples/examples_nodejs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func TestAccExpress(t *testing.T) {
Dir: filepath.Join(getCwd(t), "express"),
RunUpdateTest: true,
})

skipRefresh(&test)
integration.ProgramTest(t, &test)
}

Expand Down Expand Up @@ -106,6 +106,7 @@ func TestAccBucket(t *testing.T) {
},
})

skipRefresh(&test)
integration.ProgramTest(t, &test)
}

Expand All @@ -115,7 +116,7 @@ func TestAccCloudWatch(t *testing.T) {
Dir: filepath.Join(getCwd(t), "cloudwatch"),
RunUpdateTest: true,
})

skipRefresh(&test)
integration.ProgramTest(t, &test)
}

Expand All @@ -125,7 +126,7 @@ func TestAccLogGroup(t *testing.T) {
Dir: filepath.Join(getCwd(t), "logGroup"),
RunUpdateTest: false,
})

skipRefresh(&test)
integration.ProgramTest(t, &test)
}

Expand All @@ -135,7 +136,7 @@ func TestAccQueue(t *testing.T) {
Dir: filepath.Join(getCwd(t), "queue"),
RunUpdateTest: true,
})

skipRefresh(&test)
integration.ProgramTest(t, &test)
}

Expand All @@ -144,7 +145,7 @@ func TestAccEventBus(t *testing.T) {
With(integration.ProgramTestOptions{
Dir: filepath.Join(getCwd(t), "eventbus"),
})

skipRefresh(&test)
integration.ProgramTest(t, &test)
}

Expand All @@ -154,7 +155,7 @@ func TestAccStream(t *testing.T) {
Dir: filepath.Join(getCwd(t), "stream"),
RunUpdateTest: true,
})

skipRefresh(&test)
integration.ProgramTest(t, &test)
}

Expand All @@ -164,7 +165,7 @@ func TestAccTable(t *testing.T) {
Dir: filepath.Join(getCwd(t), "table"),
RunUpdateTest: true,
})

skipRefresh(&test)
integration.ProgramTest(t, &test)
}

Expand All @@ -174,7 +175,7 @@ func TestAccTopic(t *testing.T) {
Dir: filepath.Join(getCwd(t), "topic"),
RunUpdateTest: true,
})

skipRefresh(&test)
integration.ProgramTest(t, &test)
}

Expand All @@ -189,7 +190,7 @@ func TestAccSecretCapture(t *testing.T) {
assert.NotContains(t, "s3cr3t", string(byts))
},
})

skipRefresh(&test)
integration.ProgramTest(t, &test)
}

Expand Down Expand Up @@ -225,6 +226,7 @@ func TestAccCallbackFunction(t *testing.T) {
}
},
})
skipRefresh(&test)
integration.ProgramTest(t, &test)
}

Expand Down Expand Up @@ -255,7 +257,7 @@ func TestAccRoute53(t *testing.T) {
Dir: filepath.Join(getCwd(t), "route53"),
RunUpdateTest: true,
})

skipRefresh(&test)
integration.ProgramTest(t, &test)
}

Expand All @@ -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)
}

Expand All @@ -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)
}

Expand All @@ -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)
}

Expand Down Expand Up @@ -316,7 +318,7 @@ func TestAccDeleteBeforeCreate(t *testing.T) {
},
},
})

skipRefresh(&test)
integration.ProgramTest(t, &test)
}

Expand Down Expand Up @@ -446,6 +448,7 @@ func TestAccWafV2(t *testing.T) {
With(integration.ProgramTestOptions{
Dir: filepath.Join(getCwd(t), "wafv2"),
})
skipRefresh(&test)
integration.ProgramTest(t, &test)
}

Expand Down
2 changes: 1 addition & 1 deletion examples/examples_py_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down
10 changes: 10 additions & 0 deletions examples/examples_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit 7a0c666

Please sign in to comment.