martian(test): implement testHelper pattern#939
Merged
Conversation
a07ea69 to
28ce120
Compare
When I was trying to change martian behaviour that needed some tests to be adjusted, I realised they are in a poor condition. This patch introduces a testHelper to add some structure and reuse similar code blocks.
level=warning msg="[lintersdb] The name "goerr113" is deprecated. The linter has been renamed to: err113. level=warning msg="The linter 'execinquery' is deprecated (since v1.58.0) due to: The repository of the linter has been archived by the owner." level=warning msg="The linter 'exportloopref' is deprecated (since v1.60.2) due to: Since Go1.22 (loopvar) this linter is no longer relevant. Replaced by copyloopvar."
28ce120 to
fe630b5
Compare
Contributor
|
Sweet. |
mmatczuk
approved these changes
Oct 15, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When I was trying to change martian behaviour that needed some tests to be adjusted, I realised they are in a poor condition. This patch introduces a testHelper to add some structure and reuse similar code blocks. That way it reduces around 150 LoC. It also leaves the tests in better shape for further refactors.