Skip to content

Commit 1d48074

Browse files
committed
Address Review
1 parent a7d9e4f commit 1d48074

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

pkg/client/options.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -645,7 +645,7 @@ type MatchingLabelsSelector struct {
645645
// ApplyToList applies this configuration to the given list options.
646646
func (m MatchingLabelsSelector) ApplyToList(opts *ListOptions) {
647647
if m.Selector == nil {
648-
m.Selector = labels.Everything()
648+
m.Selector = labels.Nothing()
649649
}
650650
opts.LabelSelector = m
651651
}
@@ -681,7 +681,7 @@ type MatchingFieldsSelector struct {
681681
// ApplyToList applies this configuration to the given list options.
682682
func (m MatchingFieldsSelector) ApplyToList(opts *ListOptions) {
683683
if m.Selector == nil {
684-
m.Selector = fields.Everything()
684+
m.Selector = fields.Nothing()
685685
}
686686
opts.FieldSelector = m
687687
}

pkg/client/options_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ var _ = Describe("ListOptions", func() {
4444
expectedListOpts := &client.ListOptions{LabelSelector: client.MatchingLabelsSelector{Selector: labelSelector}}
4545
Expect(newListOpts).To(Equal(expectedListOpts))
4646
})
47-
It("Should set LabelSelector to everything with empty MatchingLabelsSelector", func() {
47+
It("Should set LabelSelector to nothing with empty MatchingLabelsSelector", func() {
4848
newListOpts := &client.ListOptions{}
4949
newListOpts.ApplyOptions([]client.ListOption{client.MatchingLabelsSelector{}})
50-
expectedListOpts := &client.ListOptions{LabelSelector: client.MatchingLabelsSelector{Selector: labels.Everything()}}
50+
expectedListOpts := &client.ListOptions{LabelSelector: client.MatchingLabelsSelector{Selector: labels.Nothing()}}
5151
Expect(newListOpts).To(Equal(expectedListOpts))
5252
})
5353
It("Should set FieldSelector", func() {
@@ -62,10 +62,10 @@ var _ = Describe("ListOptions", func() {
6262
expectedListOpts := &client.ListOptions{FieldSelector: client.MatchingFieldsSelector{Selector: fields.Nothing()}}
6363
Expect(newListOpts).To(Equal(expectedListOpts))
6464
})
65-
It("Should set FieldSelector to everything with empty MatchingFieldsSelector", func() {
65+
It("Should set FieldSelector to nothing with empty MatchingFieldsSelector", func() {
6666
newListOpts := &client.ListOptions{}
6767
newListOpts.ApplyOptions([]client.ListOption{client.MatchingFieldsSelector{}})
68-
expectedListOpts := &client.ListOptions{FieldSelector: client.MatchingFieldsSelector{Selector: fields.Everything()}}
68+
expectedListOpts := &client.ListOptions{FieldSelector: client.MatchingFieldsSelector{Selector: fields.Nothing()}}
6969
Expect(newListOpts).To(Equal(expectedListOpts))
7070
})
7171
It("Should set Namespace", func() {

0 commit comments

Comments
 (0)