[deploy] Fixes from the Windows smoke: the admin host has no health path (every API path needs a sign-in), -NoService keeps the person who ran it in the folder's ACL, paths may have backslashes; Pebble 2.6.0 in the CI image (the ACME test's version)

This commit is contained in:
2026-11-17 20:55:41 +01:00
parent 49c05e2523
commit d5d522fe4b
4 changed files with 18 additions and 10 deletions
+4 -3
View File
@@ -105,9 +105,9 @@ try {
$url = & (Join-Path $repo 'scripts\preview.ps1') open -Project 'shop' -Branch 'fix-42' -Upstream "http://127.0.0.1:$AppPort" -Ttl 3600
Check ($url -eq 'https://fix-42--shop.pv.smoke.test/') "preview URL $url"
$ca = Join-Path $offline 'domi-root.crt'
$body = & curl.exe -sS --cacert $ca --resolve "fix-42--shop.pv.smoke.test:${Https}:127.0.0.1" "https://fix-42--shop.pv.smoke.test:$Https/"
$body = & curl.exe -sS --ssl-no-revoke --cacert $ca --resolve "fix-42--shop.pv.smoke.test:${Https}:127.0.0.1" "https://fix-42--shop.pv.smoke.test:$Https/"
Check ($body -eq 'hello from fix-42') "the preview answers through Caddy with a Domi certificate ($body)"
$code = & curl.exe -s -o NUL -w '%{http_code}' --cacert $ca --resolve "ianitor.smoke.test:${Https}:127.0.0.1" "https://ianitor.smoke.test:$Https/api/v1/team"
$code = & curl.exe -s -o NUL -w '%{http_code}' --ssl-no-revoke --cacert $ca --resolve "ianitor.smoke.test:${Https}:127.0.0.1" "https://ianitor.smoke.test:$Https/api/v1/team"
Check ($code -eq '401') "the admin host reaches control and needs a sign-in ($code)"
$deny = & curl.exe -s -o NUL -w '%{http_code}' -H "Authorization: Bearer $previewTok" "$base/api/v1/hosts"
Check ($deny -eq '403') "the preview token cannot read the hosts ($deny)"
@@ -119,10 +119,11 @@ try {
$deadline = (Get-Date).AddSeconds(90)
do {
Start-Sleep 2
$code = & curl.exe -s -o NUL -w '%{http_code}' --cacert $ca --resolve "fix-42--shop.pv.smoke.test:${Https}:127.0.0.1" "https://fix-42--shop.pv.smoke.test:$Https/"
$code = & curl.exe -s -o NUL -w '%{http_code}' --ssl-no-revoke --cacert $ca --resolve "fix-42--shop.pv.smoke.test:${Https}:127.0.0.1" "https://fix-42--shop.pv.smoke.test:$Https/"
} until (($code -ne '200') -or (Get-Date) -gt $deadline)
Check ($code -ne '200') "gone after close ($code)"
Write-Host 'SMOKE PASSED'
$global:LASTEXITCODE = 0
} finally {
foreach ($p in $procs) { try { Stop-Process -Id $p.Id -Force -ErrorAction SilentlyContinue } catch {} }
Remove-Item Env:\IANITOR_PREVIEW_TOKEN -ErrorAction SilentlyContinue