Skip to content

Commit 210d834

Browse files
author
Samuel Anudeep
committed
Merge pull request #193 from MabOneSdk/anudeeb-dev1
Test Infra Fixes
2 parents 28d3a6d + 756a80f commit 210d834

File tree

9 files changed

+136
-22
lines changed

9 files changed

+136
-22
lines changed
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
#
2+
# Module manifest for module 'Microsoft.Azure.Commands.RecoveryServices.Backup'
3+
#
4+
# Generated by: Microsoft Corporation
5+
#
6+
# Generated on: 3/16/2016
7+
#
8+
9+
@{
10+
11+
# Version number of this module.
12+
ModuleVersion = '1.0.4'
13+
14+
# ID used to uniquely identify this module
15+
GUID = '3d444bee-6742-4ce2-b573-dfd1b7c4144c'
16+
17+
# Author of this module
18+
Author = 'Microsoft Corporation'
19+
20+
# Company or vendor of this module
21+
CompanyName = 'Microsoft Corporation'
22+
23+
# Copyright statement for this module
24+
Copyright = 'Microsoft Corporation. All rights reserved.'
25+
26+
# Description of the functionality provided by this module
27+
Description = 'Microsoft Azure PowerShell - Azure Backup service cmdlets for Azure Resource Manager'
28+
29+
# Minimum version of the Windows PowerShell engine required by this module
30+
PowerShellVersion = '3.0'
31+
32+
# Name of the Windows PowerShell host required by this module
33+
PowerShellHostName = ''
34+
35+
# Minimum version of the Windows PowerShell host required by this module
36+
PowerShellHostVersion = ''
37+
38+
# Minimum version of the .NET Framework required by this module
39+
DotNetFrameworkVersion = '4.0'
40+
41+
# Minimum version of the common language runtime (CLR) required by this module
42+
CLRVersion='4.0'
43+
44+
# Processor architecture (None, X86, Amd64, IA64) required by this module
45+
ProcessorArchitecture = 'None'
46+
47+
# Modules that must be imported into the global environment prior to importing this module
48+
RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; ModuleVersion = '1.0.4'})
49+
50+
# Assemblies that must be loaded prior to importing this module
51+
RequiredAssemblies = @()
52+
53+
# Script files (.ps1) that are run in the caller's environment prior to importing this module
54+
ScriptsToProcess = @()
55+
56+
# Type files (.ps1xml) to be loaded when importing this module
57+
TypesToProcess = @()
58+
59+
# Format files (.ps1xml) to be loaded when importing this module
60+
FormatsToProcess = @()
61+
62+
# Modules to import as nested modules of the module specified in ModuleToProcess
63+
NestedModules = @(
64+
'.\Microsoft.Azure.Commands.RecoveryServices.Backup.dll'
65+
)
66+
67+
# Functions to export from this module
68+
FunctionsToExport = '*'
69+
70+
# Cmdlets to export from this module
71+
CmdletsToExport = '*'
72+
73+
# Variables to export from this module
74+
VariablesToExport = '*'
75+
76+
# Aliases to export from this module
77+
AliasesToExport = @()
78+
79+
# List of all modules packaged with this module
80+
ModuleList = @()
81+
82+
# List of all files packaged with this module
83+
FileList = @()
84+
85+
# Private data to pass to the module specified in ModuleToProcess
86+
PrivateData = ''
87+
88+
}

