Skip to content
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

Received event after patch using @EnableMockOperator #30

Closed
jmformenti opened this issue Sep 30, 2022 · 3 comments
Closed

Received event after patch using @EnableMockOperator #30

jmformenti opened this issue Sep 30, 2022 · 3 comments

Comments

@jmformenti
Copy link

I found a weird behaviour creating a test using @EnableMockOperator.

When I return the control using patchStatus:

return UpdateControl.patchStatus(resource);

I receive immediately a new event for that resource, but if I'm not wrong, this is not the behaviour expected. I mean in a real Kubernetes cluster after patchStatus I don't receive a new event for that resource.

In the other hand, if I use updateStatus with @EnableMockOperatorit works fine, I mean I don't receive a new event.

@csviri
Copy link
Contributor

csviri commented Oct 3, 2022

Hi @jmformenti
this seems to be an issue in mock server. Pls create an issue in Fabric8 Client:
https://github.com/fabric8io/kubernetes-client

Since the mock server is implemented there.
thank you!

@jmformenti
Copy link
Author

Hi Attila
Even a patch was submitted to kubernetes-client, I still have the same issue.
In the issue opened in kubernetes-client (fabric8io/kubernetes-client#4478), there is this quote:

Unless the mock server is made aware of the nullable / defaulting behavior - https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#defaulting-and-nullable we don't be able to handle this robustly on the mock side.

Does it make sense for you?

@jmformenti
Copy link
Author

Oh, my bad, there was a stupid mistake on my side.
Now it's working fine 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants