@@ -12,8 +12,10 @@ import (
1212const resourceGroup = "geretain-test-postgres"
1313const defaultExampleTerraformDir = "examples/default"
1414const 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
1820func 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+
4875func TestRunUpgradeExample (t * testing.T ) {
4976 t .Parallel ()
5077
0 commit comments