summaryrefslogtreecommitdiff
path: root/client/image_push_test.go
Commit message (Collapse)AuthorAgeFilesLines
* client: update error-assertions in testsSebastiaan van Stijn2023-05-101-9/+5
| | | | | | | | - use is.ErrorType - replace uses of client.IsErrNotFound for errdefs.IsNotFound, as the client no longer returns the old error-type. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* client: linting: fix "invalid auth header" errorSebastiaan van Stijn2022-07-291-1/+1
| | | | Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* api: add const for 'X-Registry-Auth'Sebastiaan van Stijn2022-07-291-1/+2
| | | | Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* refactor: move from io/ioutil to io and os packageEng Zer Jun2021-08-271-6/+6
| | | | | | | | The io/ioutil package has been deprecated in Go 1.16. This commit replaces the existing io/ioutil functions with their new definitions in io and os packages. Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
* client.ImagePush(): default to ":latest" instead of "all tags"Sebastiaan van Stijn2019-12-101-31/+51
| | | | | | | | | | | | | | | | | | | | | | | The `docker push` command up until docker v0.9.1 always pushed all tags of a given image, so `docker push foo/bar` would push (e.g.) all of `foo/bar:latest`, `foo:/bar:v1`, and `foo/bar:v1.0.0`. Pushing all tags of an image was not desirable in many case, so docker v0.10.0 enhanced `docker push` to optionally specify a tag to push (`docker push foo/bar:v1`) (see issue 3411 and PR 4948 (commit e648a186d68dcb3ee0d6123b041c5aa66438cc89). This behavior exists up until today, and is confusing, because unlike other commands, `docker push` does not default to use the `:latest` tag when omitted, but instead makes it push "all tags of the image". `docker pull` had a similar behavior, but PR 7759 (9c08364a412a51c80e8d17ae14f92549dc543e68) changed the behavior to default to the `:latest` tag, and added a `--all-tags` flag to the CLI to optionally pull all images. This patch implements the API client changes to make `docker push` match the behavior of `docker pull`, and default to pull a single image, unless the `all` option is passed. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* client: reduce string-matching in testsSebastiaan van Stijn2019-10-131-8/+5
| | | | | | | | These checks were redundant, as we were not expecting a specific string, just that a server-error or authentication error was returned. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* Update tests to check returned errorsSebastiaan van Stijn2019-03-161-0/+4
| | | | Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* Switch from x/net/context -> contextKir Kolyshkin2018-04-231-2/+1
| | | | | | | | | | | Since Go 1.7, context is a standard package. Since Go 1.9, everything that is provided by "x/net/context" is a couple of type aliases to types in "context". Many vendored packages still use x/net/context, so vendor entry remains for now. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
* Add canonical import commentDaniel Nephin2018-02-051-1/+1
| | | | Signed-off-by: Daniel Nephin <dnephin@docker.com>
* Use distribution referenceDerek McGowan2017-02-071-1/+1
| | | | | | | | | | | | Remove forked reference package. Use normalized named values everywhere and familiar functions to convert back to familiar strings for UX and storage compatibility. Enforce that the source repository in the distribution metadata is always a normalized string, ignore invalid values which are not. Update distribution tests to use normalized values. Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
* client: remove transport packageStephen J Day2016-09-191-7/+7
| | | | | | | | | | | | | | This package doesn't really seem to do anything of real interest. Removing it and replacing with a few helper functions. Most of this was maintaining a fork of ctxhttp to support a mock that was unnecessary. We could probably do with a further refactor of the client interface. There is a lot of confusion of between transport, http layer and application layer that makes for some awkward code. This change improves the situation to the point where no breaking changes are introduced. Signed-off-by: Stephen J Day <stephen.day@docker.com>
* Move engine-api client packageMichael Crosby2016-09-071-0/+180
This moves the engine-api client package to `/docker/docker/client`. Signed-off-by: Michael Crosby <crosbymichael@gmail.com>