config-central/tests/Windows.Integration.Tests.ps1

18 lines
855 B
PowerShell

$runIntegration = $IsWindows -and $env:CONFIG_CENTRAL_INTEGRATION -eq '1'
Describe 'Disposable Windows integration' -Skip:(-not $runIntegration) {
It 'passes doctor on the Windows worker' {
& "$PSScriptRoot/../cc.ps1" doctor -Machine example-desktop -Json
$LASTEXITCODE | Should -Be 0
}
It 'performs two config-only applies idempotently' {
$data = Join-Path $TestDrive 'integration-data'
& "$PSScriptRoot/../cc.ps1" apply -Machine example-desktop -ConfigsOnly -ForceConfigs -DataRoot $data -Json
$LASTEXITCODE | Should -Be 0
$second = & "$PSScriptRoot/../cc.ps1" apply -Machine example-desktop -ConfigsOnly -DataRoot $data -Json | ConvertFrom-Json
$LASTEXITCODE | Should -Be 0
@($second.operations | Where-Object status -eq 'Unchanged').Count | Should -BeGreaterThan 0
}
}