File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -23,9 +23,18 @@ $testInfo = @{
23
23
FailureDetails = @ ();
24
24
Times = @ ()
25
25
}
26
- $randomValue = Get-Random - Minimum 1000 - Maximum 10000
27
- $resourceGroupName = " smokergtest$randomValue "
28
- $storageAccountName = " smokesatest$randomValue "
26
+
27
+ # Generate random suffix ^\d[\da-z]{9}$
28
+ $strarray = " 0123456789abcdefghijklmnopqurstuvxxyz"
29
+ $randomValue = $strarray [(Get-Random - Maximum 10 )]
30
+ for ($i = 0 ; $i -lt 9 ; $i ++ )
31
+ {
32
+ $randomValue += $strarray [(Get-Random - Maximum $strarray.Length )]
33
+ }
34
+ # The name of resource group is 1~90 charactors complying with ^[-\w\._\(\)]+$
35
+ $resourceGroupName = " azpssmokerg$randomValue "
36
+ # The name of storage account should be 3~24 lowercase letters and numbers.
37
+ $storageAccountName = " azpssmokesa$randomValue "
29
38
30
39
$resourceSetUpCommands = @ (
31
40
@ {Name = " Az.Resources" ; Command = {New-AzureRmResourceGroup - Name $resourceGroupName - Location westus - ErrorAction Stop}}
You can’t perform that action at this time.
0 commit comments