-
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
chore(crd-generator): Add approval tests for crd-generator api-v2 #5978
Conversation
I have copied within the first commit the approval tests from the api module without changes. |
I'd actually like to move this outside so that the same tests can be shared by the two modules. |
Quality Gate passedIssues Measures |
There are some differences between the used source files and the output:
In conclusion, neither the source files nor the approval files can be used for both without further adjustments. Do you have an idea how to overcome this problem? |
I want to spend some time on this (probably on Monday). Will probably require some adjustments to the test files (and maybe the serialization settings for v2). My initial goal would be to not duplicate the tests preserving as much as possible so that we can get a clear idea of what's changing. |
I see this as a hard requirement as it's also the correct behavior. I don't think we want to support a mode of the CRD generator where it's operating on record / struct like beans - that aren't actually usable by the fabric8 client. So the existing source files should be adjusted to use the Data annotation, the fields made public, etc.
It would be easier to change the serialization of v1 to match v2. Changing the serialization for v2 will mean adding serialization options to the KuberentesSerializer, which so far we have avoided. |
No hurries, I just wanted to start with the discussion on the strategy (there are many ways, so I started with simplest way). Please let me know, if I can help and don't hesitate to close the PR if it's easier for you. |
Description
Add approval tests for crd-generator api-v2.
Refers to #5850
Type of change
test, version modification, documentation, etc.)