Skip to content

Conversation

@josephwoodward
Copy link
Contributor

@josephwoodward josephwoodward commented Dec 7, 2025

This change adds gotestfmt to the test output for local and CI test context and providers clearer test output, making it easier to navigate failed tests.

You can check the output out here under Test:
https://github.com/redpanda-data/connect/actions/runs/20029086927/job/57433439325?pr=3827

image image
@josephwoodward josephwoodward changed the title Update CI to use gotest for better test output Dec 7, 2025
@josephwoodward josephwoodward changed the title Update CI to use gotestfmt for clearer CI test output Dec 7, 2025
@josephwoodward josephwoodward force-pushed the jw/improvetestoutput branch 3 times, most recently from 57f872e to 32387e8 Compare December 8, 2025 11:30
@josephwoodward josephwoodward marked this pull request as ready for review December 8, 2025 12:04
@josephwoodward josephwoodward changed the title Update CI to use gotestfmt for clearer test output Dec 8, 2025
- name: Docs
run: CGO_ENABLED=1 TAGS=x_benthos_extra task docs && test -z "$(git ls-files --others --modified --exclude-standard)" || { >&2 echo "Stale docs detected. This can be fixed with 'task docs'."; exit 1; }

- name: Install gotestfmt
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this needs to be built I wonder could we cache it?

@josephwoodward josephwoodward force-pushed the jw/improvetestoutput branch 2 times, most recently from 8659448 to 8a08b66 Compare December 9, 2025 12:53
Comment on lines 28 to 29
deps:
- :tools:install-gotestfmt
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would cause compilation on every test run. Overall it feels like the tools file needs a refactor from install-X to just X with caching. Alternatively, for simplicity, we could drop the deps.

Copy link
Contributor Author

@josephwoodward josephwoodward Dec 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes it would. Alternatively we could check to see if the binary exists and if not return a message informing the user to install dependencies.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking into this further, I've added a precondition step that will verify if gotestfmt binary is available in the bin directory, otherwise it'll return a notice informing the user to install it first.

- ut
vars:
TIMEOUT: '{{if .CI}}5m{{else}}1m{{end}}'
preconditions:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants