We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
/version
I want to override the VersionInfo returned by the io.fabric8.kubernetes.client.server.mock.KubernetesServer.
io.fabric8.kubernetes.client.server.mock.KubernetesServer
Some easy way to specify the version the mock shall return
this.server.expect().get().withPath("/version") .andReturn(200, new VersionInfo.Builder().withMajor("1").withMinor("18+").build()) .always();
This doesn't work for me as the expectation from KubernetesMockServer#onStart() is returned
KubernetesMockServer#onStart()
introduced with #3562
The text was updated successfully, but these errors were encountered:
Currently using this as workaround:
KubernetesMockServer mock = this.server.getKubernetesMockServer(); mock.clearExpectations(); mock.expect().get().withPath("/").andReturn(200, new RootPathsBuilder().addToPaths(mock.getRootPaths()).build()).always(); mock.expect().get().withPath("/version") .andReturn(200, new VersionInfo.Builder().withMajor("1").withMinor("18+").build()) .always();
Sorry, something went wrong.
Related to quarkusio/quarkus#23023
Hi @joshiste The default version expectation provisioning was added as a feature in #3562 (#3536).
Your approach is the recommended ATM. However, we left the door open for future improvements.
One of the alternatives would be to expose the VersionInfo field:
kubernetes-client/kubernetes-server-mock/src/main/java/io/fabric8/kubernetes/client/server/mock/KubernetesMockServer.java
Line 44 in 258f49a
However, I'm not convinced about this approach.
Feedback is welcome ;)
manusa
Successfully merging a pull request may close this issue.
Is your enhancement related to a problem? Please describe
I want to override the VersionInfo returned by the
io.fabric8.kubernetes.client.server.mock.KubernetesServer
.Describe the solution you'd like
Some easy way to specify the version the mock shall return
Describe alternatives you've considered
This doesn't work for me as the expectation from
KubernetesMockServer#onStart()
is returnedAdditional context
introduced with #3562
The text was updated successfully, but these errors were encountered: