Split Windows client bootstrap profiles
This commit is contained in:
@@ -72,6 +72,8 @@ Describe 'SGU public-cloud network safety' {
|
||||
'ConnectivityMode') | Should Be $true
|
||||
((Get-Command $clientBootstrapPath).Parameters.Keys -contains
|
||||
'VpnProfilePackagePath') | Should Be $true
|
||||
((Get-Command $clientBootstrapPath).Parameters.Keys -contains
|
||||
'CompatibilityProfile') | Should Be $true
|
||||
}
|
||||
|
||||
It 'accepts an explicit static IPv4 address for a private Windows adapter' {
|
||||
@@ -106,6 +108,16 @@ Describe 'SGU public-cloud network safety' {
|
||||
$source | Should Match 'Wait-TcpPort -Address \$DomainControllerIPv4Address -Port 5985'
|
||||
}
|
||||
|
||||
It 'keeps legacy and modern Windows package profiles isolated by build' {
|
||||
$source = Get-Content -LiteralPath $clientBootstrapPath -Raw
|
||||
$source.Contains("if (`$CompatibilityProfile -eq 'Windows10Legacy' -and `$windowsBuild -ge 22000)") |
|
||||
Should Be $true
|
||||
$source.Contains("if (`$CompatibilityProfile -eq 'Windows11Modern' -and `$windowsBuild -lt 22000)") |
|
||||
Should Be $true
|
||||
$source.Contains("if (`$CompatibilityProfile -eq 'Windows10Legacy' -and `$ConnectivityMode -eq 'AzureP2S')") |
|
||||
Should Be $true
|
||||
}
|
||||
|
||||
It 'uses an all-user machine-certificate VPN profile' {
|
||||
$source = Get-Content -LiteralPath $azureClientPath -Raw
|
||||
$source | Should Match '-AuthenticationMethod MachineCertificate'
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
$repositoryRoot = (Resolve-Path (Join-Path $PSScriptRoot '..')).Path
|
||||
$localUserScriptPath = Join-Path $repositoryRoot 'scripts\Set-SguStandardLocalUser.ps1'
|
||||
$enrollmentTestScriptPath = Join-Path $repositoryRoot 'scripts\Test-SguClientEnrollment.ps1'
|
||||
$packageScriptPath = Join-Path $repositoryRoot 'scripts\New-SguBootstrapPackages.ps1'
|
||||
$releaseScriptPath = Join-Path $repositoryRoot 'scripts\Publish-GiteaRelease.ps1'
|
||||
$azureLauncherPath = Join-Path $repositoryRoot 'scripts\Start-SguAzureClientEnrollment.cmd'
|
||||
|
||||
$tokens = $null
|
||||
$parseErrors = $null
|
||||
@@ -38,4 +41,25 @@ Describe 'SGU Windows client enrollment scripts' {
|
||||
$localUserSource | Should Not Match '\$verifiedUser\.PasswordNeverExpires'
|
||||
$enrollmentTestSource | Should Not Match '\$standardLocalUser\.PasswordNeverExpires'
|
||||
}
|
||||
|
||||
It 'publishes separate legacy Windows 10 and modern Windows 11 artifacts' {
|
||||
$packageSource = Get-Content -LiteralPath $packageScriptPath -Raw
|
||||
$releaseSource = Get-Content -LiteralPath $releaseScriptPath -Raw
|
||||
$packageSource | Should Match 'sgu-windows10-legacy-client-bootstrap-\$Version'
|
||||
$packageSource | Should Match 'sgu-windows11-client-bootstrap-\$Version'
|
||||
$packageSource | Should Match '-CompatibilityProfile Windows10Legacy'
|
||||
$packageSource | Should Match '-CompatibilityProfile Windows11Modern'
|
||||
$releaseSource | Should Match 'sgu-windows10-legacy-client-bootstrap-\$Version\.zip'
|
||||
$releaseSource | Should Match 'sgu-windows11-client-bootstrap-\$Version\.zip'
|
||||
}
|
||||
|
||||
It 'keeps Azure P2S in the modern Windows 11 artifact' {
|
||||
$packageSource = Get-Content -LiteralPath $packageScriptPath -Raw
|
||||
$azureLauncher = Get-Content -LiteralPath $azureLauncherPath -Raw
|
||||
$packageSource.Contains("Join-Path `$windows11ClientRoot 'Start-SguAzureClientEnrollment.cmd'") |
|
||||
Should Be $true
|
||||
$packageSource.Contains("Join-Path `$windows10ClientRoot 'Start-SguAzureClientEnrollment.cmd'") |
|
||||
Should Be $false
|
||||
$azureLauncher | Should Match '-PauseOnError'
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user