Skip to content

AzureRT S50 PR #526

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 73 commits into from
Jun 20, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
03f6ea1
Merge branch 'dev' of https://github.com/Azure/azure-powershell into dev
huangpf Apr 13, 2015
43e5935
Merge branch 'dev' of https://github.com/huangpf/azure-powershell int…
huangpf Apr 13, 2015
54d653c
Merge branch 'dev' of https://github.com/Azure/azure-powershell into dev
May 8, 2015
e89ca00
Merge branch 'dev' of https://github.com/Azure/azure-powershell into dev
May 18, 2015
eac2223
Merge branch 'dev' of https://github.com/Azure/azure-powershell into dev
May 20, 2015
958aa35
Merge branch 'dev' of https://github.com/Azure/azure-powershell into dev
May 20, 2015
7e440e2
Fix TestGetAzureVM test
May 21, 2015
8b4458c
Fix test issue
May 21, 2015
5ba2425
Make all session record files to copy always.
May 22, 2015
f5899c6
Merge branch 'dev' of https://github.com/Azure/azure-powershell into dev
Jun 2, 2015
f1df146
Merge branch 'dev' of https://github.com/Azure/azure-powershell into dev
Jun 5, 2015
c53e6a3
Add code coverage task for Compute
Jun 5, 2015
6c8c917
Fix Set-AzurePlatformVMImage for OS Images
huangpf Jun 8, 2015
e6571ca
Add script-based test for SM
huangpf Jun 9, 2015
3b09e1f
update test record
huangpf Jun 9, 2015
38319f7
Merge branch 'dev' of https://github.com/Azure/azure-powershell into dev
Jun 9, 2015
443f614
Update Tests
huangpf Jun 9, 2015
ed6cbfe
Merge pull request #20 from Azure/dev
huangpf Jun 9, 2015
dfe1eaa
Fix PSOperation
huangpf Jun 9, 2015
26f71b3
Merge branch 'dev' of https://github.com/Azure/azure-powershell into …
huangpf Jun 9, 2015
4c82e45
Merge branch 'dev' of https://github.com/huangpf/azure-powershell int…
huangpf Jun 9, 2015
bc99988
Merge branch 'dev' of https://github.com/Azure/azure-powershell into dev
Jun 10, 2015
9aa31a4
Merge pull request #21 from Azure/dev
huangpf Jun 10, 2015
db9bf4a
Move helper classes to the 'Common' folder.
huangpf Jun 10, 2015
c8b387d
Merge branch 'dev' of https://github.com/huangpf/azure-powershell int…
huangpf Jun 10, 2015
5d90095
Update Compute Package
huangpf Jun 10, 2015
0957080
Remove app.config
huangpf Jun 10, 2015
910e4ed
Fix Ext Cmdlets
huangpf Jun 10, 2015
6cf348b
Merge branch 'dev' of https://github.com/AzureRT/azure-powershell int…
huangpf Jun 10, 2015
97b91b3
fix formatting
huangpf Jun 11, 2015
46d05d1
Merge pull request #22 from huangpf/dev
AzureRT Jun 11, 2015
fb9c84e
Fix Image Test
huangpf Jun 11, 2015
dc8e8b5
Merge pull request #23 from huangpf/dev
AzureRT Jun 11, 2015
2e35f08
Update code coverage job
Jun 11, 2015
0939509
Update PIRtests
Jun 11, 2015
f4ecc03
Merge branch 'dev' of https://github.com/AzureRT/azure-powershell int…
Jun 11, 2015
8d3b665
Merge pull request #22 from Azure/dev
huangpf Jun 13, 2015
9e262ea
Merge pull request #23 from AzureRT/dev
huangpf Jun 13, 2015
80abd35
Merge pull request #24 from huangpf/dev
AzureRT Jun 13, 2015
b24ae96
Update Output/Format of Extenion Image Cmdlets
huangpf Jun 14, 2015
ca92d78
Update
huangpf Jun 14, 2015
7bcd368
Overwrite the 'Clean-ResourceGroup' function
huangpf Jun 16, 2015
f5dcfe5
Merge pull request #24 from Azure/dev
huangpf Jun 16, 2015
c0eaaf5
Fix piping issue for Remove-AzureVMDataDisk and Remove-AzureVMNetwork…
Jun 16, 2015
d5ebd4c
update
huangpf Jun 17, 2015
65ca805
Format Image Cmdlet Output
huangpf Jun 17, 2015
00fbf44
Merge branch 'dev' of https://github.com/Azure/azure-powershell into dev
Jun 17, 2015
49458ea
Merge branch 'dev' of https://github.com/AzureRT/azure-powershell int…
huangpf Jun 17, 2015
c1ef639
update
huangpf Jun 18, 2015
9fb30ac
Add TestGetVMSizeFromAllLocations
huangpf Jun 18, 2015
06ce282
Merge pull request #25 from huangpf/dev
AzureRT Jun 18, 2015
8676648
Merge pull request #25 from Azure/dev
huangpf Jun 18, 2015
9723928
Update Tests
huangpf Jun 19, 2015
12060ac
Merge branch 'dev' of https://github.com/huangpf/azure-powershell int…
huangpf Jun 19, 2015
5b7e101
Merge pull request #27 from Azure/dev
AzureRT Jun 19, 2015
1c364bd
Merge branch 'dev' of https://github.com/AzureRT/azure-powershell int…
huangpf Jun 19, 2015
a85908c
remove local package
huangpf Jun 19, 2015
40726f6
update
huangpf Jun 19, 2015
30c5052
Merge pull request #26 from huangpf/dev
AzureRT Jun 19, 2015
ef1956a
Add-AzureVMNetworkInterface takes NIC object
Jun 19, 2015
e443703
Save-AzureVMImage to a file.
Jun 19, 2015
b8ec404
Merge branch 'dev' of https://github.com/Azure/azure-powershell into dev
Jun 19, 2015
008d390
Merge branch 'dev' of https://github.com/AzureRT/azure-powershell int…
Jun 19, 2015
50c01e6
Merge pull request #26 from Azure/dev
huangpf Jun 19, 2015
d12bbe4
Update AddNetorkInterface test
Jun 19, 2015
f50eca8
Add warning for New-AzureVM Name deprication.
Jun 19, 2015
03d2356
update Test-VirtualMachineCapture test
Jun 19, 2015
4c41b3f
fix the warning message
Jun 19, 2015
1210614
Merge branch 'dev' of https://github.com/Azure/azure-powershell into dev
Jun 19, 2015
cf4f5d9
Merge pull request #28 from hyonholee/dev
AzureRT Jun 19, 2015
528ebe1
Update Tests
huangpf Jun 19, 2015
046d809
Merge branch 'dev' of https://github.com/Azure/azure-powershell into dev
huangpf Jun 19, 2015
70835a7
Merge branch 'dev' of https://github.com/AzureRT/azure-powershell int…
huangpf Jun 19, 2015
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
9 changes: 9 additions & 0 deletions AzurePowershell.Test.targets
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<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>
<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>
<NetworkTestDebug>.\src\ResourceManager\Network\Commands.Network.Test\bin\Debug\Microsoft.Azure.Commands.Network.Test.dll</NetworkTestDebug>
<AzureRTTestSettings>.\src\AzureRT.testsettings</AzureRTTestSettings>
Expand Down Expand Up @@ -393,6 +394,14 @@
ContinueOnError="false" />
</Target>

<Target Name="ComputeCodeCoverage" DependsOnTargets="ForceRestorePackages;Clean;BuildDebug">
<Message Importance="high" Text="Gathering Code Coverage data from Compute tests..." />
<Delete Files="Project.covarage" />
<Exec
Command="C:\cc\ComputeCodeCoverage.cmd $(ComputeDebug) $(ComputeTestDebug)"
ContinueOnError="false" />
</Target>

<!-- DSC extension related targets -->
<Target Name="TestDSCExtension_x64">
<Message Importance="high" Text="Running DSC extension BVT x64 tests..." />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ protected void RunPowerShellTest(params string[] scripts)
modules.Add("Common.ps1");

helper.SetupEnvironment(AzureModule.AzureServiceManagement);
helper.SetupModules(AzureModule.AzureServiceManagement, modules.ToArray());
helper.SetupModulesFromCommon(AzureModule.AzureServiceManagement, modules.ToArray());

helper.RunPowerShellTest(scripts);
}
Expand Down
62 changes: 33 additions & 29 deletions src/Common/Commands.ScenarioTest/Commands.ScenarioTest.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -183,94 +183,97 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.WindowsAzure.Commands.ScenarioTest.AutomationTests\TestAutomationConfigureRunbook.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.WindowsAzure.Commands.ScenarioTest.AutomationTests\TestAutomationPublishAndEditRunbook.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.WindowsAzure.Commands.ScenarioTest.AutomationTests\TestAutomationRunbookWithParameter.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.WindowsAzure.Commands.ScenarioTest.AutomationTests\TestAutomationStartAndStopRunbook.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.WindowsAzure.Commands.ScenarioTest.AutomationTests\TestAutomationStartRunbookOnASchedule.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.WindowsAzure.Commands.ScenarioTest.AutomationTests\TestAutomationStartUnpublishedRunbook.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.WindowsAzure.Commands.ScenarioTest.AutomationTests\TestAutomationSuspendAndResumeJob.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.WindowsAzure.Commands.ScenarioTest.AzureVMTests\TestGetAzureLocation.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.WindowsAzure.Commands.ScenarioTest.AzureVMTests\TestGetAzureVM.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.WindowsAzure.Commands.ScenarioTest.SchedulerTests\TestSchedulerEndToEnd.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.WindowsAzure.Commands.ScenarioTest.TrafficManagerTests\TestAddAzureTrafficManagerEndpoint.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.WindowsAzure.Commands.ScenarioTest.TrafficManagerTests\TestAddAzureTrafficManagerEndpointNoWeightLocation.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.WindowsAzure.Commands.ScenarioTest.TrafficManagerTests\TestAddMultipleAzureTrafficManagerEndpoint.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.WindowsAzure.Commands.ScenarioTest.TrafficManagerTests\TestCreateAndRemoveProfile.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.WindowsAzure.Commands.ScenarioTest.TrafficManagerTests\TestDisableProfile.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.WindowsAzure.Commands.ScenarioTest.TrafficManagerTests\TestDisableProfileWithInvalidCredentials.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.WindowsAzure.Commands.ScenarioTest.TrafficManagerTests\TestEnableProfile.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.WindowsAzure.Commands.ScenarioTest.TrafficManagerTests\TestEnableProfileWithInvalidCredentials.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.WindowsAzure.Commands.ScenarioTest.TrafficManagerTests\TestGetMultipleProfiles.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.WindowsAzure.Commands.ScenarioTest.TrafficManagerTests\TestGetProfile.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.WindowsAzure.Commands.ScenarioTest.TrafficManagerTests\TestGetProfileWithInvalidCredentials.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.WindowsAzure.Commands.ScenarioTest.TrafficManagerTests\TestNewProfile.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.WindowsAzure.Commands.ScenarioTest.TrafficManagerTests\TestNewProfileInvalidParameters.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.WindowsAzure.Commands.ScenarioTest.TrafficManagerTests\TestRemoveAzureTrafficManagerEndpoint.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.WindowsAzure.Commands.ScenarioTest.TrafficManagerTests\TestRemoveProfileWithInvalidCredentials.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.WindowsAzure.Commands.ScenarioTest.TrafficManagerTests\TestRemoveProfileWithNonExistingName.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.WindowsAzure.Commands.ScenarioTest.TrafficManagerTests\TestSetAzureTrafficManagerEndpoint.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.WindowsAzure.Commands.ScenarioTest.TrafficManagerTests\TestSetAzureTrafficManagerEndpointAdds.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.WindowsAzure.Commands.ScenarioTest.TrafficManagerTests\TestSetAzureTrafficManagerEndpointUpdateWeightLocation.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.WindowsAzure.Commands.ScenarioTest.TrafficManagerTests\TestSetProfileProperty.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.WindowsAzure.Commands.ScenarioTest.TrafficManagerTests\TestTestAzureTrafficManagerDomainName.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Resources\Storage\StorageContext.ps1">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
Expand All @@ -287,6 +290,7 @@
<Compile Include="Resources\ResourceLocator.cs" />
<Compile Include="Scheduler\SchedulerTests.cs" />
<Compile Include="ServiceBusTests\ServiceBusAuthorizationRuleTests.cs" />
<Compile Include="ServiceManagement\GetLocationTests.cs" />
<Compile Include="ServiceManagement\GetVMTests.cs" />
<Compile Include="StorageTests\StorageContainerTest.cs" />
<Compile Include="StorageTests\StorageContextTest.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,36 +12,52 @@
# limitations under the License.
# ----------------------------------------------------------------------------------

