KubernetesMockServer does not return same List type as Kubernetes Api Server #6220
Labels
bug
component/kubernetes-server-mock
Deals with the kubernetes-server-mock directory mainly
component/openshift-server-mock
Deals with the openshift-server-mock
Describe the bug
Related to #1601
This issue applies to scenarios when you're using Kubernetes Mock Server with clients other than Fabric8 Kubernetes Client.
When you use KubernetesMockServer in crud mode to get response of
list()
query operations, you'd get response like this:However, with a real Kubernetes API server, we get a concrete List type
This is coming from here:
kubernetes-client/junit/kubernetes-server-mock/src/main/java/io/fabric8/kubernetes/client/server/mock/KubernetesResponseComposer.java
Lines 30 to 32 in 6c24a98
This will work for KubernetesClient, however with other clients it causes problems in parsing list-objects.
Fabric8 Kubernetes Client version
SNAPSHOT
Steps to reproduce
Set up Kubernetes Mock Server with some other client and try doing list request, it would fail
Expected behavior
Kubernetes Mock Server list response should be same as Kubernetes Api Server
Runtime
other (please specify in additional context)
Kubernetes API Server version
1.25.3@latest
Environment
Linux
Fabric8 Kubernetes Client Logs
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: