-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Enhance e2e Tests: Validate Conversion with Mock Scenario #4297
Comments
/assign |
Hi! This is my first Kubernetes issue. Can the mock data yaml file be found somewhere or is it dynamically generated? Where can I find documentation on the structure of v1 and v2 ConversionTest objects? Thank you for any guidance! |
/assign |
Hi @robinlovell13 @sureshkrishnan-v The goal of the change is replace the TODO for the code implementation here: https://github.com/kubernetes-sigs/kubebuilder/blob/master/test/e2e/v4/plugin_cluster_test.go#L412-L413 If you check here: https://github.com/kubernetes-sigs/kubebuilder/blob/master/test/e2e/v4/plugin_cluster_test.go#L69-L103 You can see the test scenarios covered. Then, you can see that the mock tests are generating calling the tool, uncomment and injecting code here: https://github.com/kubernetes-sigs/kubebuilder/blob/master/test/e2e/v4/generate_test.go In this way, to answer See the code implementation to generate the conversion webhook used on the tests: kubebuilder/test/e2e/v4/generate_test.go Lines 378 to 440 in 820372e
|
What broke? What's expected?
Description:
Enhance the existing e2e tests by ensuring that a valid mock scenario is created and verifying that the conversion webhook functions as expected. Currently, there is a TODO note to add checks and validate the conversion’s success in our e2e tests, but this validation has not yet been implemented.
Reference:
The relevant section can be found here: plugin_cluster_test.go#L390-L392.
Enhancements Needed:
Validate Mock Data: Ensure that the mock data used in the test is valid and sufficient to simulate a realistic conversion scenario.
Conversion Check: Implement a check to validate that the conversion occurred as expected according to the webhook’s intended functionality.
Adjust Mock Data if Necessary: Modify the mock data setup if needed to ensure it aligns with the requirements for validating the conversion webhook accurately.
You can check the changes in PR #4296 to understand the current setup, expected outcomes, and to help move forward with this task.
Reproducing this issue
No response
KubeBuilder (CLI) Version
master
PROJECT version
No response
Plugin versions
No response
Other versions
No response
Extra Labels
No response
The text was updated successfully, but these errors were encountered: