Skip to content

Commit 805482c

Browse files
authored
adds one more worker and compression for catgateway logs (#400)
1 parent 34ea755 commit 805482c

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

catalyst-gateway/tests/Earthfile

+5-7
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ package-schemathesis:
77
ARG max_examples=1000
88
ARG max_response_time=200
99
ARG wait_for_schema=15
10-
ARG workers=1
10+
ARG workers=2
1111
ARG schema_version=30
1212
ARG openapi_spec
1313

@@ -31,7 +31,7 @@ package-schemathesis:
3131
test-fuzzer-api:
3232
FROM earthly/dind:alpine-3.19
3333
RUN apk update && apk add iptables-legacy # workaround for https://github.com/earthly/earthly/issues/3784
34-
RUN apk add yq
34+
RUN apk add yq zstd
3535
ARG DB_URL="postgres://catalyst-event-dev:CHANGE_ME@localhost/CatalystEventDev"
3636
ARG CAT_ADDRESS="127.0.0.1:3030"
3737
ARG OPENAPI_SPEC="http://127.0.0.1:3030/docs/cat-gateway.json"
@@ -46,21 +46,19 @@ test-fuzzer-api:
4646
--service cat-gateway \
4747
--allow-privileged
4848
RUN docker run --net=host --name=st schemathesis:latest || echo fail > fail && \
49-
docker logs cat-gateway > ./cat-gateway.log && \
49+
docker logs cat-gateway > ./cat-gateway.log && zstd -9 cat-gateway.log && \
5050
docker cp st:/results/junit-report.xml junit-report.xml && \
5151
docker cp st:/results/cassette.yaml cassette.yaml
5252
END
5353
WAIT
5454
SAVE ARTIFACT junit-report.xml AS LOCAL schemathesis.junit-report.xml
55-
SAVE ARTIFACT cat-gateway.log AS LOCAL cat-gateway.log
55+
SAVE ARTIFACT cat-gateway.log.zst AS LOCAL cat-gateway.log.zst
5656
SAVE ARTIFACT cassette.yaml AS LOCAL cassette.yaml
5757
END
5858
IF [ -f fail ]
59-
RUN echo -e "\033[0;31mSchemathesis test run failed\n" && \
59+
RUN echo -e "\033[0;31mSchemathesis test run failed. Run the test locally to get Catalyst Gateway logs\n" && \
6060
echo -e "\033[0;31mFailed tests:" && \
6161
yq -PC '.http_interactions.[] | select(.status == "FAILURE")' cassette.yaml && \
62-
echo -e "\033[0;31mCatalyst Gateway logs:" && \
63-
jq --color-output . cat-gateway.log cat-gateway.log && \
6462
exit 1
6563
END
6664

0 commit comments

Comments
 (0)