Skip to content

Commit 24d5bb4

Browse files
author
akocbek
committed
add simple test
1 parent 28e7758 commit 24d5bb4

File tree

1 file changed

+26
-3
lines changed

1 file changed

+26
-3
lines changed

tests/pr_test.go

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,9 +190,10 @@ func TestUpgradeCEProjectDA(t *testing.T) {
190190
t.Parallel()
191191

192192
options := testhelper.TestOptionsDefault(&testhelper.TestOptions{
193-
Testing: t,
194-
TerraformDir: projectSolutionsDir,
195-
Prefix: "ce-da",
193+
Testing: t,
194+
TerraformDir: projectSolutionsDir,
195+
Prefix: "ce-da",
196+
CheckApplyResultForUpgrade: true,
196197
})
197198

198199
options.TerraformVars = map[string]interface{}{
@@ -365,3 +366,25 @@ func writeTfvarsFile(t *testing.T, path string, vars map[string]interface{}) err
365366
}
366367
return err
367368
}
369+
370+
// test edge case when only empty project is created
371+
func TestCEProjectDABasic(t *testing.T) {
372+
t.Parallel()
373+
374+
options := testhelper.TestOptionsDefault(&testhelper.TestOptions{
375+
Testing: t,
376+
TerraformDir: projectSolutionsDir,
377+
Prefix: "ce-da-empty",
378+
})
379+
380+
options.TerraformVars = map[string]interface{}{
381+
"existing_resource_group_name": resourceGroup,
382+
"provider_visibility": "public",
383+
"prefix": options.Prefix,
384+
"project_name": "proj-test",
385+
}
386+
387+
output, err := options.RunTestConsistency()
388+
assert.Nil(t, err, "This should not have errored")
389+
assert.NotNil(t, output, "Expected some output")
390+
}

0 commit comments

Comments
 (0)