Azure / Azure/azure-powershell
Fix ActiveDirectroy secenario test
Open
bug
Test Infra
- Dominant language
- C#
- Stars
- 4.8k
- Forks
- 4.3k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 51
Description
## Description
Test-NewADServicePrincipalWithoutApp in ActiveDirectroy secenario test is legary now.
````
# Test
$servicePrincipal = New-AzADServicePrincipal -DisplayName $displayName
$role = Get-AzRoleAssignment -ObjectId $servicePrincipal.Id
# Assert
Assert-NotNull $servicePrincipal
Assert-AreEqual $servicePrincipal.DisplayName $displayName
Assert-Null $role
````
When role is not specified explicitly, New-AzADServicePrincipal has a default role, which is "Contributor". And so the $role is not nul in the test case.
## Cost
Contributor guide
Assessment
This issue has not been assessed yet.