fix: add port cleanup and retry for mock server startup
This commit is contained in:
parent
19b99346ab
commit
7226821b57
2 changed files with 6 additions and 2 deletions
|
|
@ -31,7 +31,11 @@ steps:
|
||||||
- name: smoke-init
|
- name: smoke-init
|
||||||
image: python:3-alpine
|
image: python:3-alpine
|
||||||
commands:
|
commands:
|
||||||
- apk add --no-cache bash curl jq git coreutils
|
- apk add --no-cache bash curl jq git coreutils procps
|
||||||
|
# Kill any existing mock server on port 3000
|
||||||
|
- fuser -k 3000/tcp 2>/dev/null || true
|
||||||
|
- sleep 1 # wait for port to be released
|
||||||
- python3 tests/mock-forgejo.py &
|
- python3 tests/mock-forgejo.py &
|
||||||
- sleep 1 # wait for mock to start
|
# Wait for mock to be ready
|
||||||
|
- for i in $(seq 1 30); do curl -sf http://localhost:3000/api/v1/version >/dev/null 2>&1 && break || sleep 1; done
|
||||||
- bash tests/smoke-init.sh
|
- bash tests/smoke-init.sh
|
||||||
|
|
|
||||||
BIN
tests/__pycache__/mock-forgejo.cpython-311.pyc
Normal file
BIN
tests/__pycache__/mock-forgejo.cpython-311.pyc
Normal file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue