Skip to content

Commit

Permalink
Sync eng/common directory with azure-sdk-tools for PR 1953 (Azure#15413)
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 vindicatesociety committed Sep 18, 2021
1 parent c2137e2 commit d9b9ccf
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 d9b9ccf

Please sign in to comment.