Skip to content

Commit

Permalink
FI from csp-artemis
Browse files Browse the repository at this point in the history
  • Loading branch information
dragonfly91 committed Jul 13, 2015
2 parents 41e7538 + f175118 commit 2291026
Show file tree
Hide file tree
Showing 27 changed files with 1,108 additions and 520 deletions.
11 changes: 10 additions & 1 deletion AzurePowershell.Test.targets
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<TestSettings_x64>.\src\Local.x64.testsettings</TestSettings_x64>
<ScenarioTestDebug>.\src\Common\Commands.ScenarioTest\bin\Debug\Microsoft.WindowsAzure.Commands.ScenarioTest.dll</ScenarioTestDebug>
<CommonTestDebug>.\src\Common\Commands.Common.Test\bin\Debug\Microsoft.WindowsAzure.Commands.Common.Test.dll</CommonTestDebug>
<BackupTestDebug>.\src\ResourceManager\AzureBackup\Commands.AzureBackup.Test\bin\Debug\Microsoft.Azure.Commands.AzureBackup.Test.dll</BackupTestDebug>
<SqlTestDebug>.\src\ResourceManager\Sql\Commands.Sql.Test\bin\Debug\Microsoft.Azure.Commands.Sql.Test.dll</SqlTestDebug>
<ComputeDebug>.\src\ResourceManager\Compute\Commands.Compute.Test\bin\Debug\Microsoft.Azure.Commands.Compute.dll</ComputeDebug>
<ComputeTestDebug>.\src\ResourceManager\Compute\Commands.Compute.Test\bin\Debug\Microsoft.Azure.Commands.Compute.Test.dll</ComputeTestDebug>
Expand Down Expand Up @@ -42,6 +43,7 @@
</PropertyGroup>

<ItemGroup>
<XUnitTests Include=".\src\ResourceManager\AzureBackup\Commands.AzureBackup.Test\bin\Debug\Microsoft.Azure.Commands.AzureBackup.Test.dll"/>
<XUnitTests Include=".\src\Common\Commands.Common.Test\bin\Debug\Microsoft.WindowsAzure.Commands.Common.Test.dll"/>
<XUnitTests Include=".\src\ResourceManager\Sql\Commands.Sql.Test\bin\Debug\Microsoft.Azure.Commands.Sql.Test.dll"/>
<XUnitTests Include=".\src\ServiceManagement\Services\Commands.Test\bin\Debug\Microsoft.WindowsAzure.Commands.Test.dll"/>
Expand All @@ -63,7 +65,7 @@
<XUnitTests Include=".\src\ServiceManagement\RecoveryServices\Commands.RecoveryServices.Test\bin\Debug\Microsoft.Azure.Commands.RecoveryServices.Test.dll"/>
<XUnitTests Include=".\src\ResourceManager\TrafficManager\Commands.TrafficManager2.Test\bin\Debug\Microsoft.Azure.Commands.TrafficManager.Test.ScenarioTests.dll"/>
<XUnitTests Include=".\src\ServiceManagement\Network\Commands.Network.Test\bin\Debug\Microsoft.WindowsAzure.Commands.ServiceManagement.Network.Test.dll"/>
<XUnitTests Include=".\src\ResourceManager\ApiManagement\Commands.ApiManagement.Test\bin\Debug\Microsoft.Azure.Commands.ApiManagement.Test.dll"/>
<XUnitTests Include=".\src\ResourceManager\ApiManagement\Commands.ApiManagement.Test\bin\Debug\Microsoft.Azure.Commands.ApiManagement.Test.dll"/>
</ItemGroup>

<Target Name="InvokeMSTest">
Expand Down Expand Up @@ -217,6 +219,13 @@
Projects="build.proj"/>
</Target>

<!-- Run the backup tests -->
<Target Name="BackupTests">
<Message Importance="high" Text="Running Backup tests" />
<Xunit.Runner.MSBuild.xunit Assemblies="$(BackupTestDebug)" Html="$(TestOutputDirectory)\BackupTests.xunit.dll.html" Verbose="false"
IncludeTraits="$(XUnitIncludedTrait)" MaxParallelThreads="0" ParallelizeAssemblies="false" ParallelizeTestCollections="false"/>
</Target>

