Skip to content

Commit 5dd1359

Browse files
authored
tests: add test for custom sg (#362)
1 parent 808160b commit 5dd1359

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

tests/other_test.go

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,28 @@ func TestRunAddRulesToSGExample(t *testing.T) {
8989
assert.NotNil(t, output, "Expected some output")
9090
}
9191

92+
func TestCustomSGExample(t *testing.T) {
93+
t.Parallel()
94+
options := testhelper.TestOptionsDefaultWithVars(&testhelper.TestOptions{
95+
Testing: t,
96+
TerraformDir: "examples/custom_sg",
97+
Prefix: "cust-sg",
98+
ResourceGroup: resourceGroup,
99+
ImplicitDestroy: []string{
100+
"module.ocp_base.null_resource.confirm_network_healthy",
101+
"module.ocp_base.null_resource.reset_api_key",
102+
},
103+
// Do not hard fail the test if the implicit destroy steps fail to allow a full destroy of resource to occur
104+
ImplicitRequired: false,
105+
TerraformVars: map[string]interface{}{
106+
"ocp_version": ocpVersion1,
107+
},
108+
})
109+
output, err := options.RunTestConsistency()
110+
assert.Nil(t, err, "This should not have errored")
111+
assert.NotNil(t, output, "Expected some output")
112+
}
113+
92114
func TestCrossKmsSupportExample(t *testing.T) {
93115
t.Parallel()
94116

0 commit comments

Comments
 (0)