Refactored waiting for Vault process; do not bother running vault status
Some checks failed
Test / tests (darwin-amd64) (push) Successful in 20s
Test / tests (linux-amd64) (push) Successful in 21s
Test / tests (linux-arm64) (push) Successful in 3m45s
Run Gosec / tests (push) Successful in 6m51s
Test / tests (windows-amd64) (push) Has been cancelled

This commit is contained in:
2025-09-09 15:50:01 +02:00
parent de5808c6b4
commit 8b866752ee

View File

@@ -78,36 +78,4 @@ if (-not $isReady) {
exit 1 exit 1
} }
# Set environment variables
$env:VAULT_ADDR = "https://127.0.0.1:8200"
$env:VAULT_TOKEN = "test-token"
$env:VAULT_SKIP_VERIFY = "true"
# Final check with vault status (with timeout)
Write-Output "🕐 Performing final status check..."
$statusJob = Start-Job -ScriptBlock {
& ".\vault.exe" status
return $LASTEXITCODE
}
# Wait for job with timeout
$statusJob | Wait-Job -Timeout 10 | Out-Null
if ($statusJob.State -eq "Running") {
Write-Output "Status check timed out after 10 seconds"
$statusJob | Stop-Job -Force
$statusResult = -1
} else {
$statusResult = Receive-Job -Job $statusJob
}
$statusJob | Remove-Job -Force
if ($statusResult -ne 0) {
Write-Output "❌ Vault status check failed after startup"
Write-Output "Status exit code: $statusResult"
Stop-Process -Id $vaultPid -Force -ErrorAction SilentlyContinue
exit 1
}
Write-Output "✅ Vault server started successfully!" Write-Output "✅ Vault server started successfully!"