<!-- Run the common tests -->
<Target Name="CommonTests">
<Message Importance="high" Text="Running Common tests" />
Expand Down
15 changes: 14 additions & 1 deletion ChangeLog.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
2015.06.26 version 0.9.4
2015.07.10 version 1.0.0
* Azure Backup cmdlets
*Added New-AzureBackupVault cmdlets
*Added Get-AzureBackupVault cmdlets
*Added Set-AzureBackupVault cmdlets
*Added Remove-AzureBackupVault cmdlets
*Added Get-AzureBackupVaultCredential cmdlets

2015.07.16 version 0.9.5
* Azure Resource Manager cmdlets
* Fixed formatting of output for Get-UsageAggregates
* Fixed executing Get-UsageAggregates when first cmdlet being called.

2015.06.26 version 0.9.4
* Azure Compute cmdlets
* Warning message for deprecation Name parameter in New-AzureVM. The guidance is to use –Name parameter in New-AzureVMConfig cmdlet.
* Save-AzureVMImgage has new paramter -Path to save the JSON template returned from the server.
Expand Down
22 changes: 0 additions & 22 deletions src/ResourceManager.AzureBackup.sln

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<ItemGroup>
<Reference Include="Microsoft.Azure.Common.Authentication, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.25-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll</HintPath>
<HintPath>..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.27-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Azure.Management.BackupServicesManagement">
<HintPath>..\Commands.AzureBackup\Resources\Microsoft.Azure.Management.BackupServicesManagement.dll</HintPath>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,24 @@
using System.Reflection;
// ----------------------------------------------------------------------------------
//
// 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 System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Commands.AzureBackup.Test")]
[assembly: AssemblyTitle("Microsoft.Azure.Commands.AzureBackup.Test")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
Expand All @@ -32,5 +45,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyVersion(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyVersion)]
[assembly: AssemblyFileVersion(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyFileVersion)]
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@
// limitations under the License.
// ----------------------------------------------------------------------------------

using Microsoft.WindowsAzure.Commands.ScenarioTest;
using Xunit;

namespace Microsoft.Azure.Commands.AzureBackup.Test.ScenarioTests
{
public class AzureBackupVaultTests : AzureBackupTestsBase
{
[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void AzureBackupVaultScenarioTests()
{
this.RunPowerShellTest("Test-AzureBackupVaultScenario");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,31 +19,23 @@ $CertTargetLocation = (Get-Item -Path ".\" -Verbose).FullName;

function Test-AzureBackupVaultScenario
{
$vault = New-AzureBackupVault -ResourceGroupName $ResourceGroupName -Name $ResourceName -Region $Location;
$vault = New-AzureBackupVault -ResourceGroupName $ResourceGroupName -Name $ResourceName -Region $Location -Storage "LocallyRedundant";
Assert-AreEqual $vault.Name $ResourceName;
Assert-AreEqual $vault.ResourceGroupName $ResourceGroupName;
Assert-AreEqual $vault.Region $Location;
Assert-AreEqual $vault.Storage "GeoRedundant"
Assert-AreEqual $vault.Storage "LocallyRedundant";

$vault = Get-AzureBackupVault -ResourceGroupName $ResourceGroupName -Name $ResourceName
Assert-AreEqual $vault.Name $ResourceName;
Assert-AreEqual $vault.ResourceGroupName $ResourceGroupName;
Assert-AreEqual $vault.Region $Location;
Assert-AreEqual $vault.Storage "GeoRedundant"

Assert-AreEqual $vault.Storage "LocallyRedundant";
$fileName = Get-AzureBackupVaultCredentials -vault $vault -TargetLocation $CertTargetLocation
Assert-NotNull $fileName 'File name should not be null';
$certFileFullPath = [io.path]::combine($CertTargetLocation, $fileName);
Assert-True {{ Test-Path $certFileFullPath }}

Set-AzureBackupVaultStorageType -Vault $vault -Type "GeoRedundant";
$vault = Get-AzureBackupVault -Name $ResourceName;
Assert-AreEqual $vault.Storage "GeoRedundant";

Set-AzureBackupVaultStorageType -Vault $vault -Type "LocallyRedundant";
$vault = Get-AzureBackupVault -Name $ResourceName;
Assert-AreEqual $vault.Storage "LocallyRedundant";

$vault = Set-AzureBackupVault -vault $vault -Storage "GeoRedundant";
Assert-AreEqual $vault.Name $ResourceName;
Assert-AreEqual $vault.ResourceGroupName $ResourceGroupName;
Expand Down
Loading

0 comments on commit 2291026

Please sign in to comment.