Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: fix assertions for run command #4204

Merged
merged 1 commit into from
May 9, 2023
Merged

test: fix assertions for run command #4204

merged 1 commit into from
May 9, 2023

Conversation

vvagaytsev
Copy link
Collaborator

Garden emits non-repeatable warning "Project is configured with apiVersion: garden.io/v0, running with backwards compatibility." Thus, the variable logMessages may contain 2 lines. This commit introduces helper function expectLogsContain to check if there is at least one entry of a given sample among all log lines.

What this PR does / why we need it:
Patch for #4195

Which issue(s) this PR fixes:
It makes the log-checking unit test assertions more stable by taking into account non-repeatable warnings.

Special notes for your reviewer:

Garden emits non-repeatable warning "Project is configured with `apiVersion: garden.io/v0`, running with backwards compatibility."
Thus, the variable `logMessages` may contain 2 lines. This commit introduces helper function `expectLogsContain` to check if there is at least one entry of a given sample among all log lines.
@vvagaytsev vvagaytsev requested review from stefreak, Walther and eysi09 May 9, 2023 06:05
@vvagaytsev vvagaytsev mentioned this pull request May 9, 2023
@vvagaytsev vvagaytsev requested a review from edvald May 9, 2023 06:07
Copy link
Contributor

@Walther Walther left a comment

Choose a reason for hiding this comment

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

I'm terribly sorry, this was my bad. I added the change for apiVersion in the config files at the last minute in the GitHub UI from a review suggestion, but did not wait for all the tests to complete before merging, as the tests had already passed before. I promise to be more careful in the future. Thank you for the quick fix! 🙇‍♂️

@vvagaytsev
Copy link
Collaborator Author

vvagaytsev commented May 9, 2023

@Walther no worries :) Huge thanks to you and @stefreak for improving UX and ensuring backwards compatibility.

@vvagaytsev vvagaytsev merged commit 192b664 into 0.13 May 9, 2023
@vvagaytsev vvagaytsev deleted the 0.13-patch-4195 branch May 9, 2023 06:33
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