Skip to content

Commit dbe1005

Browse files
committed
Fix version smoke test
1 parent 18888cf commit dbe1005

1 file changed

Lines changed: 18 additions & 3 deletions

File tree

.github/workflows/ci.yml

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,24 @@ jobs:
9898
9999
- name: Check version endpoint
100100
run: |
101-
curl -fsS http://localhost:8080/version | python3 - <<'PY'
102-
import json,sys
103-
data = json.load(sys.stdin)
101+
for i in {1..5}; do
102+
if curl -fsS http://localhost:8080/version -o /tmp/version.json; then
103+
if [ -s /tmp/version.json ]; then
104+
break
105+
fi
106+
fi
107+
sleep 1
108+
done
109+
if [ ! -s /tmp/version.json ]; then
110+
echo "version response was empty"
111+
cat /tmp/version.json || true
112+
docker logs sma-ci || true
113+
exit 1
114+
fi
115+
python3 - <<'PY'
116+
import json
117+
with open("/tmp/version.json") as f:
118+
data = json.load(f)
104119
assert "version" in data
105120
assert "lastUpdate" in data
106121
print("version ok")

0 commit comments

Comments
 (0)