src/ResourceManager/RecoveryServices.Backup/Commands.RecoveryServices.Backup.Cmdlets.csproj

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@
77
<ProjectGuid>{3B3E879A-F856-46BF-AFF9-8AD6760CF7B9}</ProjectGuid>
88
<OutputType>Library</OutputType>
99
<AppDesignerFolder>Properties</AppDesignerFolder>
10-
<RootNamespace>RecoveryServices.Backup</RootNamespace>
11-
<AssemblyName>RecoveryServices.Backup</AssemblyName>
10+
<RootNamespace>Microsoft.Azure.Commands.RecoveryServices.Backup</RootNamespace>
11+
<AssemblyName>Microsoft.Azure.Commands.RecoveryServices.Backup</AssemblyName>
1212
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
1313
<FileAlignment>512</FileAlignment>
1414
</PropertyGroup>
1515
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
1616
<DebugSymbols>true</DebugSymbols>
1717
<DebugType>full</DebugType>
1818
<Optimize>false</Optimize>
19-
<OutputPath>bin\Debug\</OutputPath>
20-
<DefineConstants>DEBUG;TRACE</DefineConstants>
19+
<OutputPath>..\..\Package\Debug\ResourceManager\AzureResourceManager\AzureRM.RecoveryServices.Backup\</OutputPath>
20+
<DefineConstants>TRACE;DEBUG;CODE_ANALYSIS</DefineConstants>
2121
<ErrorReport>prompt</ErrorReport>
2222
<WarningLevel>4</WarningLevel>
2323
</PropertyGroup>
@@ -130,6 +130,11 @@
130130
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
131131
</EmbeddedResource>
132132
</ItemGroup>
133+
<ItemGroup>
134+
<None Include="AzureRM.RecoveryServices.Backup.psd1">
135+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
136+
</None>
137+
</ItemGroup>
133138
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
134139
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
135140
Other similar extension points exist, see Microsoft.Common.targets.

src/ResourceManager/RecoveryServices.Backup/Commands.RecoveryServices.Backup.Test/Commands.RecoveryServices.Backup.Test.csproj

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<OutputType>Library</OutputType>
99
<AppDesignerFolder>Properties</AppDesignerFolder>
1010
<RootNamespace>Commands.RecoveryServices.Backup.Test</RootNamespace>
11-
<AssemblyName>Commands.RecoveryServices.Backup.Test</AssemblyName>
11+
<AssemblyName>Microsoft.Azure.Commands.RecoveryServices.Backup.Test</AssemblyName>
1212
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
1313
<FileAlignment>512</FileAlignment>
1414
</PropertyGroup>
@@ -49,6 +49,10 @@
4949
<Reference Include="Microsoft.Azure.Test.HttpRecorder">
5050
<HintPath>..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5799.28345-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll</HintPath>
5151
</Reference>
52+
<Reference Include="Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms, Version=2.12.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
53+
<SpecificVersion>False</SpecificVersion>
54+
<HintPath>..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.18.206251556\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll</HintPath>
55+
</Reference>
5256
<Reference Include="System" />
5357
<Reference Include="System.Configuration" />
5458
<Reference Include="System.Core" />
@@ -68,8 +72,10 @@
6872
</ItemGroup>
6973
<ItemGroup>
7074
<Compile Include="Properties\AssemblyInfo.cs" />
71-
<None Include="ScenarioTests\AzureVm\ContainerTests.ps1" />
72-
<Compile Include="ScenarioTests\AzureVm\ContainerTests.cs" />
75+
<None Include="ScenarioTests\IaasVm\ContainerTests.ps1">
76+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
77+
</None>
78+
<Compile Include="ScenarioTests\IaasVm\ContainerTests.cs" />
7379
<Compile Include="ScenarioTests\TestsBase.cs" />
7480
</ItemGroup>
7581
<ItemGroup>
@@ -80,6 +86,14 @@
8086
<Project>{3436a126-edc9-4060-8952-9a1be34cdd95}</Project>
8187
<Name>Commands.ScenarioTests.ResourceManager.Common</Name>
8288
</ProjectReference>
89+
<ProjectReference Include="..\Commands.RecoveryServices.Backup.Cmdlets.csproj">
90+
<Project>{3b3e879a-f856-46bf-aff9-8ad6760cf7b9}</Project>
91+
<Name>Commands.RecoveryServices.Backup.Cmdlets</Name>
92+
</ProjectReference>
93+
<ProjectReference Include="..\Commands.RecoveryServices.Backup.Models\Commands.RecoveryServices.Backup.Models.csproj">
94+
<Project>{30b92759-50b3-494e-b9f0-ec9a2ce9d57b}</Project>
95+
<Name>Commands.RecoveryServices.Backup.Models</Name>
96+
</ProjectReference>
8397
</ItemGroup>
8498
<ItemGroup>
8599
<WCFMetadata Include="Service References\" />
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// limitations under the License.
1313
// ----------------------------------------------------------------------------------
1414

15+
using Microsoft.Azure.Commands.RecoveryServices.Backup.Cmdlets.Models;
1516
using System;
1617
using System.Collections.Generic;
1718
using System.Linq;
@@ -21,12 +22,12 @@
2122

