-
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
ConfigMap labels are ignored when using mock KubernetesServer #1125
Comments
drigz
added a commit
to drigz/kubernetes-client
that referenced
this issue
Jul 27, 2018
This supports simple label selectors (eg foo=bar). The != operator would go beyond the limits of the AttributeSet-based matching in CrudDispatcher. There was a test using labels in ConfigMapCrudTest, but it was only passing because, at the point of execution, all resources match the label executor. This change moves changes the order of assertions so that the effect of the label selector is observable. This should fix fabric8io#1125, although I haven't tested that code directly.
drigz
added a commit
to drigz/kubernetes-client
that referenced
this issue
Jul 27, 2018
This supports simple label selectors (eg foo=bar). The != operator would go beyond the limits of the AttributeSet-based matching in CrudDispatcher. There was a test using labels in ConfigMapCrudTest, but it was only passing because, at the point of execution, all resources match the label selector. This change moves changes the order of assertions so that the effect of the label selector is observable. This should fix fabric8io#1125, although I haven't tested that code directly.
drigz
added a commit
to drigz/kubernetes-client
that referenced
this issue
Jul 27, 2018
This supports simple label selectors (eg foo=bar). The != operator would go beyond the limits of the AttributeSet-based matching in CrudDispatcher. There was a test using labels in ConfigMapCrudTest, but it was only passing because, at the point of execution, all resources match the label selector. This change moves changes the order of assertions so that the effect of the label selector is observable. This should fix fabric8io#1125, although I haven't tested that code directly.
rohanKanojia
pushed a commit
that referenced
this issue
Jul 31, 2018
* Support label selectors in mock server This supports simple label selectors (eg foo=bar). The != operator would go beyond the limits of the AttributeSet-based matching in CrudDispatcher. There was a test using labels in ConfigMapCrudTest, but it was only passing because, at the point of execution, all resources match the label selector. This change moves changes the order of assertions so that the effect of the label selector is observable. This should fix #1125, although I haven't tested that code directly. * Fix PodCrudTest's use of label selector It was only passing before because the label selector was ignored. * Improve flexibility of URL parsing As recommended by @lordofthejars. I renamed PROTOCOL to SCHEME to match the convention of HttpUrl.
Closed via #1158 |
The fix is scheduled for version 4.0.4 |
rohanKanojia
pushed a commit
to rohanKanojia/kubernetes-client
that referenced
this issue
Aug 28, 2018
* Support label selectors in mock server This supports simple label selectors (eg foo=bar). The != operator would go beyond the limits of the AttributeSet-based matching in CrudDispatcher. There was a test using labels in ConfigMapCrudTest, but it was only passing because, at the point of execution, all resources match the label selector. This change moves changes the order of assertions so that the effect of the label selector is observable. This should fix fabric8io#1125, although I haven't tested that code directly. * Fix PodCrudTest's use of label selector It was only passing before because the label selector was ignored. * Improve flexibility of URL parsing As recommended by @lordofthejars. I renamed PROTOCOL to SCHEME to match the convention of HttpUrl.
rohanKanojia
pushed a commit
to rohanKanojia/kubernetes-client
that referenced
this issue
Aug 28, 2018
* Support label selectors in mock server This supports simple label selectors (eg foo=bar). The != operator would go beyond the limits of the AttributeSet-based matching in CrudDispatcher. There was a test using labels in ConfigMapCrudTest, but it was only passing because, at the point of execution, all resources match the label selector. This change moves changes the order of assertions so that the effect of the label selector is observable. This should fix fabric8io#1125, although I haven't tested that code directly. * Fix PodCrudTest's use of label selector It was only passing before because the label selector was ignored. * Improve flexibility of URL parsing As recommended by @lordofthejars. I renamed PROTOCOL to SCHEME to match the convention of HttpUrl.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here's the simple method that fetches list of configmaps with a particular label value:
In the unit test below one configmap has proper label and the other one has not. So I expect that the method returns 1:
However the unit test fails because the method return 2 instead of 1.
I'm using
kubernetes-client
andkubernetes-server-mock
version 3.2.0Here's the complete source code: my-app.zip
The text was updated successfully, but these errors were encountered: