Skip to content

Commit bc590ee

Browse files
committed
Merge pull request #1569 from akurmi/dev
Adding AseName and AseResourceGroupName parameters in New-AzureRmAppServicePlan cmdlet
2 parents 320d022 + 800718a commit bc590ee

File tree

8 files changed

+774
-2
lines changed

8 files changed

+774
-2
lines changed

ChangeLog.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
* Azure Redis Cache: new cmdlets for enabling and disabling diagnostics
22
* Set-AzureRmRedisCacheDiagnostics
33
* Remove-AzureRmRedisCacheDiagnostics
4+
* Azure Websites: New cmdlets for managing SSL binding
5+
* Get-AzureRmWebAppCertificate
6+
* New-AzureRmWebAppSSLBinding
7+
* Get-AzureRmWebAppSSLBinding
8+
* Remove-AzureRmWebAppSSLBinding
9+
* Azure Websites: Added AseName and AseResourceGroupName parameters in New-AzureRmAppServicePlan cmdlet
10+
411
## 2015.12.14 version 1.0.2
512
* Azure Compute (ARM):
613
* Enable BGInfo extension by default

src/ResourceManager/Websites/Commands.Websites.Test/Commands.Websites.Test.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,9 @@
171171
<None Include="SessionRecords\Microsoft.Azure.Commands.Websites.Test.ScenarioTests.AppServicePlanTests\TestCreateNewAppServicePlan.json">
172172
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
173173
</None>
174+
<None Include="SessionRecords\Microsoft.Azure.Commands.Websites.Test.ScenarioTests.AppServicePlanTests\TestCreateNewAppServicePlanInAse.json">
175+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
176+
</None>
174177
<None Include="SessionRecords\Microsoft.Azure.Commands.Websites.Test.ScenarioTests.AppServicePlanTests\TestGetAppServicePlan.json">
175178
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
176179
</None>

src/ResourceManager/Websites/Commands.Websites.Test/ScenarioTests/AppServicePlanTests.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,5 +55,12 @@ public void TestGetAppServicePlanMetrics()
5555
{
5656
WebsitesController.NewInstance.RunPsTest("Test-GetAppServicePlanMetrics");
5757
}
58+
59+
[Fact]
60+
[Trait(Category.AcceptanceType, Category.CheckIn)]
61+
public void TestCreateNewAppServicePlanInAse()
62+
{
63+
WebsitesController.NewInstance.RunPsTest("Test-CreateNewAppServicePlanInAse");
64+
}
5865
}
5966
}

src/ResourceManager/Websites/Commands.Websites.Test/ScenarioTests/AppServicePlanTests.ps1

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,4 +309,49 @@ function Test-GetAppServicePlanMetrics
309309
Remove-AzureRmAppServicePlan -ResourceGroupName $rgname -Name $appServicePlanName -Force
310310
Remove-AzureRmResourceGroup -Name $rgname -Force
311311
}
312+
}
313+
314+
<#
315+
.SYNOPSIS
316+
Tests creating a new Web Hosting Plan.
317+
#>
318+
function Test-CreateNewAppServicePlanInAse
319+
{
320+
# Setup
321+
$rgname = Get-ResourceGroupName
322+
$whpName = Get-WebHostPlanName
323+
$location = "West US"
324+
$capacity = 1
325+
$skuName = "S2"
326+
$aseName = "asedemo"
327+
$aseResourceGroupName = "appdemorg"
328+
329+
try
330+
{
331+
#Setup
332+
New-AzureRmResourceGroup -Name $rgname -Location $location
333+
334+
# Test
335+
$createResult = New-AzureRmAppServicePlan -ResourceGroupName $rgname -Name $whpName -Location $location -Tier "Standard" -WorkerSize Medium -NumberOfWorkers $capacity -AseName $aseName -AseResourceGroupName $aseResourceGroupName
336+
337+
# Assert
338+
Assert-AreEqual $whpName $createResult.Name
339+
Assert-AreEqual "Standard" $createResult.Sku.Tier
340+
Assert-AreEqual $skuName $createResult.Sku.Name
341+
Assert-AreEqual $capacity $createResult.Sku.Capacity
342+
343+
# Assert
344+
345+
$getResult = Get-AzureRmAppServicePlan -ResourceGroupName $rgname -Name $whpName
346+
Assert-AreEqual $whpName $getResult.Name
347+
Assert-AreEqual "Standard" $getResult.Sku.Tier
348+
Assert-AreEqual $skuName $getResult.Sku.Name
349+
Assert-AreEqual $capacity $getResult.Sku.Capacity
350+
}
351+
finally
352+
{
353+
# Cleanup
354+
Remove-AzureRmAppServicePlan -ResourceGroupName $rgname -Name $whpName -Force
355+
Remove-AzureRmResourceGroup -Name $rgname -Force
356+
}
312357
}

0 commit comments

Comments
 (0)