@@ -48,37 +48,20 @@ func TestMain(m *testing.M) {
48
48
os .Exit (m .Run ())
49
49
}
50
50
51
- func setupOptionsStandardSolution (t * testing.T , prefix string ) * testhelper.TestOptions {
51
+ func setupOptionsStandardSolution (t * testing.T , prefix string , powervs_zone string ) * testhelper.TestOptions {
52
52
53
53
options := testhelper .TestOptionsDefault (& testhelper.TestOptions {
54
- Testing : t ,
55
- TerraformDir : defaultExampleTerraformDir ,
56
- Prefix : prefix ,
57
- ResourceGroup : resourceGroup ,
58
- Region : "us-south" , // specify default region to skip best choice query
59
- DefaultRegion : "dal10" ,
60
- BestRegionYAMLPath : "./common-go-assets/cloudinfo-region-power-prefs.yaml" , // specific to powervs zones
61
- // temporary workaround for BSS backend issue
62
- ImplicitDestroy : []string {
63
- "module.standard.module.landing_zone.module.landing_zone.ibm_resource_group.resource_groups" ,
64
- },
54
+ Testing : t ,
55
+ TerraformDir : defaultExampleTerraformDir ,
56
+ Prefix : prefix ,
57
+ ResourceGroup : resourceGroup ,
58
+ Region : powervs_zone ,
65
59
})
66
60
67
- // query for best zone to deploy powervs example, based on current connection count
68
- // NOTE: this is why we do not want to run multiple tests in parallel.
69
- options .Region , _ = testhelper .GetBestPowerSystemsRegionO (options .RequiredEnvironmentVars ["TF_VAR_ibmcloud_api_key" ], options .BestRegionYAMLPath , options .DefaultRegion ,
70
- testhelper.TesthelperTerraformOptions {CloudInfoService : sharedInfoSvc })
71
- // if for any reason the region is empty at this point, such as error, use default
72
- if len (options .Region ) == 0 {
73
- options .Region = options .DefaultRegion
74
- }
75
-
76
61
options .TerraformVars = map [string ]interface {}{
77
62
"prefix" : options .Prefix ,
78
63
"powervs_resource_group_name" : options .ResourceGroup ,
79
64
"external_access_ip" : "0.0.0.0/0" ,
80
- // locking into syd05 due to other data center issues
81
- //"powervs_zone": "syd05",
82
65
"powervs_zone" : options .Region ,
83
66
"existing_sm_instance_guid" : permanentResources ["secretsManagerGuid" ],
84
67
"existing_sm_instance_region" : permanentResources ["secretsManagerRegion" ],
@@ -94,7 +77,7 @@ func setupOptionsStandardSolution(t *testing.T, prefix string) *testhelper.TestO
94
77
func TestRunBranchStandardExample (t * testing.T ) {
95
78
t .Parallel ()
96
79
97
- options := setupOptionsStandardSolution (t , "pvs-i-b" )
80
+ options := setupOptionsStandardSolution (t , "pvs-i-b" , "osa21" )
98
81
99
82
output , err := options .RunTestConsistency ()
100
83
assert .Nil (t , err , "This should not have errored" )
@@ -103,77 +86,11 @@ func TestRunBranchStandardExample(t *testing.T) {
103
86
104
87
func TestRunMainStandardExample (t * testing.T ) {
105
88
t .Parallel ()
106
- options := setupOptionsStandardSolution (t , "pvs-i-m" )
107
-
108
- output , err := options .RunTestUpgrade ()
109
- if ! options .UpgradeTestSkipped {
110
- assert .Nil (t , err , "This should not have errored" )
111
- assert .NotNil (t , output , "Expected some output" )
112
- }
113
- }
114
-
115
- /*
116
- // quickstart =standard-plus-vsi
117
- func setupOptionsQuickstartSolution(t *testing.T, prefix string) *testhelper.TestOptions {
118
-
119
- options := testhelper.TestOptionsDefault(&testhelper.TestOptions{
120
- Testing: t,
121
- TerraformDir: quickstartExampleTerraformDir,
122
- Prefix: prefix,
123
- ResourceGroup: resourceGroup,
124
- Region: "us-south", // specify default region to skip best choice query
125
- DefaultRegion: "dal10",
126
- BestRegionYAMLPath: "./common-go-assets/cloudinfo-region-power-prefs.yaml", // specific to powervs zones
127
- // temporary workaround for BSS backend issue
128
- ImplicitDestroy: []string{
129
- "module.standard.module.landing_zone.module.landing_zone.ibm_resource_group.resource_groups",
130
- },
131
- })
132
-
133
- // query for best zone to deploy powervs example, based on current connection count
134
- // NOTE: this is why we do not want to run multiple tests in parallel.
135
- options.Region, _ = testhelper.GetBestPowerSystemsRegionO(options.RequiredEnvironmentVars["TF_VAR_ibmcloud_api_key"], options.BestRegionYAMLPath, options.DefaultRegion,
136
- testhelper.TesthelperTerraformOptions{CloudInfoService: sharedInfoSvc})
137
- // if for any reason the region is empty at this point, such as error, use default
138
- if len(options.Region) == 0 {
139
- options.Region = options.DefaultRegion
140
- }
141
-
142
- options.TerraformVars = map[string]interface{}{
143
- "prefix": options.Prefix,
144
- "powervs_resource_group_name": options.ResourceGroup,
145
- "external_access_ip": "0.0.0.0/0",
146
- "tshirt_size": map[string]string{
147
- "image": "7300-02-02",
148
- "tshirt_size": "aix_xs",
149
- },
150
- "powervs_zone": options.Region,
151
- "existing_sm_instance_guid": permanentResources["secretsManagerGuid"],
152
- "existing_sm_instance_region": permanentResources["secretsManagerRegion"],
153
- }
154
-
155
- return options
156
- }
157
-
158
- func TestRunBranchQuickstartExample(t *testing.T) {
159
- t.Parallel()
160
-
161
- options := setupOptionsQuickstartSolution(t, "pvs-qs-b")
162
-
163
- output, err := options.RunTestConsistency()
164
- assert.Nil(t, err, "This should not have errored")
165
- assert.NotNil(t, output, "Expected some output")
166
- }
167
-
168
- func TestRunMainQuickstartExample(t *testing.T) {
169
- t.Parallel()
170
- options := setupOptionsQuickstartSolution(t, "pvs-qs-m")
89
+ options := setupOptionsStandardSolution (t , "pvs-i-m" , "dal10" )
171
90
172
91
output , err := options .RunTestUpgrade ()
173
92
if ! options .UpgradeTestSkipped {
174
93
assert .Nil (t , err , "This should not have errored" )
175
94
assert .NotNil (t , output , "Expected some output" )
176
95
}
177
-
178
96
}
179
- */
0 commit comments