########################################################################### Create-AzureVM Scenario Tests ###########################################################################

<#
.SYNOPSIS
Tests Create-AzureVM with valid information.
#>
function Test-GetAzureVM
{
# Setup
# Setup

$location = Get-DefaultLocation
$imgName = Get-DefaultImage $location
$location = Get-DefaultLocation
$imgName = Get-DefaultImage $location


$storageName = getAssetName
New-AzureStorageAccount -StorageAccountName $storageName -Location $location
$storageName = getAssetName
New-AzureStorageAccount -StorageAccountName $storageName -Location $location

Set-CurrentStorageAccountName $storageName
Set-CurrentStorageAccountName $storageName

$vmName = "vm1"
$svcName = Get-CloudServiceName
$vmName = "vm1"
$svcName = Get-CloudServiceName

# Test
New-AzureService -ServiceName $svcName -Location $location
New-AzureQuickVM -Windows -ImageName $imgName -Name $vmName -ServiceName $svcName -AdminUsername "pstestuser" -Password "p@ssw0rd"
# Test
New-AzureService -ServiceName $svcName -Location $location
New-AzureQuickVM -Windows -ImageName $imgName -Name $vmName -ServiceName $svcName -AdminUsername "pstestuser" -Password "p@ssw0rd"

Get-AzureVM -ServiceName $svcName -Name $vmName
Get-AzureVM -ServiceName $svcName -Name $vmName


# Cleanup
Cleanup-CloudService $svcName
# Cleanup
Cleanup-CloudService $svcName
}


