Skip to content

Commit

Permalink
Fix error formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
loafoe committed Sep 28, 2024
1 parent 8f9845f commit f5c5bdb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion s3creds/access_service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
6 changes: 3 additions & 3 deletions s3creds/policy_service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down Expand Up @@ -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
}
Expand All @@ -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
}
Expand Down

0 comments on commit f5c5bdb

Please sign in to comment.