(t *testing.T)
| 35 | } |
| 36 | |
| 37 | func TestImagePushStatusUnauthorizedError(t *testing.T) { |
| 38 | client, err := New(WithMockClient(errorMock(http.StatusUnauthorized, "Unauthorized error"))) |
| 39 | assert.NilError(t, err) |
| 40 | _, err = client.ImagePush(t.Context(), "myimage", ImagePushOptions{}) |
| 41 | assert.Check(t, is.ErrorType(err, cerrdefs.IsUnauthorized)) |
| 42 | } |
| 43 | |
| 44 | func TestImagePushWithUnauthorizedErrorAndPrivilegeFuncError(t *testing.T) { |
| 45 | client, err := New(WithMockClient(errorMock(http.StatusUnauthorized, "Unauthorized error"))) |