diff --git a/.woodpecker/smoke-init.yml b/.woodpecker/smoke-init.yml index a1c2fbe..5dc9567 100644 --- a/.woodpecker/smoke-init.yml +++ b/.woodpecker/smoke-init.yml @@ -31,7 +31,11 @@ steps: - name: smoke-init image: python:3-alpine 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 & - - 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 diff --git a/tests/__pycache__/mock-forgejo.cpython-311.pyc b/tests/__pycache__/mock-forgejo.cpython-311.pyc new file mode 100644 index 0000000..3f0d93f Binary files /dev/null and b/tests/__pycache__/mock-forgejo.cpython-311.pyc differ