-
Notifications
You must be signed in to change notification settings - Fork 196
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 support for Compute/Image and Compute/Snapshot #2090
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2090 +/- ##
==========================================
- Coverage 56.33% 56.30% -0.04%
==========================================
Files 554 562 +8
Lines 103002 105195 +2193
==========================================
+ Hits 58027 59227 +1200
- Misses 37786 38581 +795
- Partials 7189 7387 +198
Continue to review full report at Codecov.
|
Taskfile.yml
Outdated
@@ -252,7 +252,11 @@ tasks: | |||
deps: [controller:run-kustomize-for-envtest] | |||
cmds: | |||
# -race fails at the moment in controller-runtime | |||
- go test -timeout 15m -run '{{default ".*" .TEST_FILTER}}' ./internal/controllers | |||
|
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.
minor: Extra newline here that looks unneeded?
tc.CreateResourceAndWait(image) | ||
tc.Expect(image.Status.Id).ToNot(BeNil()) | ||
imageARMId := *image.Status.Id | ||
|
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.
minor: Most tests we try to do a patch/update section too (just to ensure patch/update works and catch any possible issues in the RP like what @babbageclunk found where they didn't accept PUT for update). See for example the crd_networking_publicip_test.go
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 didn't find any properties that could be patched after the initial create.
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.
You can almost always patch Tags
, but it's not all that interesting since we use that trick in lots of other places already so it's unlikely it's going to be broken for just this resource. I'm fine with no Patch here.
} | ||
|
||
tc.CreateResourceAndWait(snapshot) | ||
tc.Expect(snapshot.Status.Id).ToNot(BeNil()) |
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.
Same comment, assert on a few key properties (disk size?)
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.
Added asserts.
3ab5639
to
46e8535
Compare
What this PR does / why we need it:
Adds support for two new resources - Compute/Image and Compute/Snapshot.
Closes #2057
How does this PR make you feel:
If applicable: