Skip to content

Commit

Permalink
Merge pull request #1 from Azure/build
Browse files Browse the repository at this point in the history
megre upstream
  • Loading branch information
yaakoviyun committed Apr 20, 2015
2 parents e053579 + 21883ff commit aa1f82b
Show file tree
Hide file tree
Showing 209 changed files with 35,191 additions and 5,313 deletions.
5 changes: 3 additions & 2 deletions src/Common/Commands.Common.Test/Commands.Common.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,9 @@
<Reference Include="Microsoft.WindowsAzure.Management">
<HintPath>..\..\packages\Microsoft.WindowsAzure.Management.4.1.1\lib\net40\Microsoft.WindowsAzure.Management.dll</HintPath>
</Reference>
<Reference Include="Microsoft.WindowsAzure.Management.Compute">
<HintPath>..\..\packages\Microsoft.WindowsAzure.Management.Compute.11.2.1\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll</HintPath>
<Reference Include="Microsoft.WindowsAzure.Management.Compute, Version=12.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\Microsoft.WindowsAzure.Management.Compute.12.0.0\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll</HintPath>
</Reference>
<Reference Include="Microsoft.WindowsAzure.Management.Storage">
<HintPath>..\..\packages\Microsoft.WindowsAzure.Management.Storage.5.1.1\lib\net40\Microsoft.WindowsAzure.Management.Storage.dll</HintPath>
Expand Down
2 changes: 1 addition & 1 deletion src/Common/Commands.Common.Test/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<package id="Microsoft.Net.Http" version="2.2.28" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.ConfigurationManager" version="2.0.3" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management" version="4.1.1" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.Compute" version="11.2.1" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.Compute" version="12.0.0" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.Storage" version="5.1.1" targetFramework="net45" />
<package id="Moq" version="4.2.1402.2112" targetFramework="net45" />
<package id="Newtonsoft.Json" version="6.0.4" targetFramework="net45" />
Expand Down
6 changes: 3 additions & 3 deletions src/Common/Commands.ScenarioTest/Commands.ScenarioTest.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,9 @@
<Reference Include="Microsoft.WindowsAzure.Management">
<HintPath>..\..\packages\Microsoft.WindowsAzure.Management.4.1.1\lib\net40\Microsoft.WindowsAzure.Management.dll</HintPath>
</Reference>
<Reference Include="Microsoft.WindowsAzure.Management.Compute">
<HintPath>..\..\packages\Microsoft.WindowsAzure.Management.Compute.11.2.1\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll</HintPath>
<Private>True</Private>
<Reference Include="Microsoft.WindowsAzure.Management.Compute, Version=12.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\Microsoft.WindowsAzure.Management.Compute.12.0.0\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll</HintPath>
</Reference>
<Reference Include="Microsoft.WindowsAzure.Management.Storage">
<HintPath>..\..\packages\Microsoft.WindowsAzure.Management.Storage.5.1.1\lib\net40\Microsoft.WindowsAzure.Management.Storage.dll</HintPath>
Expand Down
2 changes: 1 addition & 1 deletion src/Common/Commands.ScenarioTest/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<package id="Microsoft.Net.Http" version="2.2.28" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.ConfigurationManager" version="2.0.3" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management" version="4.1.1" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.Compute" version="11.2.1" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.Compute" version="12.0.0" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.Storage" version="5.1.1" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.WebSites" version="4.4.2-prerelease" targetFramework="net45" />
<package id="Newtonsoft.Json" version="6.0.4" targetFramework="net45" />
Expand Down
2 changes: 2 additions & 0 deletions src/Common/Commands.ScenarioTests.Common/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ public class Category

public const string Store = "Store";

public const string Sql = "Sql";

public const string ServiceManagement = "ServiceManagement";

public const string Resources = "Resources";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,9 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Authorization.0.18.2-preview\lib\net40\Microsoft.Azure.Management.Authorization.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Azure.Management.Compute">
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Compute.3.4.0-preview\lib\net40\Microsoft.Azure.Management.Compute.dll</HintPath>
<Reference Include="Microsoft.Azure.Management.Compute, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Compute.4.0.0-preview\lib\net40\Microsoft.Azure.Management.Compute.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Azure.Management.Network, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
Expand Down Expand Up @@ -142,12 +143,15 @@
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="ScenarioTests\ComputeTestController.cs" />
<Compile Include="Common\ComputeTestController.cs" />
<Compile Include="ScenarioTests\StorageAccountTests.cs" />
<Compile Include="ScenarioTests\TestVirtualMachineImageList.cs" />
<Compile Include="ScenarioTests\TestVirtualMachineList.cs" />
<Compile Include="ScenarioTests\VirtualMachineProfileTests.cs" />
<Compile Include="ScenarioTests\AvailabilitySetTests.cs" />
<Compile Include="ScenarioTests\VirtualMachineExtensionTests.cs" />
<Compile Include="ScenarioTests\VirtualMachineNetworkInterfaceTests.cs" />
<Compile Include="ScenarioTests\TestVirtualMachineSizeAndUsage.cs" />
<Compile Include="ScenarioTests\VirtualMachineTests.cs" />
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
Expand Down Expand Up @@ -259,6 +263,15 @@
<None Include="SessionRecords\Microsoft.Azure.Commands.Compute.Test.ScenarioTests.VirtualMachineProfileTests\TestVirtualMachineProfile.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.Azure.Commands.Compute.Test.ScenarioTests.VirtualMachineTests\TestVirtualMachineImageList.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.Azure.Commands.Compute.Test.ScenarioTests.VirtualMachineTests\TestVirtualMachineList.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.Azure.Commands.Compute.Test.ScenarioTests.VirtualMachineTests\TestVirtualMachineSizeAndUsage.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public void RunPsTestWorkflow(
.Split(new[] { "." }, StringSplitOptions.RemoveEmptyEntries)
.Last();
helper.SetupModules(
AzureModule.AzureResourceManager,
AzureModule.AzureResourceManager,
"ScenarioTests\\Common.ps1",
"ScenarioTests\\ComputeTestCommon.ps1",
"ScenarioTests\\" + callingClassName + ".ps1");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Test Availability Set
function Test-AvailabilitySet
{
# Setup
$rgname = Get-ComputeTestResourceGroupName
$rgname = Get-ComputeTestResourceName

try
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@

<#
.SYNOPSIS
Gets valid resource group name for compute management test
Gets valid resource name for compute test
#>
function Get-ComputeTestResourceGroupName
function Get-ComputeTestResourceName
{
$stack = Get-PSCallStack
$testName = $null;
foreach ($frame in $stack)
{
if ($frame.Command.StartsWith("Test-", "CurrentCultureIgnoreCase"))
{
$testName = $frame.Command
$testName = $frame.Command;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Test StorageAccount
function Test-StorageAccount
{
# Setup
$rgname = Get-ComputeTestResourceGroupName;
$rgname = Get-ComputeTestResourceName;

try
{
Expand Down Expand Up @@ -97,7 +97,7 @@ Test New-AzureStorageAccount
function Test-NewAzureStorageAccount
{
# Setup
$rgname = Get-ComputeTestResourceGroupName;
$rgname = Get-ComputeTestResourceName;

try
{
Expand Down Expand Up @@ -126,7 +126,7 @@ Test Get-AzureStorageAccount
function Test-GetAzureStorageAccount
{
# Setup
$rgname = Get-ComputeTestResourceGroupName;
$rgname = Get-ComputeTestResourceName;

try
{
Expand Down Expand Up @@ -166,7 +166,7 @@ Test Set-AzureStorageAccount
function Test-SetAzureStorageAccount
{
# Setup
$rgname = Get-ComputeTestResourceGroupName;
$rgname = Get-ComputeTestResourceName;

try
{
Expand Down Expand Up @@ -217,7 +217,7 @@ Test Remove-AzureStorageAccount
function Test-RemoveAzureStorageAccount
{
# Setup
$rgname = Get-ComputeTestResourceGroupName;
$rgname = Get-ComputeTestResourceName;

try
{
Expand Down Expand Up @@ -246,7 +246,7 @@ Test Get-AzureStorageAccountKey
function Test-GetAzureStorageAccountKey
{
# Setup
$rgname = Get-ComputeTestResourceGroupName;
$rgname = Get-ComputeTestResourceName;

try
{
Expand Down Expand Up @@ -278,7 +278,7 @@ Test New-AzureStorageAccountKey
function Test-NewAzureStorageAccountKey
{
# Setup
$rgname = Get-ComputeTestResourceGroupName;
$rgname = Get-ComputeTestResourceName;

try
{
Expand Down Expand Up @@ -322,7 +322,7 @@ Test Get-AzureStorageAccount | Get-AzureStorageAccountKey
function Test-PipingGetAccountToGetKey
{
# Setup
$rgname = Get-ComputeTestResourceGroupName;
$rgname = Get-ComputeTestResourceName;

try
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,18 @@
// limitations under the License.
// ----------------------------------------------------------------------------------

using Microsoft.Azure.Commands.Sql.Services;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
using Microsoft.WindowsAzure.Commands.ScenarioTest;
using Xunit;

namespace Microsoft.Azure.Commands.Sql
namespace Microsoft.Azure.Commands.Compute.Test.ScenarioTests
{
/// <summary>
/// The base class for all Azure Sql Database Management Cmdlets
/// </summary>
public abstract class SqlDatabaseCmdletBase : AzurePSCmdlet
public partial class VirtualMachineTests
{
/// <summary>
/// Stores the per request session Id for all request made in this cmdlet call.
/// </summary>
protected string clientRequestId { get; set; }

internal SqlDatabaseCmdletBase()
[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestVirtualMachineImageList()
{
this.clientRequestId = Util.GenerateTracingId();
ComputeTestController.NewInstance.RunPsTest("Test-VirtualMachineImageList");
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// ----------------------------------------------------------------------------------
//
// 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.WindowsAzure.Commands.ScenarioTest;
using Xunit;

namespace Microsoft.Azure.Commands.Compute.Test.ScenarioTests
{
public partial class VirtualMachineTests
{
[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestVirtualMachineList()
{
ComputeTestController.NewInstance.RunPsTest("Test-VirtualMachineList");
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// ----------------------------------------------------------------------------------
//
// 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.WindowsAzure.Commands.ScenarioTest;
using Xunit;

namespace Microsoft.Azure.Commands.Compute.Test.ScenarioTests
{
public partial class VirtualMachineTests
{
[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestVirtualMachineSizeAndUsage()
{
ComputeTestController.NewInstance.RunPsTest("Test-VirtualMachineSizeAndUsage");
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Test Virtual Machine Extensions
function Test-VirtualMachineExtension
{
# Setup
$rgname = Get-ComputeTestResourceGroupName
$rgname = Get-ComputeTestResourceName

try
{
Expand Down Expand Up @@ -175,13 +175,13 @@ function Test-VirtualMachineExtension
Assert-AreEqual $vm1.HardwareProfile.VirtualMachineSize $vmsize;

# Check Extensions in VM
Assert-AreEqual $vm1.Resources.Extensions.Count 1;
Assert-AreEqual $vm1.Resources.Extensions[0].Name $extname;
Assert-AreEqual $vm1.Resources.Extensions[0].Type 'Microsoft.Compute/virtualMachines/extensions';
Assert-AreEqual $vm1.Resources.Extensions[0].Publisher $publisher;
Assert-AreEqual $vm1.Resources.Extensions[0].ExtensionType $exttype;
Assert-AreEqual $vm1.Resources.Extensions[0].TypeHandlerVersion $extver;
Assert-NotNull $vm1.Resources.Extensions[0].Settings;
Assert-AreEqual $vm1.Extensions.Count 1;
Assert-AreEqual $vm1.Extensions[0].Name $extname;
Assert-AreEqual $vm1.Extensions[0].Type 'Microsoft.Compute/virtualMachines/extensions';
Assert-AreEqual $vm1.Extensions[0].Publisher $publisher;
Assert-AreEqual $vm1.Extensions[0].ExtensionType $exttype;
Assert-AreEqual $vm1.Extensions[0].TypeHandlerVersion $extver;
Assert-NotNull $vm1.Extensions[0].Settings;

<# *** TODO: The removal call did not return. 12/12/2014.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Test Virtual Machines with single NetworkInterface
function Test-SingleNetworkInterface
{
# Setup
$rgname = Get-ComputeTestResourceGroupName
$rgname = Get-ComputeTestResourceName

try
{
Expand Down Expand Up @@ -140,7 +140,7 @@ Test Virtual Machines with a NetworkInterface with DnsSettings
function Test-SingleNetworkInterfaceDnsSettings
{
# Setup
$rgname = Get-ComputeTestResourceGroupName
$rgname = Get-ComputeTestResourceName

try
{
Expand Down Expand Up @@ -235,7 +235,7 @@ Test Virtual Machines with multiple NetworkInterface
function Test-MultipleNetworkInterface
{
# Setup
$rgname = Get-ComputeTestResourceGroupName
$rgname = Get-ComputeTestResourceName

try
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

namespace Microsoft.Azure.Commands.Compute.Test.ScenarioTests
{
public class VirtualMachineTests
public partial class VirtualMachineTests
{
[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
Expand Down
Loading

0 comments on commit aa1f82b

Please sign in to comment.