Skip to content
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
10 changes: 7 additions & 3 deletions src/ResourceManager/Resources/AzureRM.Resources.Netcore.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ RequiredModules = @(@{ModuleName = 'AzureRM.Profile.Netcore'; ModuleVersion = '0
# Assemblies that must be loaded prior to importing this module
RequiredAssemblies = '.\Microsoft.Azure.Management.Authorization.dll',
'.\Microsoft.Azure.Commands.ResourceManager.Cmdlets.dll',
'.\Microsoft.Azure.Management.ResourceManager.dll'
'.\Microsoft.Azure.Management.ResourceManager.dll',
'.\Microsoft.Azure.Management.ManagementGroups.dll'

# Script files (.ps1) that are run in the caller's environment prior to importing this module.
ScriptsToProcess = @()
Expand Down Expand Up @@ -119,7 +120,10 @@ CmdletsToExport = 'Get-AzureRmProviderOperation', 'Remove-AzureRmRoleAssignment'
'Set-AzureRmManagedApplicationDefinition',
'Remove-AzureRmManagedApplicationDefinition',
'Get-AzureRmManagedApplication', 'New-AzureRmManagedApplication',
'Set-AzureRmManagedApplication', 'Remove-AzureRmManagedApplication'
'Set-AzureRmManagedApplication', 'Remove-AzureRmManagedApplication',
'Get-AzureRmManagementGroup', 'New-AzureRmManagementGroup',
'Update-AzureRmManagementGroup', 'Remove-AzureRmManagementGroup',
'New-AzureRmManagementGroupSubscription', 'Remove-AzureRmManagementGroupSubscription'

# Variables to export from this module
# VariablesToExport = @()
Expand All @@ -142,7 +146,7 @@ PrivateData = @{
PSData = @{

# Tags applied to this module. These help with module discovery in online galleries.
Tags = 'Azure','ResourceManager','ARM','Provider','ResourceGroup','Deployment','ActiveDirectory','Authorization'
Tags = 'Azure','ResourceManager','ARM','Provider','ResourceGroup','Deployment','ActiveDirectory','Authorization', 'Management','ManagementGroups'

# A URL to the license for this module.
LicenseUri = 'https://aka.ms/azps-license'
Expand Down
10 changes: 7 additions & 3 deletions src/ResourceManager/Resources/AzureRM.Resources.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ RequiredModules = @(@{ModuleName = 'AzureRM.Profile'; ModuleVersion = '5.1.0'; }

# Assemblies that must be loaded prior to importing this module
RequiredAssemblies = '.\Microsoft.Azure.Management.ResourceManager.dll',
'.\Microsoft.Azure.Management.Authorization.dll'
'.\Microsoft.Azure.Management.Authorization.dll',
'.\Microsoft.Azure.Management.ManagementGroups.dll'

# Script files (.ps1) that are run in the caller's environment prior to importing this module.
# ScriptsToProcess = @()
Expand Down Expand Up @@ -120,7 +121,10 @@ CmdletsToExport = 'Get-AzureRmProviderOperation', 'Remove-AzureRmRoleAssignment'
'Set-AzureRmManagedApplicationDefinition',
'Remove-AzureRmManagedApplicationDefinition',
'Get-AzureRmManagedApplication', 'New-AzureRmManagedApplication',
'Set-AzureRmManagedApplication', 'Remove-AzureRmManagedApplication'
'Set-AzureRmManagedApplication', 'Remove-AzureRmManagedApplication',
'Get-AzureRmManagementGroup', 'New-AzureRmManagementGroup',
'Update-AzureRmManagementGroup', 'Remove-AzureRmManagementGroup',
'New-AzureRmManagementGroupSubscription', 'Remove-AzureRmManagementGroupSubscription'

# Variables to export from this module
# VariablesToExport = @()
Expand Down Expand Up @@ -148,7 +152,7 @@ PrivateData = @{
PSData = @{

# Tags applied to this module. These help with module discovery in online galleries.
Tags = 'Azure','ResourceManager','ARM','Provider','ResourceGroup','Deployment','ActiveDirectory','Authorization'
Tags = 'Azure','ResourceManager','ARM','Provider','ResourceGroup','Deployment','ActiveDirectory','Authorization', 'Management','ManagementGroups'

# A URL to the license for this module.
LicenseUri = 'https://aka.ms/azps-license'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@
<Reference Include="Microsoft.Azure.Insights">
<HintPath>..\..\..\packages\Microsoft.Azure.Insights.0.10.0-preview\lib\net45\Microsoft.Azure.Insights.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Azure.Management.ManagementGroups, Version=1.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Microsoft.Azure.Management.ManagementGroups.1.1.0-preview\lib\net452\Microsoft.Azure.Management.ManagementGroups.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Azure.Management.ResourceManager, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\packages\Microsoft.Azure.Management.ResourceManager.1.6.0-preview\lib\net452\Microsoft.Azure.Management.ResourceManager.dll</HintPath>
Expand Down Expand Up @@ -173,6 +176,7 @@
</Content>
<Compile Include="ScenarioTests\LocationTests.cs" />
<Compile Include="ScenarioTests\ManagedApplicationTests.cs" />
<Compile Include="ScenarioTests\ManagementGroupsTests.cs" />
<Compile Include="ScenarioTests\MoveResourceTest.cs" />
<Compile Include="ScenarioTests\ManagedApplicationDefinitionTests.cs" />
<Compile Include="ScenarioTests\ProviderFeatureTests.cs" />
Expand Down Expand Up @@ -320,6 +324,9 @@
<None Include="ScenarioTests\ManagedApplicationTests.ps1">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="ScenarioTests\ManagementGroupsTests.ps1">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="ScenarioTests\MoveResourceTest.ps1">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
Expand Down Expand Up @@ -398,6 +405,42 @@
<None Include="SessionRecords\Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ManagedApplicationTests\TestManagedApplicationCRUD.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ManagementGroupsTests\TestGetManagementGroup.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ManagementGroupsTests\TestGetManagementGroupWithExpand.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ManagementGroupsTests\TestGetManagementGroupWithExpandAndRecurse.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ManagementGroupsTests\TestNewManagementGroup.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ManagementGroupsTests\TestNewManagementGroupWithDisplayName.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ManagementGroupsTests\TestNewManagementGroupWithDisplayNameAndParentId.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ManagementGroupsTests\TestNewManagementGroupWithParentId.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ManagementGroupsTests\TestNewRemoveManagementGroupSubscription.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ManagementGroupsTests\TestRemoveManagementGroup.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ManagementGroupsTests\TestUpdateManagementGroupWithDisplayName.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ManagementGroupsTests\TestUpdateManagementGroupWithDisplayNameAndParentId.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ManagementGroupsTests\TestUpdateManagementGroupWithParentId.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.Azure.Commands.Resources.Test.ScenarioTests.MoveResourceTest\TestMoveAzureResource.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
// ----------------------------------------------------------------------------------
//
// Copyright Microsoft Corporation
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// ----------------------------------------------------------------------------------

using Microsoft.Azure.ServiceManagemenet.Common.Models;
using Microsoft.WindowsAzure.Commands.ScenarioTest;
using Xunit;

namespace Microsoft.Azure.Commands.Resources.Test.ScenarioTests
{
public class ManagementGroupsTests
{
public ManagementGroupsTests(Xunit.Abstractions.ITestOutputHelper output)
{
XunitTracingInterceptor.AddToContext(new XunitTracingInterceptor(output));
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestGetManagementGroup()
{
ResourcesController.NewInstance.RunPsTest("Test-GetManagementGroup");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestGetManagementGroupWithExpand()
{
ResourcesController.NewInstance.RunPsTest("Test-GetManagementGroupWithExpand");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestGetManagementGroupWithExpandAndRecurse()
{
ResourcesController.NewInstance.RunPsTest("Test-GetManagementGroupWithExpandAndRecurse");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestNewManagementGroup()
{
ResourcesController.NewInstance.RunPsTest("Test-NewManagementGroup");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestNewManagementGroupWithDisplayName()
{
ResourcesController.NewInstance.RunPsTest("Test-NewManagementGroupWithDisplayName");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestNewManagementGroupWithParentId()
{
ResourcesController.NewInstance.RunPsTest("Test-NewManagementGroupWithParentId");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestNewManagementGroupWithDisplayNameAndParentId()
{
ResourcesController.NewInstance.RunPsTest("Test-NewManagementGroupWithDisplayNameAndParentId");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestUpdateManagementGroupWithDisplayName()
{
ResourcesController.NewInstance.RunPsTest("Test-UpdateManagementGroupWithDisplayName");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestUpdateManagementGroupWithParentId()
{
ResourcesController.NewInstance.RunPsTest("Test-UpdateManagementGroupWithParentId");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestUpdateManagementGroupWithDisplayNameAndParentId()
{
ResourcesController.NewInstance.RunPsTest("Test-UpdateManagementGroupWithDisplayNameAndParentId");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestRemoveManagementGroup()
{
ResourcesController.NewInstance.RunPsTest("Test-RemoveManagementGroup");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestNewRemoveManagementGroupSubscription()
{
ResourcesController.NewInstance.RunPsTest("Test-NewRemoveManagementGroupSubscription");
}
}
}
Loading