Skip to content

Commit

Permalink
Sync eng/common directory with azure-sdk-tools for PR 1953 (#20466)
Browse files Browse the repository at this point in the history
* Add random elements to default base name

* Fix principal

* tab

Co-authored-by: JoshLove-msft <54595583+JoshLove-msft@users.noreply.github.com>
  • Loading branch information
2 people authored and iscai-msft committed Sep 29, 2021
1 parent f0a36c2 commit 6b83ae1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion eng/common/TestResources/New-TestResources.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,8 @@ try {
$AzureTestPrincipal
} else {
Log "TestApplicationId was not specified; creating a new service principal in subscription '$SubscriptionId'"
$global:AzureTestPrincipal = New-AzADServicePrincipal -Role Owner -Scope "/subscriptions/$SubscriptionId" -DisplayName "test-resources-$($baseName).microsoft.com"
$suffix = (New-Guid).ToString('n').Substring(0, 4)
$global:AzureTestPrincipal = New-AzADServicePrincipal -Role Owner -Scope "/subscriptions/$SubscriptionId" -DisplayName "test-resources-$($baseName)$suffix.microsoft.com"
$global:AzureTestSubscription = $SubscriptionId

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

0 comments on commit 6b83ae1

Please sign in to comment.