You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add more logging to functions that testGatewayAPIObjects uses in order to make
it easier to diagnose test failures.
* test/e2e/gateway_api_test.go (ensureGatewayObjectSuccess): Remove t.Helper()
and add more logging. This function has core test logic that can mark the test
as failed, and marking this function as a helper obfuscates the point of
failure.
* test/e2e/util_gatewayapi_test.go (assertGatewayClassSuccessful): Add more
logging.
(assertGatewaySuccessful): Add more logging.
(assertHttpRouteSuccessful): Add more logging.
(assertHttpRouteConnection): Remove t.Helper() and add more logging.
(assertDNSRecord): Add more logging.
t.Logf("failed to get gateway class %s, retrying...", name)
532
+
t.Logf("Failed to get gatewayclass %s: %v", name, err)
533
533
returnfalse, nil
534
534
}
535
535
for_, condition:=rangegwc.Status.Conditions {
@@ -540,14 +540,15 @@ func assertGatewayClassSuccessful(t *testing.T, name string) (*gatewayapiv1.Gate
540
540
}
541
541
}
542
542
}
543
-
t.Logf("found gateway class %s, but it is not yet Accepted. Retrying...", name)
543
+
t.Logf("Found gatewayclass %s, but it is not yet accepted. Retrying...", name)
544
544
returnfalse, nil
545
545
})
546
546
iferr!=nil {
547
-
returnnil, fmt.Errorf("gateway class %s not %v, last recorded status message: %s", name, gatewayapiv1.GatewayClassConditionStatusAccepted, recordedConditionMsg)
547
+
returnnil, fmt.Errorf("gatewayclass %s is not %v; last recorded status message: %s", name, gatewayapiv1.GatewayClassConditionStatusAccepted, recordedConditionMsg)
548
548
}
549
549
550
-
t.Logf("gateway class %s successful", name)
550
+
t.Logf("Observed that gatewayclass %s has been accepted: %+v", name, gwc.Status)
returnnil, fmt.Errorf("httpRoute %s/%s, parent %v/%v not %v, last recorded status message: %s", namespace, name, parent.ParentRef.Namespace, parent.ParentRef.Name, gatewayapiv1.RouteConditionResolvedRefs, resolvedRefConditionMsg)
0 commit comments