@@ -141,6 +141,7 @@ func (s *watchCountTracking) CreateJunits() ([]*junitapi.JUnitTestCase, error) {
141
141
ret := []* junitapi.JUnitTestCase {}
142
142
143
143
testName := "[sig-arch][Late] operators should not create watch channels very often"
144
+ testMinRequestsName := "[sig-arch][Late] operators should have watch channel requests"
144
145
oc := exutil .NewCLIWithoutNamespace ("operator-watch" )
145
146
infra , err := oc .AdminConfigClient ().ConfigV1 ().Infrastructures ().Get (context .Background (), "cluster" , metav1.GetOptions {})
146
147
if err != nil {
@@ -153,6 +154,15 @@ func (s *watchCountTracking) CreateJunits() ([]*junitapi.JUnitTestCase, error) {
153
154
},
154
155
)
155
156
157
+ ret = append (ret , & junitapi.JUnitTestCase {
158
+ Name : testMinRequestsName ,
159
+ FailureOutput : & junitapi.FailureOutput {
160
+ Message : err .Error (),
161
+ Output : err .Error (),
162
+ },
163
+ },
164
+ )
165
+
156
166
return ret , nil
157
167
}
158
168
@@ -376,27 +386,69 @@ func (s *watchCountTracking) CreateJunits() ([]*junitapi.JUnitTestCase, error) {
376
386
}
377
387
378
388
var upperBound platformUpperBound
379
- if infra .Status .ControlPlaneTopology == configv1 .SingleReplicaTopologyMode {
389
+
390
+ switch infra .Status .ControlPlaneTopology {
391
+ case configv1 .ExternalTopologyMode :
392
+ return []* junitapi.JUnitTestCase {{
393
+ Name : testName ,
394
+ SkipMessage : & junitapi.SkipMessage {Message : fmt .Sprintf ("unsupported topology: %v" , infra .Status .ControlPlaneTopology )},
395
+ }, {
396
+ Name : testMinRequestsName ,
397
+ SkipMessage : & junitapi.SkipMessage {Message : fmt .Sprintf ("unsupported topology: %v" , infra .Status .ControlPlaneTopology )},
398
+ }}, nil
399
+
400
+ case configv1 .SingleReplicaTopologyMode :
380
401
if _ , exists := upperBoundsSingleNode [infra .Spec .PlatformSpec .Type ]; ! exists {
381
402
return []* junitapi.JUnitTestCase {{
382
403
Name : testName ,
383
404
SkipMessage : & junitapi.SkipMessage {Message : fmt .Sprintf ("unsupported single node platform type: %v" , infra .Spec .PlatformSpec .Type )},
405
+ }, {
406
+ Name : testMinRequestsName ,
407
+ SkipMessage : & junitapi.SkipMessage {Message : fmt .Sprintf ("unsupported single node platform type: %v" , infra .Spec .PlatformSpec .Type )},
384
408
}}, nil
385
409
386
410
}
387
411
upperBound = upperBoundsSingleNode [infra .Spec .PlatformSpec .Type ]
388
- } else {
412
+
413
+ default :
389
414
if _ , exists := upperBounds [infra .Spec .PlatformSpec .Type ]; ! exists {
390
415
return []* junitapi.JUnitTestCase {{
391
416
Name : testName ,
392
417
SkipMessage : & junitapi.SkipMessage {Message : fmt .Sprintf ("unsupported platform type: %v" , infra .Spec .PlatformSpec .Type )},
418
+ }, {
419
+ Name : testMinRequestsName ,
420
+ SkipMessage : & junitapi.SkipMessage {Message : fmt .Sprintf ("unsupported platform type: %v" , infra .Spec .PlatformSpec .Type )},
393
421
}}, nil
394
422
}
395
423
upperBound = upperBounds [infra .Spec .PlatformSpec .Type ]
396
424
}
397
425
398
426
watchRequestCounts := s .SummarizeWatchCountRequests ()
399
427
428
+ if len (watchRequestCounts ) == 0 {
429
+ ret = append (ret ,
430
+ & junitapi.JUnitTestCase {
431
+ Name : testMinRequestsName ,
432
+ FailureOutput : & junitapi.FailureOutput {
433
+ Message : "Expected at least one watch request count to be present" ,
434
+ },
435
+ },
436
+ )
437
+ // flake for now
438
+ ret = append (ret ,
439
+ & junitapi.JUnitTestCase {
440
+ Name : testMinRequestsName ,
441
+ },
442
+ )
443
+
444
+ } else {
445
+ ret = append (ret ,
446
+ & junitapi.JUnitTestCase {
447
+ Name : testMinRequestsName ,
448
+ },
449
+ )
450
+ }
451
+
400
452
operatorBoundExceeded := []string {}
401
453
for _ , item := range watchRequestCounts {
402
454
operator := strings .Split (item .Operator , ":" )[3 ]
0 commit comments