mirror of
https://github.com/GoodOlClint/PSProxmoxVE.git
synced 2026-08-10 06:16:53 +00:00
fix(test): replace null-coalescing operator for PS 5.1 compatibility
PS 5.1 cannot parse the ?? operator (PS 7.0+), causing a discovery error even though integration tests are excluded by tag. Replace with if/else that works on all PS versions. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -55,7 +55,8 @@ BeforeAll {
|
||||
|
||||
# Convenience accessors (only meaningful when SkipReason is null)
|
||||
$script:Host_ = [System.Environment]::GetEnvironmentVariable('PVETEST_HOST')
|
||||
$script:Port = [int]([System.Environment]::GetEnvironmentVariable('PVETEST_PORT') ?? '8006')
|
||||
$portEnv = [System.Environment]::GetEnvironmentVariable('PVETEST_PORT')
|
||||
$script:Port = [int]$(if ($portEnv) { $portEnv } else { '8006' })
|
||||
$script:ApiToken = [System.Environment]::GetEnvironmentVariable('PVETEST_APITOKEN')
|
||||
$script:Node = [System.Environment]::GetEnvironmentVariable('PVETEST_NODE')
|
||||
$script:Storage = [System.Environment]::GetEnvironmentVariable('PVETEST_STORAGE')
|
||||
|
||||
Reference in New Issue
Block a user