Skip to content

Conversation

@sebhoss
Copy link
Contributor

@sebhoss sebhoss commented Sep 17, 2025

This adds a trycmd based test to verify stdout of kopium for various CLI flags. Run cargo test --test trycmd_tests to execute the tests and compare the output to the committed state or run TRYCMD=overwrite cargo test --test trycmd_tests to update the committed state.

I've used [..] to mask the kopium version to allow changing versions without modifying tests for future releases.

These tests show the error from #370, e.g., in https://github.com/sebhoss/kopium/blob/trycmd/tests/cmd/generate/from-file.md?plain=1#L19 we output #[kube(status = "APIStatus")] but in https://github.com/sebhoss/kopium/blob/trycmd/tests/cmd/generate/from-file.md?plain=1#L73 we create a struct called ApiStatus

@clux WDYT?

Signed-off-by: Sebastian Hoß <[email protected]>
Copy link
Member

@clux clux left a comment

Choose a reason for hiding this comment

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

thanks a lot. this looks generally sensible to me. 2 minor comments

Signed-off-by: Sebastian Hoß <[email protected]>
Copy link
Member

@clux clux left a comment

Choose a reason for hiding this comment

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

tyvm!

@clux clux merged commit 4b6e1bd into kube-rs:main Sep 17, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants