Test validates 'ErrEntityTooSmall' error response.
(t *testing.T)
| 212 | |
| 213 | // Test validates 'ErrEntityTooSmall' error response. |
| 214 | func TestErrEntityTooSmall(t *testing.T) { |
| 215 | msg := fmt.Sprintf("Your proposed upload size ‘%d’ is below the minimum allowed object size ‘0B’ for single PUT operation.", -1) |
| 216 | expectedResult := ErrorResponse{ |
| 217 | StatusCode: http.StatusBadRequest, |
| 218 | Code: EntityTooSmall, |
| 219 | Message: msg, |
| 220 | BucketName: "minio-bucket", |
| 221 | Key: "Asia/", |
| 222 | } |
| 223 | actualResult := errEntityTooSmall(-1, "minio-bucket", "Asia/") |
| 224 | if !reflect.DeepEqual(expectedResult, actualResult) { |
| 225 | t.Errorf("Expected result to be '%#v', but instead got '%#v'", expectedResult, actualResult) |
| 226 | } |
| 227 | } |
| 228 | |
| 229 | // Test validates 'ErrUnexpectedEOF' error response. |
| 230 | func TestErrUnexpectedEOF(t *testing.T) { |
nothing calls this directly
no test coverage detected