mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-15 14:14:39 +00:00
Finalize fields.Selector
This commit is contained in:
@@ -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,
|
||||
|
@@ -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))
|
||||
}
|
||||
|
Reference in New Issue
Block a user