From efc172f4bf6c91cd9a9aa31f44d1d138d59b5a0f Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Fri, 16 Sep 2022 09:01:42 +0200 Subject: [PATCH] e2e framework: better error when service account creation times out When waiting for the default service account in a new namespace, not finding one was reported as "unexpected error: timed out waiting for the condition"... --- test/e2e/framework/util.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/e2e/framework/util.go b/test/e2e/framework/util.go index 53c4d1a409b..a17138f9c25 100644 --- a/test/e2e/framework/util.go +++ b/test/e2e/framework/util.go @@ -328,7 +328,10 @@ func waitForServiceAccountInNamespace(c clientset.Interface, ns, serviceAccountN } return false, nil }) - return err + if err != nil { + return fmt.Errorf("wait for service account %q in namespace %q: %w", serviceAccountName, ns, err) + } + return nil } // WaitForDefaultServiceAccountInNamespace waits for the default service account to be provisioned