History

Make sure to log unhandled errors always (#6784)

In many situations, while testing we encounter ErrInternalError, to reduce logging we have removed logging from quite a few places which is acceptable but when ErrInternalError occurs we should have a facility to log the corresponding error, this helps to debug Minio server.

Harshavardhana committed 8 years ago

Commit a55a2981 parent 2929c1818 files · +228 −225Browse files

Showing the changes to cmd/api-errors_test.go (1 of 18 files). Show all

Unified · Split

cmd/api-errors_test.go+3−1
@@ -17,6 +17,7 @@ · 16 unmodified lines
1717 package cmd
1818
1919 import (
20+ "context"
2021 "errors"
2122 "testing"
2223
@@ -64,8 +65,9 @@ var toAPIErrorCodeTests = []struct { · 41 unmodified lines
6465 }
6566
6667 func TestAPIErrCode(t *testing.T) {
68+ ctx := context.Background()
6769 for i, testCase := range toAPIErrorCodeTests {
68− errCode := toAPIErrorCode(testCase.err)
70+ errCode := toAPIErrorCode(ctx, testCase.err)
6971 if errCode != testCase.errCode {
7072 t.Errorf("Test %d: Expected error code %d, got %d", i+1, testCase.errCode, errCode)
7173 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t