-
Notifications
You must be signed in to change notification settings - Fork 225
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
tests: skip update portions of the test if we don't have an update configured. #2281
Merged
google-oss-prow
merged 1 commit into
GoogleCloudPlatform:master
from
justinsb:dont_try_update_if_not_updateunstruct
Jul 17, 2024
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Oops, something went wrong.
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.
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.
It seems like there's a plan to move away from
SkipUpdate
so disregard if this point will become moot in the future but as I onboarded on the code base, what I liked about this failure is that it gave me a strong signal for how to set up the fixtures tests.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.
I don't know if there's a plan per-se :-) I think the information in SkipUpdate is redundant - if we have an update.yaml then SkipUpdate must be true. So that's why I don't want to rely on it.
I do think we want tests for coverage e.g. does every kind have a create & update test, is every field in a kind touched in at least one test, are all mutable fields updated in at least one test etc. But I think those should be explicit tests (and they're more like apilinters, in that they are testing our tests, not testing the controllers itself)
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.
We probably need a better way to ensure coverage. This change isn't really part of it.
Regarding testdata, if we do want to enforce the existence of update.yaml, we probably should do it via a unit test but not the integration test.