@@ -97,55 +97,55 @@ var _ = Describe("Internal", func() {
97
97
defer GinkgoRecover ()
98
98
Expect (evt .Object ).To (Equal (pod ))
99
99
}
100
- instance .OnAdd (pod )
100
+ instance .OnAdd (pod , false )
101
101
})
102
102
103
103
It ("should used Predicates to filter CreateEvents" , func () {
104
104
instance = internal .NewEventHandler (ctx , & controllertest.Queue {}, setfuncs , []predicate.Predicate {
105
105
predicate.Funcs {CreateFunc : func (event.CreateEvent ) bool { return false }},
106
106
})
107
107
set = false
108
- instance .OnAdd (pod )
108
+ instance .OnAdd (pod , false )
109
109
Expect (set ).To (BeFalse ())
110
110
111
111
set = false
112
112
instance = internal .NewEventHandler (ctx , & controllertest.Queue {}, setfuncs , []predicate.Predicate {
113
113
predicate.Funcs {CreateFunc : func (event.CreateEvent ) bool { return true }},
114
114
})
115
- instance .OnAdd (pod )
115
+ instance .OnAdd (pod , false )
116
116
Expect (set ).To (BeTrue ())
117
117
118
118
set = false
119
119
instance = internal .NewEventHandler (ctx , & controllertest.Queue {}, setfuncs , []predicate.Predicate {
120
120
predicate.Funcs {CreateFunc : func (event.CreateEvent ) bool { return true }},
121
121
predicate.Funcs {CreateFunc : func (event.CreateEvent ) bool { return false }},
122
122
})
123
- instance .OnAdd (pod )
123
+ instance .OnAdd (pod , false )
124
124
Expect (set ).To (BeFalse ())
125
125
126
126
set = false
127
127
instance = internal .NewEventHandler (ctx , & controllertest.Queue {}, setfuncs , []predicate.Predicate {
128
128
predicate.Funcs {CreateFunc : func (event.CreateEvent ) bool { return false }},
129
129
predicate.Funcs {CreateFunc : func (event.CreateEvent ) bool { return true }},
130
130
})
131
- instance .OnAdd (pod )
131
+ instance .OnAdd (pod , false )
132
132
Expect (set ).To (BeFalse ())
133
133
134
134
set = false
135
135
instance = internal .NewEventHandler (ctx , & controllertest.Queue {}, setfuncs , []predicate.Predicate {
136
136
predicate.Funcs {CreateFunc : func (event.CreateEvent ) bool { return true }},
137
137
predicate.Funcs {CreateFunc : func (event.CreateEvent ) bool { return true }},
138
138
})
139
- instance .OnAdd (pod )
139
+ instance .OnAdd (pod , false )
140
140
Expect (set ).To (BeTrue ())
141
141
})
142
142
143
143
It ("should not call Create EventHandler if the object is not a runtime.Object" , func () {
144
- instance .OnAdd (& metav1.ObjectMeta {})
144
+ instance .OnAdd (& metav1.ObjectMeta {}, false )
145
145
})
146
146
147
147
It ("should not call Create EventHandler if the object does not have metadata" , func () {
148
- instance .OnAdd (FooRuntimeObject {})
148
+ instance .OnAdd (FooRuntimeObject {}, false )
149
149
})
150
150
151
151
It ("should create an UpdateEvent" , func () {
@@ -281,7 +281,7 @@ var _ = Describe("Internal", func() {
281
281
instance .OnDelete (tombstone )
282
282
})
283
283
It ("should ignore objects without meta" , func () {
284
- instance .OnAdd (Foo {})
284
+ instance .OnAdd (Foo {}, false )
285
285
instance .OnUpdate (Foo {}, Foo {})
286
286
instance .OnDelete (Foo {})
287
287
})
0 commit comments