@@ -17,6 +17,7 @@ const resourceGroup = "geretain-test-resources"
1717const appsExampleDir = "examples/apps"
1818const jobsExampleDir = "examples/jobs"
1919const appsSolutionsDir = "solutions/apps"
20+ const projectSolutionsDir = "solutions/project"
2021
2122// Define a struct with fields that match the structure of the YAML data
2223const yamlLocation = "../common-dev-assets/common-go-assets/common-permanent-resources.yaml"
@@ -132,8 +133,7 @@ func TestRunAppSolutionInSchematics(t *testing.T) {
132133
133134 options .TerraformVars = []testschematic.TestSchematicTerraformVar {
134135 {Name : "ibmcloud_api_key" , Value : options .RequiredEnvironmentVars ["TF_VAR_ibmcloud_api_key" ], DataType : "string" , Secure : true },
135- {Name : "resource_group_name" , Value : options .ResourceGroup , DataType : "string" },
136- {Name : "existing_resource_group" , Value : true , DataType : "bool" },
136+ {Name : "existing_resource_group_name" , Value : options .ResourceGroup , DataType : "string" },
137137 {Name : "prefix" , Value : options .Prefix , DataType : "string" },
138138 {Name : "app_name" , Value : options .Prefix + "-app" , DataType : "string" },
139139 {Name : "image_reference" , Value : "icr.io/codeengine/helloworld" , DataType : "string" },
@@ -163,16 +163,15 @@ func TestRunUpgradeAppSolution(t *testing.T) {
163163 },
164164 }
165165 options .TerraformVars = map [string ]interface {}{
166- "ibmcloud_api_key" : options .RequiredEnvironmentVars ["TF_VAR_ibmcloud_api_key" ],
167- "resource_group_name" : resourceGroup ,
168- "existing_resource_group" : true ,
169- "app_name" : options .Prefix + "-app" ,
170- "image_reference" : "icr.io/codeengine/helloworld" ,
171- "provider_visibility" : "public" ,
172- "prefix" : options .Prefix ,
173- "secrets" : "{" + options .Prefix + "-secret:{format:\" generic\" , data:{ key_1 : \" value_1\" }}}" , // pragma: allowlist secret
174- "config_maps" : "{" + options .Prefix + "-cm:{data:{ key_1 : \" value_1\" }}}" ,
175- "project_name" : options .Prefix + "-pro" ,
166+ "ibmcloud_api_key" : options .RequiredEnvironmentVars ["TF_VAR_ibmcloud_api_key" ],
167+ "existing_resource_group_name" : resourceGroup ,
168+ "app_name" : options .Prefix + "-app" ,
169+ "image_reference" : "icr.io/codeengine/helloworld" ,
170+ "provider_visibility" : "public" ,
171+ "prefix" : options .Prefix ,
172+ "secrets" : "{" + options .Prefix + "-secret:{format:\" generic\" , data:{ key_1 : \" value_1\" }}}" , // pragma: allowlist secret
173+ "config_maps" : "{" + options .Prefix + "-cm:{data:{ key_1 : \" value_1\" }}}" ,
174+ "project_name" : options .Prefix + "-pro" ,
176175 }
177176
178177 output , err := options .RunTestUpgrade ()
@@ -187,16 +186,15 @@ func TestUpgradeCEProjectDA(t *testing.T) {
187186
188187 options := testhelper .TestOptionsDefault (& testhelper.TestOptions {
189188 Testing : t ,
190- TerraformDir : "solutions/project" ,
189+ TerraformDir : projectSolutionsDir ,
191190 Prefix : "ce-da" ,
192191 })
193192
194193 options .TerraformVars = map [string ]interface {}{
195- "resource_group_name" : resourceGroup ,
196- "existing_resource_group" : true ,
197- "provider_visibility" : "public" ,
198- "prefix" : options .Prefix ,
199- "project_name" : "test-1" ,
194+ "existing_resource_group_name" : resourceGroup ,
195+ "provider_visibility" : "public" ,
196+ "prefix" : options .Prefix ,
197+ "project_name" : "test-1" ,
200198 }
201199
202200 output , err := options .RunTestUpgrade ()
@@ -212,16 +210,15 @@ func TestDeployCEProjectDA(t *testing.T) {
212210
213211 options := testhelper .TestOptionsDefault (& testhelper.TestOptions {
214212 Testing : t ,
215- TerraformDir : "solutions/project" ,
213+ TerraformDir : projectSolutionsDir ,
216214 Prefix : "ce-da" ,
217215 })
218216
219217 options .TerraformVars = map [string ]interface {}{
220- "resource_group_name" : resourceGroup ,
221- "existing_resource_group" : true ,
222- "prefix" : options .Prefix ,
223- "provider_visibility" : "public" ,
224- "project_name" : "test-1" ,
218+ "existing_resource_group_name" : resourceGroup ,
219+ "prefix" : options .Prefix ,
220+ "provider_visibility" : "public" ,
221+ "project_name" : "test-1" ,
225222 }
226223
227224 output , err := options .RunTestConsistency ()
0 commit comments