Finalize fields.Selector

This commit is contained in:
Salvatore Dario Minonne
2015-03-15 22:51:41 +01:00
parent c3b361f218
commit 31ddefc347
42 changed files with 161 additions and 114 deletions

View File

@@ -23,6 +23,7 @@ import (
"github.com/GoogleCloudPlatform/kubernetes/pkg/api"
"github.com/GoogleCloudPlatform/kubernetes/pkg/client"
"github.com/GoogleCloudPlatform/kubernetes/pkg/fields"
"github.com/GoogleCloudPlatform/kubernetes/pkg/labels"
"github.com/GoogleCloudPlatform/kubernetes/pkg/util"
@@ -96,7 +97,7 @@ var _ = Describe("Events", func() {
By("checking for scheduler event about the pod")
events, err := c.Events(api.NamespaceDefault).List(
labels.Everything(),
labels.Set{
fields.Set{
"involvedObject.kind": "Pod",
"involvedObject.uid": string(podWithUid.UID),
"involvedObject.namespace": api.NamespaceDefault,
@@ -113,7 +114,7 @@ var _ = Describe("Events", func() {
By("checking for kubelet event about the pod")
events, err = c.Events(api.NamespaceDefault).List(
labels.Everything(),
labels.Set{
fields.Set{
"involvedObject.uid": string(podWithUid.UID),
"involvedObject.kind": "Pod",
"involvedObject.namespace": api.NamespaceDefault,

View File

@@ -24,6 +24,7 @@ import (
"github.com/GoogleCloudPlatform/kubernetes/pkg/api"
"github.com/GoogleCloudPlatform/kubernetes/pkg/client"
"github.com/GoogleCloudPlatform/kubernetes/pkg/fields"
"github.com/GoogleCloudPlatform/kubernetes/pkg/labels"
"github.com/GoogleCloudPlatform/kubernetes/pkg/util"
"github.com/GoogleCloudPlatform/kubernetes/pkg/watch"
@@ -130,7 +131,7 @@ var _ = Describe("Pods", func() {
}
Expect(len(pods.Items)).To(Equal(0))
w, err := podClient.Watch(
labels.SelectorFromSet(labels.Set(map[string]string{"time": value})), labels.Everything(), pods.ListMeta.ResourceVersion)
labels.SelectorFromSet(labels.Set(map[string]string{"time": value})), fields.Everything(), pods.ListMeta.ResourceVersion)
if err != nil {
Fail(fmt.Sprintf("Failed to set up watch: %v", err))
}