<#
.SYNOPSIS
Test Get-AzureLocation
#>
function Test-GetAzureLocation
{
$locations = Get-AzureLocation;

foreach ($loc in $locations)
{
$svcName = getAssetName;
$st = New-AzureService -ServiceName $svcName -Location $loc.Name;

# Cleanup
Cleanup-CloudService $svcName
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ Sets the default storage account
function Set-CurrentStorageAccountName
{
param([string] $storageAccountName)
$currentSubscription = Get-AzureSubscription -Current
$currentSubscription = Get-AzureSubscription -Current

Set-AzureSubscription -SubscriptionId $currentSubscription.SubscriptionId -CurrentStorageAccountName $storageAccountName
Set-AzureSubscription -SubscriptionId $currentSubscription.SubscriptionId -CurrentStorageAccountName $storageAccountName
}

<#
Expand All @@ -31,7 +31,7 @@ Gets the default location
#>
function Get-DefaultLocation
{
return (Get-AzureLocation)[0].Name
return (Get-AzureLocation)[0].Name
}

<#
Expand All @@ -41,7 +41,7 @@ Gets the default image
function Get-DefaultImage
{
param([string] $loc)
return (Get-AzureVMImage | where {$_.OS -eq "Windows"} | where {$_.Location.Contains($loc)})[0].ImageName
return (Get-AzureVMImage | where {$_.OS -eq "Windows"} | where {$_.Location.Contains($loc)})[0].ImageName
}


Expand All @@ -51,7 +51,7 @@ Gets valid and available cloud service name.
#>
function Get-CloudServiceName
{
return getAssetName
return getAssetName
}

<#
Expand All @@ -61,14 +61,14 @@ Cleanup cloud service
function Cleanup-CloudService
{
param([string] $name)
try
{
Remove-AzureService -ServiceName $name -Force
}
catch
{
Write-Warning "Cannot Remove the Cloud Service"
}
try
{
Remove-AzureService -ServiceName $name -Force
}
catch
{
Write-Warning "Cannot Remove the Cloud Service"
}
}

<#
Expand All @@ -78,13 +78,13 @@ Cleanup storage
function Cleanup-Storage
{
param([string] $name)
Remove-AzureStorageAccount -StorageAccountName $name
try
{
Remove-AzureStorageAccount -StorageAccountName $name
}
catch
{
Write-Warning "Cannot Remove the Storage Account"
}
Remove-AzureStorageAccount -StorageAccountName $name
try
{
Remove-AzureStorageAccount -StorageAccountName $name
}
catch
{
Write-Warning "Cannot Remove the Storage Account"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// ----------------------------------------------------------------------------------
//
// 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.Common;
using Xunit;

namespace Microsoft.WindowsAzure.Commands.ScenarioTest
{
public partial class AzureVMTests
{
[Fact]
[Trait(Category.Service, Category.ServiceManagement)]
[Trait(Category.AcceptanceType, Category.CheckIn)]
[Trait(Category.AcceptanceType, Category.BVT)]
public void TestGetAzureLocation()
{
this.RunPowerShellTest("Test-GetAzureLocation");
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,14 @@

namespace Microsoft.WindowsAzure.Commands.ScenarioTest
{
public class AzureVMTests
public partial class AzureVMTests
{
private EnvironmentSetupHelper helper = new EnvironmentSetupHelper();

#region Get-AzureVM Scenario Tests

[Fact]
[Trait(Category.Service, Category.ServiceManagement)]
[Trait(Category.AcceptanceType, Category.LiveOnly)]
[Trait(Category.AcceptanceType, Category.BVT)]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestGetAzureVM()
{
this.RunPowerShellTest("Test-GetAzureVM");
Expand All @@ -52,9 +50,10 @@ protected void RunPowerShellTest(params string[] scripts)

List<string> modules = Directory.GetFiles("Resources\\ServiceManagement", "*.ps1").ToList();
modules.Add("Common.ps1");
modules.Add(@"..\..\..\..\Package\Debug\ServiceManagement\Azure\Azure.psd1");

helper.SetupEnvironment(AzureModule.AzureServiceManagement);
helper.SetupModules(AzureModule.AzureServiceManagement, modules.ToArray());
helper.SetupModules(modules.ToArray());

helper.RunPowerShellTest(scripts);
}
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ protected void RunPowerShellTest(params string[] scripts)
SetupManagementClients();

helper.SetupEnvironment(AzureModule.AzureServiceManagement);
helper.SetupModules(AzureModule.AzureServiceManagement,
helper.SetupModulesFromCommon(AzureModule.AzureServiceManagement,
"Resources\\Websites\\Common.ps1",
"Resources\\Websites\\" + this.GetType().Name + ".ps1");

Expand Down
Loading