Add discovery client to config#612
Merged
scothis merged 2 commits intoreconcilerio:mainfrom Apr 3, 2025
Merged
Conversation
Signed-off-by: Scott Andrews <scott@andrews.me>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #612 +/- ##
==========================================
+ Coverage 59.44% 59.65% +0.20%
==========================================
Files 36 36
Lines 4118 4144 +26
==========================================
+ Hits 2448 2472 +24
- Misses 1570 1571 +1
- Partials 100 101 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
scothis
commented
Apr 1, 2025
testing/config.go
Outdated
| // each call to the clientset providing the ability to mutate the resource or inject an error. | ||
| WithReactors []ReactionFunc | ||
| // GivenDiscoveryResources populates the fake discovery client | ||
| GivenDiscoveryResources []*metav1.APIResourceList |
Member
Author
There was a problem hiding this comment.
Can we partially populate this by default from the scheme?
Member
Author
There was a problem hiding this comment.
fields needs to be set in each *TestCase that ExpectConfig derives from.
| c.client.PrependReactor("*", "*", reactor) | ||
| } | ||
| c.apiReader = c.createClient(apiGivenObjects, c.StatusSubResourceTypes) | ||
| c.discovery = &fakediscovery.FakeDiscovery{ |
Member
Author
There was a problem hiding this comment.
can we power the client and apiReader RESTMapper from this discovery client?
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.
No description provided.