Fix run reports and Windows Home policy planning
Windows tests / test-and-build (push) Canceled after 0s
Windows tests / test-and-build (push) Canceled after 0s
This commit is contained in:
1 parent
942b849306
commit
22d06ac7fd
19 files changed
+72
-43
No files matched your search
+7
-5
@@ -45,12 +45,14 @@ function New-Plan { param($Harness,[string[]]$Ids=@('advertising-id','clipboard-
|
||||
function Apply-Test { param($Harness,$Plan) Invoke-WindTransaction -Plan $Plan -Context $Harness.Context -Store $Harness.Store -Save $Harness.Save -InstallationId 'test-installation' }
|
||||
function Restore-Test { param($Harness,$Journal) Restore-WindTransaction -Journal $Journal -Store $Harness.Store -Save $Harness.Save -InstallationId 'test-installation' }
|
||||
|
||||
Run-Test 'Home is unsupported even if a matching policy value exists' {
|
||||
Run-Test 'Home applies only explicitly documented direct registry controls' {
|
||||
$h=New-Harness; $h.Context.Edition='Core'
|
||||
$plan=New-Plan $h
|
||||
Assert-True (@($plan | Where-Object Status -NE 'Unsupported').Count -eq 0) 'Home policies must not be called enforced.'
|
||||
Assert-Throws { Apply-Test $h $plan }
|
||||
Assert-True ($h.State.Writes -eq 0 -and $h.State.Saves -eq 0) 'Unsupported apply touched state.'
|
||||
$plan=@(Get-WindPlan -Context $h.Context -Store $h.Store -Id @('advertising-id','implicit-text-collection','windows-error-reporting'))
|
||||
Assert-True (($plan|Where-Object Id -EQ 'advertising-id').Status-eq'Unsupported') 'Managed-edition policy was offered on Home.'
|
||||
$eligible=@($plan|Where-Object Status -EQ 'WouldChange')
|
||||
Assert-True ($eligible.Id-contains'implicit-text-collection'-and$eligible.Id-contains'windows-error-reporting') 'Documented direct registry controls were not offered on Home.'
|
||||
$j=Apply-Test $h $eligible
|
||||
Assert-True ($j.Status-eq'Applied'-and$h.State.Writes-eq2) 'Home direct registry controls were not applied transactionally.'
|
||||
}
|
||||
Run-Test 'Unknown build is audit-only' {
|
||||
$h=New-Harness; $h.Context.Build=99999
|
||||
|
||||
Reference in new issue
Block a user