@@ -113,30 +113,35 @@ func TestRunFullyConfigurableSolutionSchematics(t *testing.T) {
113113 assert .Nil (t , err , "This should not have errored" )
114114}
115115
116- func TestRunSecurityEnforcedUpgradeSolution (t * testing.T ) {
116+ func TestRunSecurityEnforcedUpgradeSolutionSchematics (t * testing.T ) {
117117 t .Parallel ()
118118
119- options := testhelper .TestOptionsDefault (& testhelper.TestOptions {
120- Testing : t ,
121- TerraformDir : securityEnforcedSolutionTerraformDir ,
122- BestRegionYAMLPath : regionSelectionPath ,
123- Prefix : "mdb-se-da-upg" ,
124- ResourceGroup : resourceGroup ,
119+ options := testschematic .TestSchematicOptionsDefault (& testschematic.TestSchematicOptions {
120+ Testing : t ,
121+ Region : "us-south" ,
122+ Prefix : "mo-se-upg" ,
123+ ResourceGroup : resourceGroup ,
124+ TarIncludePatterns : []string {
125+ "*.tf" ,
126+ fullyConfigurableSolutionTerraformDir + "/*.tf" ,
127+ securityEnforcedSolutionTerraformDir + "/*.tf" ,
128+ },
129+ TemplateFolder : securityEnforcedSolutionTerraformDir ,
130+ Tags : []string {"mo-se-upg" },
131+ DeleteWorkspaceOnFail : false ,
132+ WaitJobCompleteMinutes : 120 ,
125133 CheckApplyResultForUpgrade : true ,
126134 })
127135
128- options .TerraformVars = map [ string ] interface {} {
129- "prefix" : options . Prefix ,
130- "access_tags" : permanentResources [ "accessTags" ] ,
131- "existing_kms_instance_crn" : permanentResources [ "hpcs_south_crn" ] ,
132- "existing_resource_group_name" : resourceGroup ,
136+ options .TerraformVars = []testschematic. TestSchematicTerraformVar {
137+ { Name : "ibmcloud_api_key" , Value : options . RequiredEnvironmentVars [ "TF_VAR_ibmcloud_api_key" ], DataType : "string" , Secure : true } ,
138+ { Name : "prefix" , Value : options . Prefix , DataType : "string" } ,
139+ { Name : "existing_resource_group_name" , Value : resourceGroup , DataType : "string" } ,
140+ { Name : "existing_kms_instance_crn" , Value : permanentResources [ "hpcs_south_crn" ], DataType : "string" } ,
133141 }
134142
135- output , err := options .RunTestUpgrade ()
136- if ! options .UpgradeTestSkipped {
137- assert .Nil (t , err , "This should not have errored" )
138- assert .NotNil (t , output , "Expected some output" )
139- }
143+ err := options .RunSchematicUpgradeTest ()
144+ assert .Nil (t , err , "This should not have errored" )
140145}
141146
142147func TestRunSecurityEnforcedSolutionSchematics (t * testing.T ) {
0 commit comments