Skip to content

Commit f34e083

Browse files
ccushingcodycushing
authored andcommitted
Support suppressing tests that require a custom docker image to pass
1 parent 946994e commit f34e083

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

oci/examples_test.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,23 @@ var examplesTestAllowedEnvironmentVariables = []string{
5353
}
5454

5555
func TestExamplesPlan(t *testing.T) {
56+
if strings.Contains(getEnvSettingWithBlankDefault("suppressed_tests"), "TestExamplesPlan") {
57+
t.Skip("Skipping TestExamplesPlan")
58+
}
5659
RunExamples(t, true)
5760
}
5861

5962
func TestExamplesApply(t *testing.T) {
63+
if strings.Contains(getEnvSettingWithBlankDefault("suppressed_tests"), "TestExamplesApply") {
64+
t.Skip("Skipping TestExamplesApply")
65+
}
6066
RunExamples(t, false)
6167
}
6268

6369
func TestTerraformVersions(t *testing.T) {
70+
if strings.Contains(getEnvSettingWithBlankDefault("suppressed_tests"), "TestTerraformVersions") {
71+
t.Skip("Skipping TestTerraformVersions")
72+
}
6473
if RunConfigOnAllTerraformVersions(t, vcnExamplePath, false) {
6574
log.Printf("Successfully ran all Terraform version tests")
6675
}

0 commit comments

Comments
 (0)