-
Notifications
You must be signed in to change notification settings - Fork 32
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: fix unit tests #20
Conversation
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: eddycharly 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 |
ah did not see this before I opened my own. Im thinking maybe we should close this in favor of #21, since I changed some things to support the patches in the tests. since the OpenAPI schema for native types is incomplete, part of the kubectl-validate project is to work on upstream types to improve the quality of the schemas, and back port the changes to earlier k8s schemas via patching |
@alexzielenski no problem to close it. Still, creating pods with containers having no image is valid, we should at least make the patching optional. |
Do you have a source/example of this? When I try to apply the case to my cluster I get the expected error, and in the source for Container validation there is logic to throw this error: $ kubectl apply -f testcases/manifests/error_missing_image.yaml
The Pod "nginx-pod" is invalid: spec.containers[0].image: Required value
$ kubectl apply -f testcases/manifests/error_missing_image.yaml --server-side=true
The Pod "nginx-pod" is invalid: spec.containers[0].image: Required value |
/close in favor of #21 |
@alexzielenski: Closed this PR. In response to this:
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/test-infra repository. |
Hmmm maybe it’s just on openshift ? |
This PR fixes unit tests.
One thing though, creating a pod with a container that has no image is valid.
@alexzielenski It looks like we are patching the schema to make image a required field ?