2223
namespace Microsoft.Azure.Commands.RecoveryServices.Backup.Test.ScenarioTests
2324
{
24-
public class ContainerTests : RecoveryServicesBackupTestsBase
25+
public partial class ContainerTests : RecoveryServicesBackupTestsBase
2526
{
2627
[Fact]
27-
public void Test()
28+
public void TestGetContainerScenario()
2829
{
29-
this.RunPowerShellTest("Test");
30+
this.RunPowerShellTest(PsBackupProviderTypes.IaasVm.ToString(), "Test-GetContainerScenario");
3031
}
3132
}
3233
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,8 @@
1212
# limitations under the License.
1313
# ----------------------------------------------------------------------------------
1414

15+
function Test-GetContainerScenario
16+
{
17+
$vaults = Get-AzureRmRecoveryServicesVault -ResourceGroupName "phaniktRSV" -Name "phaniktRs1";
18+
echo $vaults;
19+
}

src/ResourceManager/RecoveryServices.Backup/Commands.RecoveryServices.Backup.Test/ScenarioTests/TestsBase.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public abstract class RecoveryServicesBackupTestsBase : RMTestBase
3333
CSMTestEnvironmentFactory csmTestFactory;
3434
EnvironmentSetupHelper helper;
3535

36-
protected RecoveryServicesBackupManagementClient RsBackupClient { get; private set; }
36+
public RecoveryServicesBackupManagementClient RsBackupClient { get; private set; }
3737

3838
protected string ResourceNamespace { get; private set; }
3939

@@ -56,23 +56,23 @@ protected void SetupManagementClients()
5656
helper.SetupSomeOfManagementClients(RsBackupClient);
5757
}
5858

59-
protected void RunPowerShellTest(params string[] scripts)
59+
protected void RunPowerShellTest(string testFolderName, params string[] scripts)
6060
{
6161
using (UndoContext context = UndoContext.Current)
6262
{
6363
context.Start(TestUtilities.GetCallingClass(2), TestUtilities.GetCurrentMethodName(2));
64-
65-
string baseDir = TestUtilities.GetMockBaseDirectory();
66-
string callingClass = TestUtilities.GetCallingClass(2);
67-
string currMethodName = TestUtilities.GetCurrentMethodName(2);
64+
65+
string psFile = "ScenarioTests\\" + testFolderName + "\\" + this.GetType().Name + ".ps1";
66+
string rmProfileModule = helper.RMProfileModule;
67+
string rmModulePath = helper.GetRMModulePath("AzureRM.RecoveryServices.Backup.psd1");
6868

6969
SetupManagementClients();
7070

7171
helper.SetupEnvironment(AzureModule.AzureResourceManager);
7272
helper.SetupModules(AzureModule.AzureResourceManager,
73-
"ScenarioTests\\" + this.GetType().Name + ".ps1",
74-
helper.RMProfileModule,
75-
helper.GetRMModulePath("AzureRM.Backup.psd1")
73+
psFile,
74+
rmProfileModule,
75+
rmModulePath
7676
);
7777
helper.RunPowerShellTest(scripts);
7878
}

src/ResourceManager/RecoveryServices.Backup/Properties/Resources.Designer.cs

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/ResourceManager/RecoveryServices.Backup/RecoveryServicesBackupCmdletBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@
1313
// ----------------------------------------------------------------------------------
1414

1515
using Hyak.Common;
16+
using Microsoft.Azure.Commands.RecoveryServices.Backup.Properties;
1617
using Microsoft.Azure.Commands.ResourceManager.Common;
1718
using Microsoft.Azure.Common.Authentication;
1819
using Microsoft.Azure.Common.Authentication.Models;
1920
using Microsoft.WindowsAzure.Management.Scheduler;
20-
using RecoveryServices.Backup.Properties;
2121
using System;
2222
using System.Collections.Generic;
2323
using System.Linq;

src/ResourceManager/Resources/Commands.Resources/AzureResourceManager.psd1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ NestedModules = @(
115115
'.\AzureRM.DataLakeStore',
116116
'.\AzureRM.Intune',
117117
'.\AzureRM.RecoveryServices',
118+
'.\AzureRM.RecoveryServices.Backup',
118119
'.\AzureRM.AzureStackAdmin',
119120
'.\AzureRM.AzureStackStorage'
120121
)

0 commit comments

Comments
 (0)