remove: disable Drag Tray feature and related configurations (#850)

To ensure old backups continue to function, backup handling now skips any unknown features found in backups.
This commit is contained in:
Jeffrey
2026-10-24 01:30:25 +02:00
committed by GitHub
parent 7d9777d6c6
commit 0eec316edb
19 changed files with 207 additions and 89 deletions
+3
View File
@@ -27,6 +27,7 @@ Describe 'Import-RegistryBackup' {
It 'parses and normalizes registry snapshots from a real backup structure' {
Mock Test-UserNameMatch { $true }
Mock Get-RegistryBackupValidationPlanMap { @{} }
Mock ConvertTo-CompatibleRegistryKeySnapshots { param($RegistryKeys) $RegistryKeys }
Mock Test-RegistryBackupAgainstAllowList { @() }
$result = Import-RegistryBackup -FilePath (Join-Path $script:JsonFixturePath 'RegistryBackup.RealStructure.json')
@@ -61,6 +62,7 @@ Describe 'ConvertTo-NormalizedRegistryBackup' {
BeforeEach {
$script:Features = @{ Example = [PSCustomObject]@{ FeatureId = 'Example'; RegistryKey = 'Example.reg' } }
Mock Get-RegistryBackupValidationPlanMap { @{} }
Mock ConvertTo-CompatibleRegistryKeySnapshots { param($RegistryKeys) $RegistryKeys }
Mock Test-RegistryBackupAgainstAllowList { @() }
Mock Write-Error {}
}
@@ -122,6 +124,7 @@ Describe 'Restore-RegistryBackupState' {
Mock Test-UserNameMatch { $true }
Mock Write-Error {}
Mock Get-RegistryBackupValidationPlanMap { @{} }
Mock ConvertTo-CompatibleRegistryKeySnapshots { param($RegistryKeys) $RegistryKeys }
Mock Test-RegistryBackupAgainstAllowList { @() }
$script:backup = [PSCustomObject]@{
Version = '1.0'; BackupType = 'RegistryState'; Target = 'CurrentUser:Tester'; SelectedFeatures = @('Example')