Skip to content
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

Add parent resource as a given #206

Merged
merged 1 commit into from Apr 17, 2022
Merged

Conversation

scothis
Copy link
Contributor

@scothis scothis commented Apr 17, 2022

In a real controller the parent reconciler loads the parent resource
from the api server. When testing a sub reconciler, we can assume the
parent resource as a given resource.

Users who want to test when the parent resource is deleted from the api
server after the reconciliation starts can use a reactor to inject a
not found error.

Signed-off-by: Scott Andrews andrewssc@vmware.com

In a real controller the parent reconciler loads the parent resource
from the api server. When testing a sub reconciler, we can assume the
parent resource as a given resource.

Users who want to test when the parent resource is deleted from the api
server after the reconciliation starts can use a reactor to inject a
not found error.

Signed-off-by: Scott Andrews <andrewssc@vmware.com>
@codecov
Copy link

codecov bot commented Apr 17, 2022

Codecov Report

Merging #206 (e44970e) into main (e62fea5) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #206   +/-   ##
=======================================
  Coverage   64.71%   64.71%           
=======================================
  Files           8        8           
  Lines         768      768           
=======================================
  Hits          497      497           
  Misses        256      256           
  Partials       15       15           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e62fea5...e44970e. Read the comment docs.

@scothis scothis merged commit d3021c6 into vmware-labs:main Apr 17, 2022
@scothis scothis deleted the given-parent branch April 17, 2022 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants