fix(test): remove duplicate OVA context, use systemd calendar format for backup schedule

- Remove duplicate 'OVA Import' context that used wrong parameter name
  (NewVmId vs VmId) — original OVA test context at line 1227 is correct
- Fix backup job schedule from cron syntax ('0 3 * * 6') to systemd
  calendar event format ('sat 03:00') which PVE 9 requires

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Clint Branham
2026-03-21 08:03:38 -05:00
parent a72642d203
commit c6fd0d36fc
@@ -1371,34 +1371,6 @@ Describe 'Integration Tests' -Tag 'Integration' {
}
}
# -----------------------------------------------------------------------
Context 'OVA Import' {
BeforeAll {
function Skip-IfNoOva {
if (-not $script:OvaPath) {
Set-ItResult -Skipped -Because 'PVETEST_OVA_PATH is not set'
}
}
}
It 'Should import a VM from OVA file' {
Skip-IfNoOva
$vmId = 9900 + (Get-Random -Maximum 99)
$result = Import-PveOva -Node $script:Node -Path $script:OvaPath -Storage $script:Storage -NewVmId $vmId -ErrorAction Stop
$result | Should -Not -BeNullOrEmpty
$script:CreatedVmIds.Add($vmId) | Out-Null
}
It 'Should find the imported VM' {
Skip-IfNoOva
if ($script:CreatedVmIds.Count -eq 0 -or $script:CreatedVmIds[-1] -lt 9900) {
Set-ItResult -Skipped -Because 'OVA import did not create a VM'
}
$vm = Get-PveVm -Node $script:Node | Where-Object { $_.VmId -eq $script:CreatedVmIds[-1] }
$vm | Should -Not -BeNullOrEmpty
}
}
# -----------------------------------------------------------------------
Context 'Firewall — Cluster Rules' {
It 'Should create a firewall rule' {
@@ -1442,7 +1414,7 @@ Describe 'Integration Tests' -Tag 'Integration' {
Context 'Backup Jobs' {
It 'Should create a backup job' {
Skip-IfNoTarget
{ New-PveBackupJob -Schedule '0 3 * * 6' -Storage $script:Storage -Mode snapshot -Comment 'pester-test-backup' -ErrorAction Stop } | Should -Not -Throw
{ New-PveBackupJob -Schedule 'sat 03:00' -Storage $script:Storage -Mode snapshot -Comment 'pester-test-backup' -ErrorAction Stop } | Should -Not -Throw
}
It 'Should list backup jobs and find the test job' {