Skip to content

Commit c236f7e

Browse files
[AppServices]: Fix #16325 and #14624 : Expose HealthCheckPath SiteConfig in Set-AzWebApp, Set-AzWebAppSlot, Get-AzWebApp and Get-AzWebAppSlot (#17326)
* Fix #17184 : `Get-AzWebApp` to return SiteConfig details in the response when requested the WebApps under subscreption * Revert "Fix #17184 : `Get-AzWebApp` to return SiteConfig details in the response when requested the WebApps under subscreption" This reverts commit 96a4d28. * Fix #16325- Expose HealthCheckPath SiteConfig * Addressed review comments * Review comments Co-authored-by: Beisi Zhou <[email protected]>
1 parent 66afbe4 commit c236f7e

File tree

8 files changed

+14241
-8945
lines changed

8 files changed

+14241
-8945
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -461,6 +461,7 @@ function Test-SetWebAppSlot
461461
$slot.SiteConfig.RequestTracingEnabled = $true
462462
$slot.SiteConfig.FtpsState = "FtpsOnly"
463463
$slot.SiteConfig.MinTlsVersion = "1.0"
464+
$slot.SiteConfig.HealthCheckPath = "/api/path"
464465

465466
$slot = $slot | Set-AzWebAppSlot
466467

@@ -471,6 +472,7 @@ function Test-SetWebAppSlot
471472
Assert-AreEqual $true $slot.SiteConfig.RequestTracingEnabled
472473
Assert-AreEqual "FtpsOnly" $slot.SiteConfig.FtpsState
473474
Assert-AreEqual "1.0" $slot.SiteConfig.MinTlsVersion
475+
Assert-AreEqual "/api/path" $slot.SiteConfig.HealthCheckPath
474476

475477
# set app settings and connection strings
476478
$appSettings = @{ "setting1" = "valueA"; "setting2" = "valueB"}

src/Websites/Websites.Test/ScenarioTests/WebAppTests.ps1

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1238,6 +1238,7 @@ function Test-SetWebApp
12381238
$webapp.SiteConfig.RequestTracingEnabled = $true
12391239
$webapp.SiteConfig.FtpsState = "FtpsOnly"
12401240
$webApp.SiteConfig.MinTlsVersion = "1.0"
1241+
$webApp.SiteConfig.HealthCheckPath = "/api/path"
12411242

12421243
# Set site properties
12431244
$webApp = $webApp | Set-AzWebApp
@@ -1252,6 +1253,7 @@ function Test-SetWebApp
12521253
Assert-AreEqual $false $webApp.SiteConfig.AlwaysOn
12531254
Assert-AreEqual "FtpsOnly" $webApp.SiteConfig.FtpsState
12541255
Assert-AreEqual "1.0" $webApp.SiteConfig.MinTlsVersion
1256+
Assert-AreEqual "/api/path" $webApp.SiteConfig.HealthCheckPath
12551257

12561258
$appSettings = @{ "setting1" = "valueA"; "setting2" = "valueB"}
12571259
$connectionStrings = @{ connstring1 = @{ Type="MySql"; Value="string value 1"}; connstring2 = @{ Type = "SQLAzure"; Value="string value 2"}}

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

Lines changed: 790 additions & 562 deletions
Large diffs are not rendered by default.

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

Lines changed: 1864 additions & 1921 deletions
Large diffs are not rendered by default.

src/Websites/Websites.Test/SessionRecords/Microsoft.Azure.Commands.Websites.Test.ScenarioTests.WebAppTests/TestGetWebApp.json

Lines changed: 7027 additions & 1681 deletions
Large diffs are not rendered by default.

src/Websites/Websites.Test/SessionRecords/Microsoft.Azure.Commands.Websites.Test.ScenarioTests.WebAppTests/TestSetWebApp.json

Lines changed: 4550 additions & 4778 deletions
Large diffs are not rendered by default.

src/Websites/Websites/ChangeLog.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
- Additional information about change #1
1919
-->
2020
## Upcoming Release
21-
* Fixed DateTime conversion issue caused by culture
21+
* Fixed `Set-AzWebApp`,`Set-AzWebAppSlot`, `Get-AzWebApp`, `Get-AzWebAppSlot` to expose HealthCheckPath property in SiteConfig [#16325]
22+
* Fixed DateTime conversion issue caused by culture [#17253]
2223

2324
## Version 2.10.0
2425
* Updated `New-AzAppServicePlan` to create an app service plan with host environment id #16094

src/Websites/Websites/Utilities/CmdletHelpers.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ public static class CmdletHelpers
2929
"NumberOfWorkers",
3030
"AlwaysOn",
3131
"MinTlsVersion",
32-
"FtpsState"
32+
"FtpsState",
33+
"HealthCheckPath"
3334
};
3435

3536
public static HashSet<string> SiteParameters = new HashSet<string>
@@ -569,7 +570,8 @@ internal static SiteConfig ConvertToSiteConfig(this SiteConfigResource config)
569570
FtpsState = config.FtpsState,
570571
ScmIpSecurityRestrictions = config.ScmIpSecurityRestrictions,
571572
ScmIpSecurityRestrictionsUseMain = config.ScmIpSecurityRestrictionsUseMain,
572-
Http20Enabled = config.Http20Enabled
573+
Http20Enabled = config.Http20Enabled,
574+
HealthCheckPath = config.HealthCheckPath
573575
};
574576
}
575577

0 commit comments

Comments
 (0)