Skip to content

remove resources.dll as it isnt needed #4416

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 24, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ Tests retrieval of classic administrators
function Test-RaClassicAdmins
{
# Setup
Add-Type -Path ".\\Microsoft.Azure.Commands.Resources.dll"
$subscription = Get-AzureRmSubscription

# Test
Expand All @@ -37,8 +36,6 @@ Tests verifies negative scenarios for RoleAssignments
function Test-RaNegativeScenarios
{
# Setup
Add-Type -Path ".\\Microsoft.Azure.Commands.Resources.dll"

$subscription = Get-AzureRmSubscription

# Bad OID returns zero role assignments
Expand Down Expand Up @@ -66,8 +63,6 @@ Tests verifies creation and deletion of a RoleAssignments by Scope
function Test-RaByScope
{
# Setup
Add-Type -Path ".\\Microsoft.Azure.Commands.Resources.dll"

$definitionName = 'Reader'
$users = Get-AzureRmADUser | Select-Object -First 1 -Wait
$subscription = Get-AzureRmSubscription
Expand Down Expand Up @@ -101,8 +96,6 @@ Tests verifies creation and deletion of a RoleAssignments by Resource Group
function Test-RaByResourceGroup
{
# Setup
Add-Type -Path ".\\Microsoft.Azure.Commands.Resources.dll"

$definitionName = 'Contributor'
$users = Get-AzureRmADUser | Select-Object -Last 1 -Wait
$resourceGroups = Get-AzureRmResourceGroup | Select-Object -Last 1 -Wait
Expand Down Expand Up @@ -134,8 +127,6 @@ Tests verifies creation and deletion of a RoleAssignments by Resource
function Test-RaByResource
{
# Setup
Add-Type -Path ".\\Microsoft.Azure.Commands.Resources.dll"

$definitionName = 'Owner'
$groups = Get-AzureRmADGroup | Select-Object -Last 1 -Wait
Assert-AreEqual 1 $groups.Count "There should be at least one group to run the test."
Expand Down Expand Up @@ -171,8 +162,6 @@ Tests validate input parameters
function Test-RaValidateInputParameters ($cmdName)
{
# Setup
Add-Type -Path ".\\Microsoft.Azure.Commands.Resources.dll"

$definitionName = 'Owner'
$groups = Get-AzureRmADGroup | Select-Object -Last 1 -Wait
Assert-AreEqual 1 $groups.Count "There should be at least one group to run the test."
Expand Down Expand Up @@ -224,8 +213,6 @@ Tests verifies creation and deletion of a RoleAssignments for Service principal
function Test-RaByServicePrincipal
{
# Setup
Add-Type -Path ".\\Microsoft.Azure.Commands.Resources.dll"

$definitionName = 'Reader'
$servicePrincipals = Get-AzureRmADServicePrincipal | Select-Object -Last 1 -Wait
$subscription = Get-AzureRmSubscription
Expand Down Expand Up @@ -260,8 +247,6 @@ Tests verifies creation and deletion of a RoleAssignments for User Principal Nam
function Test-RaByUpn
{
# Setup
Add-Type -Path ".\\Microsoft.Azure.Commands.Resources.dll"

$definitionName = 'Contributor'
$users = Get-AzureRmADUser | Select-Object -Last 1 -Wait
$resourceGroups = Get-AzureRmResourceGroup | Select-Object -Last 1 -Wait
Expand Down Expand Up @@ -290,9 +275,6 @@ function Test-RaByUpn
function Test-RaUserPermissions
{
param([string]$rgName, [string]$action)

# Setup

# Test
$rg = Get-AzureRmResourceGroup
$errorMsg = "User should have access to only 1 RG. Found: {0}" -f $rg.Count
Expand Down Expand Up @@ -321,8 +303,6 @@ Tests verifies creation and deletion of a RoleAssignments by Scope irrespective
function Test-RaDeletionByScope
{
# Setup
Add-Type -Path ".\\Microsoft.Azure.Commands.Resources.dll"

$definitionName = 'Reader'
$users = Get-AzureRmADUser | Select-Object -First 1 -Wait
$subscription = Get-AzureRmSubscription
Expand Down Expand Up @@ -358,8 +338,6 @@ function CreateRoleAssignment
{
param([string]$roleAssignmentId, [string]$userId, [string]$definitionName, [string]$resourceGroupName)

Add-Type -Path ".\\Microsoft.Azure.Commands.Resources.dll"

[Microsoft.Azure.Commands.Resources.Models.Authorization.AuthorizationClient]::RoleAssignmentNames.Enqueue($roleAssignmentId)
$newAssignment = New-AzureRmRoleAssignment `
-ObjectId $userId `
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ Tests verify scenarios for RoleDefinitions creation.
function Test-RoleDefinitionCreateTests
{
# Setup
Add-Type -Path ".\\Microsoft.Azure.Commands.Resources.dll"

# Basic positive case - read from file
$rdName = 'CustomRole Tests Role'
[Microsoft.Azure.Commands.Resources.Models.Authorization.AuthorizationClient]::RoleDefinitionNames.Enqueue("8D7DD69E-9AE2-44A1-94D8-F7BC8E12645E")
Expand Down Expand Up @@ -62,8 +60,6 @@ Tests verify negative scenarios for RoleDefinitions
function Test-RdNegativeScenarios
{
# Setup
Add-Type -Path ".\\Microsoft.Azure.Commands.Resources.dll"

# Does not throw when getting a non-existing role assignment
$rdName = 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa'
$rdNull = Get-AzureRmRoleDefinition -Name $rdName
Expand Down Expand Up @@ -104,8 +100,6 @@ Tests verify positive scenarios for RoleDefinitions.
function Test-RDPositiveScenarios
{
# Setup
Add-Type -Path ".\\Microsoft.Azure.Commands.Resources.dll"

# Create a role definition with Name rdNamme.
$rdName = 'Another tests role'
[Microsoft.Azure.Commands.Resources.Models.Authorization.AuthorizationClient]::RoleDefinitionNames.Enqueue("032F61D2-ED09-40C9-8657-26A273DA7BAE")
Expand Down Expand Up @@ -133,8 +127,6 @@ Verify positive and negative scenarios for RoleDefinition remove.
function Test-RDRemove
{
# Setup
Add-Type -Path ".\\Microsoft.Azure.Commands.Resources.dll"

# Create a role definition at RG Scope.
[Microsoft.Azure.Commands.Resources.Models.Authorization.AuthorizationClient]::RoleDefinitionNames.Enqueue("65E1D983-ECF4-42D4-8C08-5B1FD6E86335")

Expand Down Expand Up @@ -174,8 +166,6 @@ Verify positive and negative scenarios for RoleDefinition Get.
function Test-RDGet
{
# Setup
Add-Type -Path ".\\Microsoft.Azure.Commands.Resources.dll"

$subscription = Get-AzureRmSubscription

$resource = Get-AzureRmResource | Select-Object -Last 1 -Wait
Expand Down Expand Up @@ -246,8 +236,6 @@ Tests validate input parameters
function Test-RdValidateInputParameters ($cmdName)
{
# Setup
Add-Type -Path ".\\Microsoft.Azure.Commands.Resources.dll"

# Note: All below scenarios are invalid, we'll expect an exception during scope validation so the ID parameter doesn't need to be a valid one.

# Test
Expand Down Expand Up @@ -281,8 +269,6 @@ Tests validate input parameters
function Test-RdValidateInputParameters2 ($cmdName)
{
# Setup
Add-Type -Path ".\\Microsoft.Azure.Commands.Resources.dll"

# Note: All below scenarios are invalid, we'll expect an exception during scope validation so the ID parameter doesn't need to be a valid one.

$roleDef = Get-AzureRmRoleDefinition -Name "Reader"
Expand Down