Skip to content

Commit f9b2cfe

Browse files
committed
test: test addition
1 parent 9a21fa9 commit f9b2cfe

File tree

1 file changed

+28
-1
lines changed

1 file changed

+28
-1
lines changed

tests/pr_test.go

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,10 @@ import (
1212
const resourceGroup = "geretain-test-postgres"
1313
const defaultExampleTerraformDir = "examples/default"
1414
const autoscaleExampleTerraformDir = "examples/autoscale"
15+
const completeExampleTerraformDir = "examples/complete"
1516

16-
// const completeExampleTerraformDir = "examples/complete"
17+
// Restricting due to limited availability of BYOK in certain regions
18+
const regionSelectionPath = "../common-dev-assets/common-go-assets/icd-region-prefs.yaml"
1719

1820
func TestRunDefaultExample(t *testing.T) {
1921
t.Parallel()
@@ -45,6 +47,31 @@ func TestRunAutoscaleExample(t *testing.T) {
4547
assert.NotNil(t, output, "Expected some output")
4648
}
4749

50+
func testRunCompleteExample(t *testing.T, version string) {
51+
t.Parallel()
52+
options := testhelper.TestOptionsDefaultWithVars(&testhelper.TestOptions{
53+
Testing: t,
54+
TerraformDir: completeExampleTerraformDir,
55+
Prefix: "pg-complete",
56+
ResourceGroup: resourceGroup,
57+
BestRegionYAMLPath: regionSelectionPath,
58+
TerraformVars: map[string]interface{}{
59+
"pg_version": version,
60+
},
61+
})
62+
output, err := options.RunTestConsistency()
63+
assert.Nil(t, err, "This should not have errored")
64+
assert.NotNil(t, output, "Expected some output")
65+
}
66+
67+
func TestRunCompleteExample(t *testing.T) {
68+
t.Parallel()
69+
versions := []string{"11", "12", "13", "14"}
70+
for _, version := range versions {
71+
t.Run(version, func(t *testing.T) { testRunCompleteExample(t, version) })
72+
}
73+
}
74+
4875
func TestRunUpgradeExample(t *testing.T) {
4976
t.Parallel()
5077

0 commit comments

Comments
 (0)