Skip to content

Commit e840e07

Browse files
fonta-rhclaude
andcommitted
Bug: IsMicroShiftCluster: log timeout instead of calling Skip from container node
IsMicroShiftCluster() calls skipper.Skip() when the API poll times out. When called from a Ginkgo container node context (e.g. InitializeTestFramework during suite setup), Ginkgo v2 panics because Skip() is only valid inside leaf nodes. This crashes the test binary and cascades all remaining tests as failures. Replace the Skip() call with a log message and let the function fall through returning (false, nil). This allows framework initialization to succeed even when the API is unavailable, so that each test's own BeforeEach health checks (e.g. SkipIfClusterIsNotHealthy) can properly skip the test instead of the binary crashing. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent ffec556 commit e840e07

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

test/extended/util/framework.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2341,8 +2341,7 @@ func IsMicroShiftCluster(kubeClient k8sclient.Interface) (bool, error) {
23412341
e2e.Logf("IsMicroShiftCluster: error accessing microshift-version configmap: %v", err)
23422342
return false, nil
23432343
}); err != nil {
2344-
// Timeout accessing the configmap is a precondition failure
2345-
skipper.Skip(preconditions.FormatSkipMessage(fmt.Sprintf("microshift-version configmap check timed out after %s: %v", duration, err)))
2344+
e2e.Logf("IsMicroShiftCluster: timed out after %s: %v (assuming not MicroShift)", duration, err)
23462345
}
23472346
if cm == nil {
23482347
e2e.Logf("IsMicroShiftCluster: microshift-version configmap not found, not MicroShift")

0 commit comments

Comments
 (0)