(t *testing.T)
| 67 | } |
| 68 | |
| 69 | func TestAPIErrCode(t *testing.T) { |
| 70 | disk := filepath.Join(globalTestTmpDir, "minio-"+nextSuffix()) |
| 71 | defer os.RemoveAll(disk) |
| 72 | |
| 73 | initFSObjects(disk, t) |
| 74 | |
| 75 | ctx := context.Background() |
| 76 | for i, testCase := range toAPIErrorTests { |
| 77 | errCode := toAPIErrorCode(ctx, testCase.err) |
| 78 | if errCode != testCase.errCode { |
| 79 | t.Errorf("Test %d: Expected error code %d, got %d", i+1, testCase.errCode, errCode) |
| 80 | } |
| 81 | } |
| 82 | } |
| 83 | |
| 84 | // Check if an API error is properly defined |
| 85 | func TestAPIErrCodeDefinition(t *testing.T) { |
nothing calls this directly
no test coverage detected