Skip to content

Commit 946b290

Browse files
Sync eng/common directory with azure-sdk-tools for PR 1953 (Azure#20466)
* Add random elements to default base name * Fix principal * tab Co-authored-by: JoshLove-msft <[email protected]>
1 parent e595715 commit 946b290

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

eng/common/TestResources/New-TestResources.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,8 @@ try {
289289
$AzureTestPrincipal
290290
} else {
291291
Log "TestApplicationId was not specified; creating a new service principal in subscription '$SubscriptionId'"
292-
$global:AzureTestPrincipal = New-AzADServicePrincipal -Role Owner -Scope "/subscriptions/$SubscriptionId" -DisplayName "test-resources-$($baseName).microsoft.com"
292+
$suffix = (New-Guid).ToString('n').Substring(0, 4)
293+
$global:AzureTestPrincipal = New-AzADServicePrincipal -Role Owner -Scope "/subscriptions/$SubscriptionId" -DisplayName "test-resources-$($baseName)$suffix.microsoft.com"
293294
$global:AzureTestSubscription = $SubscriptionId
294295

295296
Log "Created service principal '$($AzureTestPrincipal.ApplicationId)'"

0 commit comments

Comments
 (0)