File tree 1 file changed +30
-0
lines changed
1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -216,6 +216,36 @@ func TestMarkMethods(t *testing.T) {
216
216
}))
217
217
}
218
218
219
+ func TestSetSummary (t * testing.T ) {
220
+ g := NewWithT (t )
221
+ target := setterWithConditions (TrueCondition ("foo" ))
222
+
223
+ SetSummary (target )
224
+
225
+ g .Expect (Has (target , clusterv1 .ReadyCondition )).To (BeTrue ())
226
+ }
227
+
228
+ func TestSetMirror (t * testing.T ) {
229
+ g := NewWithT (t )
230
+ source := getterWithConditions (TrueCondition (clusterv1 .ReadyCondition ))
231
+ target := setterWithConditions ()
232
+
233
+ SetMirror (target , "foo" , source )
234
+
235
+ g .Expect (Has (target , "foo" )).To (BeTrue ())
236
+ }
237
+
238
+ func TestSetAggregate (t * testing.T ) {
239
+ g := NewWithT (t )
240
+ source1 := getterWithConditions (TrueCondition (clusterv1 .ReadyCondition ))
241
+ source2 := getterWithConditions (TrueCondition (clusterv1 .ReadyCondition ))
242
+ target := setterWithConditions ()
243
+
244
+ SetAggregate (target , "foo" , []Getter {source1 , source2 })
245
+
246
+ g .Expect (Has (target , "foo" )).To (BeTrue ())
247
+ }
248
+
219
249
func setterWithConditions (conditions ... * clusterv1.Condition ) Setter {
220
250
obj := & clusterv1.Cluster {}
221
251
obj .SetConditions (conditionList (conditions ... ))
You can’t perform that action at this time.
0 commit comments