Skip to content

Test rewrite improvements#2

Merged
darkowlzz merged 2 commits intodarkowlzz:testenv-refactorfrom
fluxcd:test-refactor-improv
Nov 11, 2021
Merged

Test rewrite improvements#2
darkowlzz merged 2 commits intodarkowlzz:testenv-refactorfrom
fluxcd:test-refactor-improv

Conversation

@squaremo
Copy link
Copy Markdown

@squaremo squaremo commented Nov 9, 2021

A couple of readability improvements that don't add too many LoC. Readability is subjective, of course -- use what you want :-)

This is just a cosmetic thing -- there's no need for the higher-order
func used to create mini test suites, given the protocol and git
implementation. This made the Gingko version clearer, arguably, but it
can be reduced away here for a bit less nesting.

Signed-off-by: Michael Bridgen <michael@weave.works>
This tidies the random string testWithRepoAndImagePolicy() arguments
into a struct, which reduces clutter (and the chance of getting them
in the wrong order) in invocations.

Signed-off-by: Michael Bridgen <michael@weave.works>
Copy link
Copy Markdown
Owner

@darkowlzz darkowlzz left a comment

Choose a reason for hiding this comment

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

Thanks. Looks so much better now.

@darkowlzz darkowlzz merged commit f1f674a into darkowlzz:testenv-refactor Nov 11, 2021
@darkowlzz darkowlzz deleted the test-refactor-improv branch November 11, 2021 15:22
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