Skip to content

Commit ac1e688

Browse files
committed
Merge pull request #1317 from AsrArmOneSdk/fromFM1-avrai
Updated to latest hydra with following changes
2 parents d9553a0 + dfefb13 commit ac1e688

File tree

26 files changed

+1852
-1150
lines changed

26 files changed

+1852
-1150
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,6 @@
3838
<HintPath>..\..\..\packages\Microsoft.Azure.Common.Authentication.1.4.0-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll</HintPath>
3939
<Private>True</Private>
4040
</Reference>
41-
<Reference Include="Microsoft.Azure.Management.RecoveryServices, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
42-
<HintPath>..\..\..\packages\Microsoft.Azure.Management.RecoveryServices.1.0.0-preview\lib\net40\Microsoft.Azure.Management.RecoveryServices.dll</HintPath>
43-
<Private>True</Private>
44-
</Reference>
4541
<Reference Include="Hyak.Common">
4642
<HintPath>..\..\..\packages\Hyak.Common.1.0.2\lib\portable-net403+win+wpa81\Hyak.Common.dll</HintPath>
4743
</Reference>
@@ -51,6 +47,10 @@
5147
<Reference Include="Microsoft.Azure.Common.NetFramework">
5248
<HintPath>..\..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.NetFramework.dll</HintPath>
5349
</Reference>
50+
<Reference Include="Microsoft.Azure.Management.RecoveryServices, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
51+
<HintPath>..\..\..\packages\Microsoft.Azure.Management.RecoveryServices.1.0.1-preview\lib\net40\Microsoft.Azure.Management.RecoveryServices.dll</HintPath>
52+
<Private>True</Private>
53+
</Reference>
5454
<Reference Include="Microsoft.Azure.ResourceManager, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
5555
<SpecificVersion>False</SpecificVersion>
5656
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Resources.2.18.7-preview\lib\net40\Microsoft.Azure.ResourceManager.dll</HintPath>

src/ResourceManager/RecoveryServices/Commands.RecoveryServices.Test/SessionRecords/Microsoft.Azure.Commands.RecoveryServices.Test.ScenarioTests.RecoveryServicesTests/VaultCRUDTests.json

Lines changed: 142 additions & 142 deletions
Large diffs are not rendered by default.

src/ResourceManager/RecoveryServices/Commands.RecoveryServices.Test/packages.config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
<package id="Microsoft.Azure.Common" version="2.1.0" targetFramework="net45" />
55
<package id="Microsoft.Azure.Common.Authentication" version="1.4.0-preview" targetFramework="net45" />
66
<package id="Microsoft.Azure.Common.Dependencies" version="1.0.0" targetFramework="net45" />
7+
<package id="Microsoft.Azure.Management.RecoveryServices" version="1.0.1-preview" targetFramework="net45" />
78
<package id="Microsoft.Azure.Management.Resources" version="2.18.7-preview" targetFramework="net45" />
8-
<package id="Microsoft.Azure.Management.RecoveryServices" version="1.0.0-preview" targetFramework="net45" />
99
<package id="Microsoft.Azure.Test.Framework" version="1.0.5774.40163-prerelease" targetFramework="net45" />
1010
<package id="Microsoft.Azure.Test.HttpRecorder" version="1.0.5774.40163-prerelease" targetFramework="net45" />
1111
<package id="Microsoft.Bcl" version="1.1.9" targetFramework="net45" />
@@ -16,7 +16,7 @@
1616
<package id="Microsoft.Rest.ClientRuntime" version="1.3.0" targetFramework="net45" />
1717
<package id="Microsoft.Rest.ClientRuntime.Azure.Authentication" version="0.11.0" targetFramework="net45" />
1818
<package id="Microsoft.WindowsAzure.Management" version="4.1.1" targetFramework="net45" />
19-
<package id="Newtonsoft.Json" version="6.0.4" targetFramework="net45" />
19+
<package id="Newtonsoft.Json" version="6.0.4" targetFramework="net45" />
2020
<package id="xunit" version="1.9.2" targetFramework="net45" />
2121
<package id="xunit.extensions" version="1.9.2" targetFramework="net45" />
2222
<package id="xunit.runner.visualstudio" version="2.1.0-beta4-build1109" targetFramework="net45" />

