File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -229,7 +229,7 @@ resource "random_password" "admin_password" {
229229}
230230
231231locals {
232- # _- are invalid first characters
232+ # _- are invalid first characters.
233233 # if - replace first char with J
234234 # elseif _ replace first char with K
235235 # else use asis
Original file line number Diff line number Diff line change @@ -181,13 +181,20 @@ func TestRunStandardUpgradeSolution(t *testing.T) {
181181 ResourceGroup : resourceGroup ,
182182 })
183183
184+ // Generate a 15 char long random string for the admin_pass
185+ randomBytes := make ([]byte , 13 )
186+ _ , randErr := rand .Read (randomBytes )
187+ require .Nil (t , randErr ) // do not proceed if we can't gen a random password
188+
189+ randomPass := "A1" + base64 .URLEncoding .EncodeToString (randomBytes )[:13 ]
190+
184191 options .TerraformVars = map [string ]interface {}{
185192 "access_tags" : permanentResources ["accessTags" ],
186193 "existing_kms_instance_crn" : permanentResources ["hpcs_south_crn" ],
187194 "kms_endpoint_type" : "public" ,
188195 "provider_visibility" : "public" ,
189196 "resource_group_name" : options .Prefix ,
190- "admin_pass" : options . Prefix ,
197+ "admin_pass" : randomPass ,
191198 }
192199
193200 output , err := options .RunTestUpgrade ()
You can’t perform that action at this time.
0 commit comments