ci: fix smoke test failing on curl | grep -q under pipefail
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -84,6 +84,7 @@ jobs:
|
||||
|
||||
- name: Smoke test
|
||||
run: |
|
||||
set -x
|
||||
apt-get install -y -qq ./out/devdesk_*.deb >/dev/null
|
||||
/usr/lib/devdesk/bin/ttyd --version
|
||||
test -s /etc/devdesk/secret.env
|
||||
@@ -95,7 +96,9 @@ jobs:
|
||||
for _ in $(seq 1 30); do curl -s -o /dev/null localhost:7681/ && break; sleep 0.2; done
|
||||
code=$(curl -s -o /dev/null -w '%{http_code}' localhost:7681/)
|
||||
[ "$code" = 401 ] || { echo "expected 401 without credential, got $code"; exit 1; }
|
||||
curl -sf -u "$DEVDESK_CREDENTIAL" localhost:7681/ | grep -q 'name="generator" content="devdesk"'
|
||||
# Download first: `curl | grep -q` fails under pipefail (grep exits early, curl gets SIGPIPE).
|
||||
curl -sf -u "$DEVDESK_CREDENTIAL" -o page.html localhost:7681/
|
||||
grep -q 'name="generator" content="devdesk"' page.html
|
||||
curl -sf -u "$DEVDESK_CREDENTIAL" localhost:7681/token | jq -e '.token | length > 0'
|
||||
DEVDESK_NO_SYSTEMD=1 devdesk attach --list | jq -e '.default == "main"'
|
||||
echo "smoke test passed"
|
||||
|
||||
Reference in New Issue
Block a user