src/ResourceManager/RecoveryServices/Commands.RecoveryServices/Commands.RecoveryServices.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
<HintPath>..\..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.NetFramework.dll</HintPath>
5353
</Reference>
5454
<Reference Include="Microsoft.Azure.Management.RecoveryServices, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
55-
<HintPath>..\..\..\packages\Microsoft.Azure.Management.RecoveryServices.1.0.0-preview\lib\net40\Microsoft.Azure.Management.RecoveryServices.dll</HintPath>
55+
<HintPath>..\..\..\packages\Microsoft.Azure.Management.RecoveryServices.1.0.1-preview\lib\net40\Microsoft.Azure.Management.RecoveryServices.dll</HintPath>
5656
<Private>True</Private>
5757
</Reference>
5858
<Reference Include="Microsoft.IdentityModel.Clients.ActiveDirectory, Version=2.18.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">

src/ResourceManager/RecoveryServices/Commands.RecoveryServices/Vault/RemoveAzureRMRecoveryServicesVault.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public class RemoveAzureRmRecoveryServicesVault : RecoveryServicesCmdletBase
3131
/// <summary>
3232
/// Gets or sets vault Object.
3333
/// </summary>
34-
[Parameter(Mandatory = true)]
34+
[Parameter(Mandatory = true, ValueFromPipeline = true)]
3535
[ValidateNotNullOrEmpty]
3636
public ARSVault Vault { get; set; }
3737

src/ResourceManager/RecoveryServices/Commands.RecoveryServices/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<package id="Microsoft.Azure.Common" version="2.1.0" targetFramework="net45" />
55
<package id="Microsoft.Azure.Common.Authentication" version="1.4.0-preview" targetFramework="net45" />
66
<package id="Microsoft.Azure.Common.Dependencies" version="1.0.0" targetFramework="net45" />
7-
<package id="Microsoft.Azure.Management.RecoveryServices" version="1.0.0-preview" targetFramework="net45" />
7+
<package id="Microsoft.Azure.Management.RecoveryServices" version="1.0.1-preview" targetFramework="net45" />
88
<package id="Microsoft.Bcl" version="1.1.9" targetFramework="net45" />
99
<package id="Microsoft.Bcl.Async" version="1.0.168" targetFramework="net45" />
1010
<package id="Microsoft.Bcl.Build" version="1.0.14" targetFramework="net45" />

src/ResourceManager/SiteRecovery/Commands.SiteRecovery.Test/Commands.SiteRecovery.Test.csproj

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,6 @@
3838
<HintPath>..\..\..\packages\Microsoft.Azure.Common.Authentication.1.4.0-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll</HintPath>
3939
<Private>True</Private>
4040
</Reference>
41-
<Reference Include="Microsoft.Azure.Management.SiteRecovery, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
42-
<HintPath>..\..\..\packages\Microsoft.Azure.Management.SiteRecovery.1.0.0-preview\lib\net40\Microsoft.Azure.Management.SiteRecovery.dll</HintPath>
43-
<Private>True</Private>
44-
</Reference>
4541
<Reference Include="Hyak.Common">
4642
<HintPath>..\..\..\packages\Hyak.Common.1.0.2\lib\portable-net403+win+wpa81\Hyak.Common.dll</HintPath>
4743
</Reference>
@@ -51,6 +47,10 @@
5147
<Reference Include="Microsoft.Azure.Common.NetFramework">
5248
<HintPath>..\..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.NetFramework.dll</HintPath>
5349
</Reference>
50+
<Reference Include="Microsoft.Azure.Management.SiteRecovery, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
51+
<HintPath>..\..\..\packages\Microsoft.Azure.Management.SiteRecovery.1.0.1-preview\lib\net40\Microsoft.Azure.Management.SiteRecovery.dll</HintPath>
52+
<Private>True</Private>
53+
</Reference>
5454
<Reference Include="Microsoft.Azure.ResourceManager, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
5555
<SpecificVersion>False</SpecificVersion>
5656
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Resources.2.18.7-preview\lib\net40\Microsoft.Azure.ResourceManager.dll</HintPath>
@@ -157,6 +157,9 @@
157157
<None Include="SessionRecords\Microsoft.Azure.Commands.SiteRecovery.Test.ScenarioTests.SiteRecoveryTests\TestDissociateProfile.json">
158158
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
159159
</None>
160+
<None Include="SessionRecords\Microsoft.Azure.Commands.SiteRecovery.Test.ScenarioTests.SiteRecoveryTests\VaultCRUDTests.json">
161+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
162+
</None>
160163
</ItemGroup>
161164
<ItemGroup>
162165
<ProjectReference Include="..\..\..\Common\Commands.Common\Commands.Common.csproj">

