mirror of
https://github.com/GoodOlClint/PSProxmoxVE.git
synced 2026-09-02 18:28:07 +00:00
refactor: make all integration test files self-contained
Each test file now creates and cleans up its own resources: - 06_VMs: restores own AfterAll cleanup for pester-test-vm - 07_Snapshots: creates pester-snap-vm, tests snapshots, cleans up - 09_CloudInit: creates pester-ci-vm with cloud-init drive, cleans up - 15_Tasks: creates pester-task-vm, tests task CRUD, cleans up Removed cross-file dependency helpers (Find-TestVm, Register-TestResource) from _IntegrationHelper.ps1 — no longer needed. Each file can now run independently via -Tests filter. If a Setup context fails, subsequent tests in the same file skip gracefully. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -62,7 +62,6 @@ Describe 'Linux VM — Integration' -Tag 'Integration' {
|
||||
|
||||
$script:LinuxVmId = $vm.VmId
|
||||
$script:CreatedVmIds.Add($vm.VmId)
|
||||
Register-TestResource -Name 'pester-linux-vm' -VmId $vm.VmId
|
||||
}
|
||||
|
||||
It 'Should import cloud image disk (Import-PveVmDisk)' {
|
||||
|
||||
Reference in New Issue
Block a user