This repository has been archived by the owner on Jun 29, 2022. It is now read-only.
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.
Override memory limits of rook operator to 512Mi #938
Override memory limits of rook operator to 512Mi #938
Changes from all commits
35bd295
c422331
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With such code, this condition should be put in separate test IMO.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I put it in a separate function, how do I stop when such an error is encountered? If this fails as in
len(m)
is zero then this test will fail on error:Operator deployment config not found
.So catching this before we proceed further makes sense and gives up precise error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, yeah, I this sort of make sense. But other tests will fail gracefully if we remove this condition and we assume all rendering fails? I wonder how this should be handled in Go 🤔 I guess it's fine then 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The way the tests are currently structured, rendering the manifest is not the actual check in the unit test but rather a preliminary step. What @invidian is talking about sounds like treating a zero-length manifest as a test case on its own (which is valid, but possibly a different "category" than the tests in this function).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be honest, I'd prefer to have isolated tests with common helper rather than a dispatcher test, I think it is simpler while not adding much of a boilerplate. This make setup part of the test obvious/explicit.