File tree Expand file tree Collapse file tree 1 file changed +0
-34
lines changed
src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests Expand file tree Collapse file tree 1 file changed +0
-34
lines changed Original file line number Diff line number Diff line change @@ -345,40 +345,6 @@ function Test-RaDeletionByScope
345
345
VerifyRoleAssignmentDeleted $newAssignment
346
346
}
347
347
348
- <#
349
- . SYNOPSIS
350
- Tests verifies creation and deletion of a RoleAssignments by Scope irrespective of the case
351
- #>
352
- function Test-RaDeletionByScope
353
- {
354
- # Setup
355
- $definitionName = ' Reader'
356
- $users = Get-AzureRmADUser | Select-Object - First 1 - Wait
357
- $subscription = Get-AzureRmSubscription
358
- $resourceGroups = Get-AzureRmResourceGroup | Select-Object - Last 1 - Wait
359
- $scope = ' /subscriptions/' + $subscription [0 ].Id + ' /resourceGroups/' + $resourceGroups [0 ].ResourceGroupName
360
- Assert-AreEqual 1 $users.Count " There should be at least one user to run the test."
361
-
362
- # Test
363
- [Microsoft.Azure.Commands.Resources.Models.Authorization.AuthorizationClient ]::RoleAssignmentNames.Enqueue(" fa1a4d3b-2cca-406b-8956-6b6b32377641" )
364
- $newAssignment = New-AzureRmRoleAssignment `
365
- - ObjectId $users [0 ].Id.Guid `
366
- - RoleDefinitionName $definitionName `
367
- - Scope $scope
368
- $newAssignment.Scope = $scope.toUpper ()
369
-
370
- # cleanup
371
- DeleteRoleAssignment $newAssignment
372
-
373
- # Assert
374
- Assert-NotNull $newAssignment
375
- Assert-AreEqual $definitionName $newAssignment.RoleDefinitionName
376
- Assert-AreEqual $scope $newAssignment.Scope
377
- Assert-AreEqual $users [0 ].DisplayName $newAssignment.DisplayName
378
-
379
- VerifyRoleAssignmentDeleted $newAssignment
380
- }
381
-
382
348
<#
383
349
. SYNOPSIS
384
350
Tests verifies creation and deletion of a RoleAssignments by Scope irrespective of the case
You can’t perform that action at this time.
0 commit comments