File tree Expand file tree Collapse file tree 3 files changed +8
-17
lines changed
Expand file tree Collapse file tree 3 files changed +8
-17
lines changed Original file line number Diff line number Diff line change @@ -288,7 +288,7 @@ jobs:
288288 - name : Run E2E Tests
289289 run : |
290290 earthly --strict --allow-privileged --remote-cache ghcr.io/crossplane/earthly-cache:${{ github.job }}-${{ matrix.test-suite}} \
291- +e2e --FLAGS="-test.failfast -fail-fast -prior-crossplane-version=${CROSSPLANE_PRIOR_VERSION} --test-suite ${{ matrix.test-suite }}"
291+ +e2e --GOTESTSUM_FORMAT="testname" -- FLAGS="-test.failfast -fail-fast -prior-crossplane-version=${CROSSPLANE_PRIOR_VERSION} --test-suite ${{ matrix.test-suite }}"
292292
293293 - name : Publish E2E Test Flakes
294294 if : ' !cancelled()'
Original file line number Diff line number Diff line change 5151 ARG GOARCH= ${TARGETARCH }
5252 ARG GOOS= ${TARGETOS }
5353 ARG FLAGS= "-test-suite=base"
54+ ARG GOTESTSUM_FORMAT= "standard-verbose"
5455 # Using earthly image to allow compatibility with different development environments e.g. WSL
5556 FROM earthly/dind:alpine-3.20-docker-26.1.5-r0
5657 RUN wget https://dl.google.com/go/go${GO_VERSION }.${GOOS }-${GOARCH }.tar.gz
7172 WITH DOCKER --load crossplane-e2e/crossplane:latest= (+image --CROSSPLANE_VERSION = v0.0.0-e2e)
7273 # TODO(negz:) Set GITHUB_ACTIONS=true and use RUN --raw-output when
7374 # https://github.com/earthly/earthly/issues/4143 is fixed.
74- RUN gotestsum --no-color = false --format testname --junitfile e2e-tests.xml --raw-command go tool test2json -t -p E2E ./e2e -test .v ${FLAGS }
75+ RUN gotestsum \
76+ --rerun-fails \
77+ --no-color = false \
78+ --format ${GOTESTSUM_FORMAT } \
79+ --junitfile e2e-tests.xml \
80+ --raw-command go tool test2json -t -p E2E ./e2e -test .v ${FLAGS }
7581 END
7682 FINALLY
7783 SAVE ARTIFACT --if-exists e2e-tests.xml AS LOCAL _output/tests/e2e-tests.xml
Original file line number Diff line number Diff line change @@ -89,21 +89,6 @@ $ apk add kubectl
8989# Now you can use kubectl to access the cluster
9090```
9191
92- ### Test Logging
93-
94- The E2E tests are run using [ ` gotestsum ` ] that helps output the test results in
95- a format that integrates easily with CI systems. The downside though is that
96- test logging statements, like ` t.Logf("foo") ` , are not streamed in real time and
97- they are only included in the output if there is a failure.
98-
99- To change this behavior when running the E2E tests locally, you can update the
100- ` Earthfile ` to call ` gotestsum ` with a format like ` --format standard-verbose `
101- instead, for example:
102-
103- ``` Dockerfile
104- RUN gotestsum --no-color=false --format standard-verbose ...
105- ```
106-
10792### Running Tests Directly
10893
10994The E2E tests are typically run via ` earthly ` for convenience and consistency.
You can’t perform that action at this time.
0 commit comments