mirror of
https://github.com/GoodOlClint/PSProxmoxVE.git
synced 2026-08-30 08:49:20 +00:00
fix(test): add -Confirm:$false to all ConfirmImpact.High cmdlet calls in tests
ConfirmImpact.High causes interactive confirmation prompts in non-interactive CI, blocking before ProcessRecord runs. Add -Confirm:$false to all Stop-PveVm, Reset-PveVm, Remove-*, Restore-*, and New-PveTemplate calls in both unit and integration tests. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -244,7 +244,7 @@ Describe 'Stop-PveContainer' {
|
||||
Context 'Without active session' {
|
||||
It 'Should throw when no session is active' {
|
||||
Skip-IfMissing 'Stop-PveContainer'
|
||||
{ Stop-PveContainer -Node 'pve-node1' -VmId 200 -ErrorAction Stop } |
|
||||
{ Stop-PveContainer -Node 'pve-node1' -VmId 200 -Confirm:$false -ErrorAction Stop } |
|
||||
Should -Throw '*No active Proxmox VE session*'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -224,7 +224,7 @@ Describe 'Remove-PveContainerSnapshot' {
|
||||
Context 'Without active session' {
|
||||
It 'Should throw when no session is active (without -WhatIf)' {
|
||||
Skip-IfMissing 'Remove-PveContainerSnapshot'
|
||||
{ Remove-PveContainerSnapshot -Node 'pve-node1' -VmId 100 -Name 'snap1' -ErrorAction Stop } |
|
||||
{ Remove-PveContainerSnapshot -Node 'pve-node1' -VmId 100 -Name 'snap1' -Confirm:$false -ErrorAction Stop } |
|
||||
Should -Throw '*No active Proxmox VE session*'
|
||||
}
|
||||
}
|
||||
@@ -292,7 +292,7 @@ Describe 'Restore-PveContainerSnapshot' {
|
||||
Context 'Without active session' {
|
||||
It 'Should throw when no session is active (without -WhatIf)' {
|
||||
Skip-IfMissing 'Restore-PveContainerSnapshot'
|
||||
{ Restore-PveContainerSnapshot -Node 'pve-node1' -VmId 100 -Name 'snap1' -ErrorAction Stop } |
|
||||
{ Restore-PveContainerSnapshot -Node 'pve-node1' -VmId 100 -Name 'snap1' -Confirm:$false -ErrorAction Stop } |
|
||||
Should -Throw '*No active Proxmox VE session*'
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user