src/ResourceManager/SiteRecovery/Commands.SiteRecovery.Test/ScenarioTests/SiteRecoveryTests.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,5 +53,12 @@ public void TestDissociateProfile()
5353
{
5454
this.RunPowerShellTest("Test-SiteRecoveryDissociateProfile -vaultSettingsFilePath \"" + vaultSettingsFilePath + "\"");
5555
}
56+
57+
[Fact]
58+
[Trait(Category.AcceptanceType, Category.CheckIn)]
59+
public void VaultCRUDTests()
60+
{
61+
this.RunPowerShellTest("Test-SiteRecoveryVaultCRUDTests");
62+
}
5663
}
5764
}

src/ResourceManager/SiteRecovery/Commands.SiteRecovery.Test/ScenarioTests/SiteRecoveryTests.ps1

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,4 +157,39 @@ function WaitForJobCompletion
157157
} while((-not ($endStateDescription -ccontains $job.State)) -and ($timeElapse -lt $NumOfSecondsToWait))
158158

159159
Assert-True { $endStateDescription -ccontains $job.State } "Job did not reached desired state within $NumOfSecondsToWait seconds."
160+
}
161+
162+
<#
163+
.SYNOPSIS
164+
Site Recovery Vault CRUD Tests
165+
#>
166+
function Test-SiteRecoveryVaultCRUDTests
167+
{
168+
# Create vault
169+
$vaultCreationResponse = New-AzureRmSiteRecoveryVault -Name rsv1 -ResouceGroupName testsitegroup -Location westus
170+
Assert-NotNull($vaultCreationResponse.Name)
171+
Assert-NotNull($vaultCreationResponse.ID)
172+
Assert-NotNull($vaultCreationResponse.Type)
173+
174+
# Enumerate Vaults
175+
$vaults = Get-AzureRmSiteRecoveryVault
176+
Assert-True { $vaults.Count -gt 0 }
177+
Assert-NotNull($vaults)
178+
foreach($vault in $vaults)
179+
{
180+
Assert-NotNull($vault.Name)
181+
Assert-NotNull($vault.ID)
182+
Assert-NotNull($vault.Type)
183+
}
184+
185+
# Get the created vault
186+
$vaultToBeRemoved = Get-AzureRmSiteRecoveryVault -ResourceGroupName testsitegroup -Name rsv1
187+
Assert-NotNull($vaultToBeRemoved.Name)
188+
Assert-NotNull($vaultToBeRemoved.ID)
189+
Assert-NotNull($vaultToBeRemoved.Type)
190+
191+
# Remove Vault
192+
Remove-AzureRmSiteRecoveryVault -Vault $vaultToBeRemoved
193+
$vaults = Get-AzureRmSiteRecoveryVault -ResourceGroupName testsitegroup -Name rsv1
194+
Assert-True { $vaults.Count -eq 0 }
160195
}

0 commit comments

Comments
 (0)