(t *testing.T)
| 28 | } |
| 29 | |
| 30 | func TestImagePushAnyError(t *testing.T) { |
| 31 | client, err := New(WithMockClient(errorMock(http.StatusInternalServerError, "Server error"))) |
| 32 | assert.NilError(t, err) |
| 33 | _, err = client.ImagePush(t.Context(), "myimage", ImagePushOptions{}) |
| 34 | assert.Check(t, is.ErrorType(err, cerrdefs.IsInternal)) |
| 35 | } |
| 36 | |
| 37 | func TestImagePushStatusUnauthorizedError(t *testing.T) { |
| 38 | client, err := New(WithMockClient(errorMock(http.StatusUnauthorized, "Unauthorized error"))) |