Skip to content

Commit a0a914a

Browse files
committed
Updating the test for set slot & updating the session record
1 parent 87317a8 commit a0a914a

File tree

4 files changed

+1544
-1080
lines changed

4 files changed

+1544
-1080
lines changed

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,6 @@
300300
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
301301
</ItemGroup>
302302
<ItemGroup />
303-
<!--<Import Project="..\..\..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets" Condition="Exists('..\..\..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets')" />-->
304303
<Import Project="..\..\..\..\tools\Common.Dependencies.Test.targets" />
305304
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
306305
</Project>

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -525,15 +525,18 @@ function Test-SetWebAppSlot
525525
# Assert
526526
Assert-AreEqual $appWithSlotName $slot.Name
527527
Assert-AreEqual $serverFarm1.Id $slot.ServerFarmId
528+
Assert-Null $webApp.Identity
528529

529-
# Change service plan
530-
$job = Set-AzureRmWebAppSlot -ResourceGroupName $rgname -Name $appname -Slot $slotname -AppServicePlan $planName2 -AsJob
530+
# Change service plan & set properties
531+
$job = Set-AzureRmWebAppSlot -ResourceGroupName $rgname -Name $appname -Slot $slotname -AppServicePlan $planName2 -HttpsOnly $true -AssignIdentity $true -AsJob
531532
$job | Wait-Job
532533
$slot = $job | Receive-Job
533534

534535
# Assert
535536
Assert-AreEqual $appWithSlotName $slot.Name
536537
Assert-AreEqual $serverFarm2.Id $slot.ServerFarmId
538+
Assert-AreEqual $true $slot.HttpsOnly
539+
Assert-NotNull $slot.Identity
537540

538541
# Set config properties
539542
$slot.SiteConfig.HttpLoggingEnabled = $true

src/ResourceManager/Websites/Commands.Websites.Test/SessionRecords/Microsoft.Azure.Commands.Websites.Test.ScenarioTests.WebAppSlotTests/TestSetWebAppSlot.json

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

0 commit comments

Comments
 (0)