diff --git a/catalyst-gateway/tests/Earthfile b/catalyst-gateway/tests/Earthfile index 5520801fdda..8f5b5c5df4b 100644 --- a/catalyst-gateway/tests/Earthfile +++ b/catalyst-gateway/tests/Earthfile @@ -7,7 +7,7 @@ package-schemathesis: ARG max_examples=1000 ARG max_response_time=200 ARG wait_for_schema=15 - ARG workers=1 + ARG workers=2 ARG schema_version=30 ARG openapi_spec @@ -31,7 +31,7 @@ package-schemathesis: test-fuzzer-api: FROM earthly/dind:alpine-3.19 RUN apk update && apk add iptables-legacy # workaround for https://github.com/earthly/earthly/issues/3784 - RUN apk add yq + RUN apk add yq zstd ARG DB_URL="postgres://catalyst-event-dev:CHANGE_ME@localhost/CatalystEventDev" ARG CAT_ADDRESS="127.0.0.1:3030" ARG OPENAPI_SPEC="http://127.0.0.1:3030/docs/cat-gateway.json" @@ -46,21 +46,19 @@ test-fuzzer-api: --service cat-gateway \ --allow-privileged RUN docker run --net=host --name=st schemathesis:latest || echo fail > fail && \ - docker logs cat-gateway > ./cat-gateway.log && \ + docker logs cat-gateway > ./cat-gateway.log && zstd -9 cat-gateway.log && \ docker cp st:/results/junit-report.xml junit-report.xml && \ docker cp st:/results/cassette.yaml cassette.yaml END WAIT SAVE ARTIFACT junit-report.xml AS LOCAL schemathesis.junit-report.xml - SAVE ARTIFACT cat-gateway.log AS LOCAL cat-gateway.log + SAVE ARTIFACT cat-gateway.log.zst AS LOCAL cat-gateway.log.zst SAVE ARTIFACT cassette.yaml AS LOCAL cassette.yaml END IF [ -f fail ] - RUN echo -e "\033[0;31mSchemathesis test run failed\n" && \ + RUN echo -e "\033[0;31mSchemathesis test run failed. Run the test locally to get Catalyst Gateway logs\n" && \ echo -e "\033[0;31mFailed tests:" && \ yq -PC '.http_interactions.[] | select(.status == "FAILURE")' cassette.yaml && \ - echo -e "\033[0;31mCatalyst Gateway logs:" && \ - jq --color-output . cat-gateway.log cat-gateway.log && \ exit 1 END