Skip to content
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

[AppServices]: Fix #16325 and #14624 : Expose HealthCheckPath SiteConfig in Set-AzWebApp, Set-AzWebAppSlot, Get-AzWebApp and Get-AzWebAppSlot #17326

Merged
merged 7 commits into from
Mar 9, 2022
2 changes: 2 additions & 0 deletions src/Websites/Websites.Test/ScenarioTests/WebAppSlotTests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,7 @@ function Test-SetWebAppSlot
$slot.SiteConfig.RequestTracingEnabled = $true
$slot.SiteConfig.FtpsState = "FtpsOnly"
$slot.SiteConfig.MinTlsVersion = "1.0"
$slot.SiteConfig.HealthCheckPath = "/api/path"
Kotasudhakarreddy marked this conversation as resolved.
Show resolved Hide resolved

$slot = $slot | Set-AzWebAppSlot

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

# set app settings and connection strings
$appSettings = @{ "setting1" = "valueA"; "setting2" = "valueB"}
Expand Down
2 changes: 2 additions & 0 deletions src/Websites/Websites.Test/ScenarioTests/WebAppTests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -1238,6 +1238,7 @@ function Test-SetWebApp
$webapp.SiteConfig.RequestTracingEnabled = $true
$webapp.SiteConfig.FtpsState = "FtpsOnly"
$webApp.SiteConfig.MinTlsVersion = "1.0"
$webApp.SiteConfig.HealthCheckPath = "/api/path"

# Set site properties
$webApp = $webApp | Set-AzWebApp
Expand All @@ -1252,6 +1253,7 @@ function Test-SetWebApp
Assert-AreEqual $false $webApp.SiteConfig.AlwaysOn
Assert-AreEqual "FtpsOnly" $webApp.SiteConfig.FtpsState
Assert-AreEqual "1.0" $webApp.SiteConfig.MinTlsVersion
Assert-AreEqual "/api/path" $webApp.SiteConfig.HealthCheckPath

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

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion src/Websites/Websites/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
- Additional information about change #1
-->
## Upcoming Release
* Fixed DateTime conversion issue caused by culture
* Fixed `Set-AzWebApp`,`Set-AzWebAppSlot`, `Get-AzWebApp`, `Get-AzWebAppSlot` to expose HealthCheckPath property in SiteConfig [#16325]
* Fixed DateTime conversion issue caused by culture [#17253]

## Version 2.10.0
* Updated `New-AzAppServicePlan` to create an app service plan with host environment id #16094
Expand Down
6 changes: 4 additions & 2 deletions src/Websites/Websites/Utilities/CmdletHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ public static class CmdletHelpers
"NumberOfWorkers",
"AlwaysOn",
"MinTlsVersion",
"FtpsState"
"FtpsState",
"HealthCheckPath"
};

public static HashSet<string> SiteParameters = new HashSet<string>
Expand Down Expand Up @@ -569,7 +570,8 @@ internal static SiteConfig ConvertToSiteConfig(this SiteConfigResource config)
FtpsState = config.FtpsState,
ScmIpSecurityRestrictions = config.ScmIpSecurityRestrictions,
ScmIpSecurityRestrictionsUseMain = config.ScmIpSecurityRestrictionsUseMain,
Http20Enabled = config.Http20Enabled
Http20Enabled = config.Http20Enabled,
HealthCheckPath = config.HealthCheckPath
};
}

Expand Down