Fix/ci container manual start (#20)
CI Main / Bats tests (push) Successful in 1m34s
acc-tests Link to Cucumber reports
CI Main / Cucumber tests (push) Successful in 51s
CI Main / Load example-gitea-env.conf to pipeline env (push) Successful in 21s
CI Main / Check existing artifact (push) Successful in 13s
unit-tests Link to Bats reports
ci-docker-build-push Docker build & push 0.2.7 OK
CI Main / Build & Push Docker (push) Successful in 41s
CI Main / Report Summary (push) Successful in 6s
CI Main / Move provider version tag (push) Successful in 12s
CI Main / Bats tests (push) Successful in 1m34s
acc-tests Link to Cucumber reports
CI Main / Cucumber tests (push) Successful in 51s
CI Main / Load example-gitea-env.conf to pipeline env (push) Successful in 21s
CI Main / Check existing artifact (push) Successful in 13s
unit-tests Link to Bats reports
ci-docker-build-push Docker build & push 0.2.7 OK
CI Main / Build & Push Docker (push) Successful in 41s
CI Main / Report Summary (push) Successful in 6s
CI Main / Move provider version tag (push) Successful in 12s
Co-authored-by: moilanik <niko.moilanen@tietoevry.com> Reviewed-on: #20
This commit was merged in pull request #20.
This commit is contained in:
@@ -24,6 +24,14 @@ _wait_port_free() {
|
||||
done
|
||||
}
|
||||
|
||||
_wait_port_ready() {
|
||||
local i=0
|
||||
while ! lsof -ti ":$MOCK_PORT" >/dev/null 2>&1 && [ $i -lt 5 ]; do
|
||||
sleep 0.2
|
||||
i=$((i + 1))
|
||||
done
|
||||
}
|
||||
|
||||
mock_set_sequence() {
|
||||
MOCK_SEQUENCE_FILE=$(mktemp)
|
||||
echo "$1" | jq -c '.' > "$MOCK_SEQUENCE_FILE"
|
||||
@@ -55,7 +63,7 @@ mock_start() {
|
||||
nohup python3 "$(dirname "${BASH_SOURCE[0]}")/mock-server.py" "$MOCK_PORT" "$MOCK_CONFIG_FILE" "$MOCK_REQUEST_FILE" \
|
||||
</dev/null >/dev/null 2>&1 &
|
||||
MOCK_PID=$!
|
||||
sleep 1
|
||||
_wait_port_ready
|
||||
}
|
||||
|
||||
mock_stop() {
|
||||
|
||||
Reference in New Issue
Block a user