diff --git a/client/client_test.go b/client/client_test.go index 37ac9ce..1fd5c3c 100644 --- a/client/client_test.go +++ b/client/client_test.go @@ -201,11 +201,42 @@ func (t *retryingTester) Fatalf(format string, args ...any) { if t.isFinalRun { t.T.Fatalf(format, args...) } else { - testutils.TestLog(t.T, fmt.Sprintf("retryingTester: Ignoring failure for non-final run: %#v", fmt.Sprintf(format, args...))) + testutils.TestLog(t.T, fmt.Sprintf("retryingTester: Ignoring fatalf for non-final run: %#v", fmt.Sprintf(format, args...))) } t.SkipNow() } +func (t *retryingTester) Errorf(format string, args ...any) { + t.T.Helper() + t.succeeded = false + if t.isFinalRun { + t.T.Errorf(format, args...) + } else { + testutils.TestLog(t.T, fmt.Sprintf("retryingTester: Ignoring errorf for non-final run: %#v", fmt.Sprintf(format, args...))) + } + t.SkipNow() +} + +func (t *retryingTester) FailNow() { + t.succeeded = false + if t.isFinalRun { + t.T.FailNow() + } else { + testutils.TestLog(t.T, "retryingTester: Ignoring FailNow for non-final run") + // Still terminate execution via SkipNow() since FailNow() means we should stop the current test + t.T.SkipNow() + } +} + +func (t *retryingTester) Fail() { + t.succeeded = false + if t.isFinalRun { + t.T.Fail() + } else { + testutils.TestLog(t.T, "retryingTester: Ignoring Fail for non-final run") + } +} + func testIntegration(t *testing.T, tester shellTester, onlineStatus OnlineStatus) { // Set up defer testutils.BackupAndRestore(t)()