From f5c5bdb2d74ef5b96dd43a5cea484dfed5e431e5 Mon Sep 17 00:00:00 2001 From: Andy Lo-A-Foe Date: Sat, 28 Sep 2024 08:30:04 +0200 Subject: [PATCH] Fix error formatting --- s3creds/access_service_test.go | 2 +- s3creds/policy_service_test.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/s3creds/access_service_test.go b/s3creds/access_service_test.go index 71be4e03..adbd7209 100644 --- a/s3creds/access_service_test.go +++ b/s3creds/access_service_test.go @@ -16,7 +16,7 @@ func TestGetAccess(t *testing.T) { muxCreds.HandleFunc("/core/credentials/Access", func(w http.ResponseWriter, r *http.Request) { if k := r.Header.Get("X-Product-Key"); k != productKey { - t.Errorf(ErrMissingProductKey.Error()) + t.Error(ErrMissingProductKey.Error()) w.WriteHeader(http.StatusForbidden) return } diff --git a/s3creds/policy_service_test.go b/s3creds/policy_service_test.go index de40dd8d..6b22226d 100644 --- a/s3creds/policy_service_test.go +++ b/s3creds/policy_service_test.go @@ -39,7 +39,7 @@ func TestCreatePolicy(t *testing.T) { muxCreds.HandleFunc("/core/credentials/Policy", func(w http.ResponseWriter, r *http.Request) { if k := r.Header.Get("X-Product-Key"); k != productKey { - t.Errorf(ErrMissingProductKey.Error()) + t.Error(ErrMissingProductKey.Error()) w.WriteHeader(http.StatusForbidden) return } @@ -90,7 +90,7 @@ func TestDeletePolicy(t *testing.T) { muxCreds.HandleFunc("/core/credentials/Policy/"+id, func(w http.ResponseWriter, r *http.Request) { if k := r.Header.Get("X-Product-Key"); k != productKey { - t.Errorf(ErrMissingProductKey.Error()) + t.Error(ErrMissingProductKey.Error()) w.WriteHeader(http.StatusForbidden) return } @@ -117,7 +117,7 @@ func TestGetPolicy(t *testing.T) { id := "1" muxCreds.HandleFunc("/core/credentials/Policy", func(w http.ResponseWriter, r *http.Request) { if k := r.Header.Get("X-Product-Key"); k != productKey { - t.Errorf(ErrMissingProductKey.Error()) + t.Error(ErrMissingProductKey.Error()) w.WriteHeader(http.StatusForbidden) return }