fix: improve error handling for registry file imports and telemetry scheduled tasks

This commit is contained in:
Jeffrey
2026-08-22 19:29:54 +02:00
parent c921730703
commit b7f612f36e
5 changed files with 173 additions and 93 deletions
+12
View File
@@ -67,6 +67,18 @@ Describe 'Test-ConfigConsistency' {
Test-ConfigConsistency -Config $config | Should -Match 'Apps entries must be strings'
}
It 'reports an error for malformed tweak entries' {
$config = [PSCustomObject]@{ Version = '1.0'; Tweaks = @(@{ Value = $true }) }
Test-ConfigConsistency -Config $config | Should -Match 'Tweaks entries must contain Name and Value properties'
}
It 'reports an error for deployment entries missing a required property' {
$config = [PSCustomObject]@{ Version = '1.0'; Deployment = @(@{ Name = 'CreateRestorePoint' }) }
Test-ConfigConsistency -Config $config | Should -Match 'Deployment entries must contain Name and Value properties'
}
It 'reports an error for nonnumeric deployment indexes' {
$config = [PSCustomObject]@{
Version = '1.0'