mirror of
https://github.com/GoodOlClint/PSProxmoxVE.git
synced 2026-09-03 18:55:33 +00:00
test: drop the fixed sleep and the link0 pin from the cluster tests
New-PveCluster -Wait now guarantees quorum, so the Start-Sleep -Seconds 5 that lost the race is replaced by an assertion on the new contract. The link0 pin is dropped: the join-abort and the never-a-member modes both occurred with and without it, so it was never implicated, and -Links is already covered at the service level. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
committed by
GitHub
parent
2df9f47e2d
commit
1df1b05876
@@ -112,8 +112,11 @@ Describe 'Cluster Config & HA Lifecycle — Integration' -Tag 'Integration' {
|
||||
$result | Should -Not -BeNullOrEmpty
|
||||
$script:ClusterCreated = $true
|
||||
|
||||
# Allow corosync to fully stabilize
|
||||
Start-Sleep -Seconds 5
|
||||
# New-PveCluster -Wait returns only once the cluster is quorate (D014),
|
||||
# which is what makes the join below safe without a sleep.
|
||||
$cluster = @(Get-PveClusterStatus -ErrorAction Stop) |
|
||||
Where-Object { $_.Type -eq 'cluster' } | Select-Object -First 1
|
||||
$cluster.Quorate | Should -Be 1 -Because 'node A must be quorate before node B can join'
|
||||
}
|
||||
|
||||
It 'Get-PveClusterStatus shows cluster formed' {
|
||||
@@ -169,13 +172,10 @@ Describe 'Cluster Config & HA Lifecycle — Integration' -Tag 'Integration' {
|
||||
$joinPw = ConvertTo-SecureString $script:Password -AsPlainText -Force
|
||||
|
||||
try {
|
||||
# ring0 defaults to whatever node B resolves its own hostname to;
|
||||
# pin it to the address the harness verified it answers on.
|
||||
$result = Add-PveClusterMember `
|
||||
-Hostname $script:Host_ `
|
||||
-Fingerprint $fingerprint `
|
||||
-Password $joinPw `
|
||||
-Links "link0=$($script:HostB)" `
|
||||
-Wait `
|
||||
-Confirm:$false `
|
||||
-ErrorAction Stop
|
||||
|
||||
Reference in New Issue
Block a user