-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
cleanup(virtctl): More robust VM decoding and minor cleanups in create vm unit and func tests #12794
base: main
Are you sure you want to change the base?
Conversation
Cleanup the virtctl create preference unit tests by: - Reorganizing tests - Removing redundant table entry arguments Signed-off-by: Felix Matouschek <[email protected]>
Cleanup the virtctl create instancetype unit tests by: - Reorganizing tests - Adding missing test cases - Removing redundant table entry arguments Signed-off-by: Felix Matouschek <[email protected]>
Export the ValidatePreferenceSpec func to be consistent with instancetype-admitter.go and to allow use of the validation logic in other places. Signed-off-by: Felix Matouschek <[email protected]>
Valdidate the specs of created instancetypes and preferences by calling ValidateInstanceTypeSpec and ValidatePreferenceSpec, which are also used by the validating admitters. Signed-off-by: Felix Matouschek <[email protected]>
…ests Drop the functional tests of virtctl create instancetype and virtctl create preference because all tests cases are already covered by the unit tests of the commands. The functional tests do not provide any additional value. Signed-off-by: Felix Matouschek <[email protected]>
Make VM decoding a little more robust by using runtime.Decode and apply some minor cleanups throughout the test file. Signed-off-by: Felix Matouschek <[email protected]>
Make VM decoding a little more robust by using runtime.Decode and apply some minor cleanups throughout the test file. Use the instancetype and preference builders to construct resources and drop the no longer required workaround in createVMWithRWOVolume. Also use testsuite.GetTestNamespace(nil) where appropriate. Signed-off-by: Felix Matouschek <[email protected]>
PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/hold Merge after #12754 |
@0xFelix: The following tests failed, say
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
/sig code-quality |
What this PR does
Make VM decoding a little more robust by using runtime.Decode and apply
some minor cleanups throughout the test files.
In the func tests use the instancetype and preference builders to
construct resources and drop the no longer required workaround in
createVMWithRWOVolume. Also use testsuite.GetTestNamespace(nil) where
appropriate.
Before this PR:
After this PR:
Fixes #
Why we need it and why it was done in this way
The following tradeoffs were made:
The following alternatives were considered:
Links to places where the discussion took place:
Special notes for your reviewer
Merge after #12754
Checklist
This checklist is not enforcing, but it's a reminder of items that could be relevant to every PR.
Approvers are expected to review this list.
Release note