From 12ca01cd0993df04c44e553f3c3a9fec5774803e Mon Sep 17 00:00:00 2001 From: Clint Branham Date: Thu, 26 Mar 2026 08:18:47 -0500 Subject: [PATCH] fix: remove ValidateSet assertion from Set-PveHaRule Type test The ValidateSet attribute was intentionally removed from the Type parameter during merge review to allow future rule types without code changes. Updated test to only assert Type is mandatory. Co-Authored-By: Claude Opus 4.6 (1M context) --- tests/PSProxmoxVE.Tests/HA/HaCmdlets.Tests.ps1 | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/PSProxmoxVE.Tests/HA/HaCmdlets.Tests.ps1 b/tests/PSProxmoxVE.Tests/HA/HaCmdlets.Tests.ps1 index 501cbf9..02e4b4a 100644 --- a/tests/PSProxmoxVE.Tests/HA/HaCmdlets.Tests.ps1 +++ b/tests/PSProxmoxVE.Tests/HA/HaCmdlets.Tests.ps1 @@ -736,14 +736,12 @@ Describe 'Set-PveHaRule' -Tag 'Unit' { $isMandatory = $p.ParameterSets.Values | Where-Object { $_.IsMandatory } $isMandatory | Should -Not -BeNullOrEmpty } - It 'Should have mandatory Type parameter with ValidateSet' { + It 'Should have mandatory Type parameter' { Skip-IfMissing 'Set-PveHaRule' $p = $script:Cmd.Parameters['Type'] $p | Should -Not -BeNullOrEmpty $isMandatory = $p.ParameterSets.Values | Where-Object { $_.IsMandatory } $isMandatory | Should -Not -BeNullOrEmpty - $vsAttr = $p.Attributes | Where-Object { $_ -is [System.Management.Automation.ValidateSetAttribute] } - $vsAttr | Should -Not -BeNullOrEmpty } It 'Should have optional State parameter with ValidateSet' { Skip-IfMissing 'Set-PveHaRule'