From acc528cbf40c42eb112d2ce66c5f778bd4a397fb Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Tue, 16 Apr 2024 16:35:18 +0200 Subject: tools/syz-linter: check t.Logf/Errorf/Fatalf messages Fix checking of Logf, it has string in 0-th arg. Add checking of t.Errorf/Fatalf. --- dashboard/app/api_test.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'dashboard/app/api_test.go') diff --git a/dashboard/app/api_test.go b/dashboard/app/api_test.go index 4a872231e..6897848cf 100644 --- a/dashboard/app/api_test.go +++ b/dashboard/app/api_test.go @@ -17,7 +17,7 @@ func TestClientSecretOK(t *testing.T) { }, }, "user", "secr1t", "") if err != nil || got != "" { - t.Errorf("Unexpected error %v %v", got, err) + t.Errorf("unexpected error %v %v", got, err) } } @@ -28,7 +28,7 @@ func TestClientOauthOK(t *testing.T) { }, }, "user", "", "OauthSubject:public") if err != nil || got != "" { - t.Errorf("Unexpected error %v %v", got, err) + t.Errorf("unexpected error %v %v", got, err) } } @@ -39,7 +39,7 @@ func TestClientSecretFail(t *testing.T) { }, }, "user", "wrong", "") if err != ErrAccess || got != "" { - t.Errorf("Unexpected error %v %v", got, err) + t.Errorf("unexpected error %v %v", got, err) } } @@ -48,7 +48,7 @@ func TestClientSecretMissing(t *testing.T) { Clients: map[string]string{}, }, "user", "ignored", "") if err != ErrAccess || got != "" { - t.Errorf("Unexpected error %v %v", got, err) + t.Errorf("unexpected error %v %v", got, err) } } @@ -63,7 +63,7 @@ func TestClientNamespaceOK(t *testing.T) { }, }, "user", "secr1t", "") if err != nil || got != "ns1" { - t.Errorf("Unexpected error %v %v", got, err) + t.Errorf("unexpected error %v %v", got, err) } } -- cgit mrf-deployment