summaryrefslogtreecommitdiff
path: root/integration-cli/docker_cli_push_test.go
Commit message (Collapse)AuthorAgeFilesLines
* test: Do not check error message from hub, it is not neededTibor Vass2016-03-251-1/+0
| | | | | Signed-off-by: Tibor Vass <tibor@docker.com> (cherry picked from commit bbdd34c370949a2db9f139720b4498bc0952e700)
* Update TestPushToCentralRegistryUnauthorized to match updated hubKenfe-Mickael Laventure2016-03-221-1/+1
| | | | | | | | The error message was changed from "unauthorized: access to the requested resource is not authorized" to "unauthorized: authentication required". Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
* Pull, Pull-A, and Build will only pull tags from the targets role or the ↵cyli2016-03-211-44/+44
| | | | | | | | targets/releases role. It will ignore tags in all other delegation roles. Signed-off-by: cyli <cyli@twistedmatrix.com>
* Add test for targets/releases preference when pullingRiyaz Faizullabhoy2016-03-211-1/+1
| | | | Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
* Trusted push now adds the tag to every first level delegation role for which ↵cyli2016-03-211-10/+116
| | | | | | | | we have keys and for which the tag conforms to path restrictions. Signed-off-by: cyli <cyli@twistedmatrix.com>
* distribution: errors: do not retry if no token in responseAntonio Murdaca2016-03-191-0/+14
| | | | Signed-off-by: Antonio Murdaca <runcom@redhat.com>
* vendor docker/distribution d06d6d3b093302c02a93153ac7b06ebc0ffd1793Antonio Murdaca2016-03-191-11/+40
| | | | | | - fix and add integration tests Signed-off-by: Antonio Murdaca <runcom@redhat.com>
* distribution: errors: do not access the errors slice if it's emptyAntonio Murdaca2016-03-161-1/+33
| | | | | | | | - cherry-pick from 1.10.3 branch: 0186f4d4223a094a050d06f456355da3ae431468 - add token service test suite - add integration test (missing in 1.10.3 branch) Signed-off-by: Antonio Murdaca <runcom@redhat.com>
* Merge pull request #21159 from runcom/fix-retry-push-bugAaron Lehmann2016-03-141-0/+19
|\ | | | | distribution: errors: do not retry if no credentials provided
| * integration-cli: add tests for case a) and d) in #21054Antonio Murdaca2016-03-141-0/+10
| | | | | | | | | | | | | | | | | | - add test for pull from private registry with no credentials - add test for push to docker hub with no credentials Signed-off-by: Antonio Murdaca <runcom@redhat.com> Signed-off-by: Antonio Murdaca <amurdaca@localhost.localdomain> Signed-off-by: Antonio Murdaca <runcom@redhat.com>
| * distribution: errors: do not retry if no credentials providedAntonio Murdaca2016-03-121-0/+9
| | | | | | | | | | | | Fix and add test for case c) in #21054 Signed-off-by: Antonio Murdaca <runcom@redhat.com>
* | Add notary binary requirement for testsChristopher Jones2016-03-111-0/+1
|/ | | | | | | | | | | | | | This PR adds the "notary" binary requirement for tests. Previously, NotaryHosting was checking for the "notary-server" binary under the name notaryBinary. This renames that reference to notaryServerBinary, so that notaryBinary can rightly refer to the actual "notary" binary. Currently only one test actually uses the notary binary, so it's been updated accordingly. Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
* Rotate snapshot key to server when initializing new notary reposRiyaz Faizullabhoy2016-03-021-0/+6
| | | | Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
* Fix concurrent uploads that share layersAaron Lehmann2016-03-011-0/+55
| | | | | | | | | | | | | | | | | | | | Concurrent uploads which share layers worked correctly as of #18353, but unfortunately #18785 caused a regression. This PR removed the logic that shares digests between different push sessions. This overlooked the case where one session was waiting for another session to upload a layer. This commit adds back the ability to propagate this digest information, using the distribution.Descriptor type because this is what is received from stats and uploads, and also what is ultimately needed for building the manifest. Surprisingly, there was no test covering this case. This commit adds one. It fails without the fix. See recent comments on #9132. Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
* Improve fallback behavior for cross-repository pushBrian Bland2016-02-241-1/+1
| | | | | | | | | | | Attempt layer mounts from up to 3 source repositories, possibly falling back to a standard blob upload for cross repository pushes. Addresses compatiblity issues with token servers which do not grant multiple repository scopes, resulting in an authentication failure for layer mounts, which would otherwise cause the push to terminate with an error. Signed-off-by: Brian Bland <brian.bland@docker.com>
* Update integration tests with new error messages, and to use different repos ↵cyli2016-01-261-3/+3
| | | | | | | | | per test. This way we won't encounter any problems with one test using cached data from a different test. Signed-off-by: cyli <cyli@twistedmatrix.com>
* Update registry version in Dockerfile.armhfStefan Scherer2016-01-231-1/+0
| | | | Signed-off-by: Stefan Scherer <scherer_stefan@icloud.com>
* Fixes layer MediaTypes in manifests created from a cross-repository pushBrian Bland2016-01-201-0/+15
| | | | Signed-off-by: Brian Bland <brian.bland@docker.com>
* Skip failing tests on ARM to get red/green feedback from JenkinsStefan Scherer2016-01-181-0/+1
| | | | Signed-off-by: Stefan Scherer <scherer_stefan@icloud.com>
* Changes cross-repository blob mounting to a blob Create optionBrian Bland2016-01-141-2/+6
| | | | | | | Also renames BlobSumService to V2MetadataService, BlobSum to V2Metadata Signed-off-by: Brian Bland <brian.bland@docker.com>
* Adds cross-repository blob pushing behaviorBrian Bland2016-01-131-0/+48
| | | | | | | | | Tracks source repository information for each blob in the blobsum service, which is then used to attempt to mount blobs from another repository when pushing instead of having to re-push blobs to the same registry. Signed-off-by: Brian Bland <brian.bland@docker.com>
* Build a pre-schema2 registry to test schema1 push/pullAaron Lehmann2016-01-081-5/+45
| | | | | | | Add DockerSchema1RegistrySuite which uses this registry, and make applicable integration tests run as part of this suite. Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
* Add an integration test for docker being able to push to a repo with ↵cyli2016-01-071-0/+34
| | | | | | delegations. Signed-off-by: cyli <cyli@twistedmatrix.com>
* Notary delegation integration into dockerRiyaz Faizullabhoy2016-01-071-2/+23
| | | | Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
* integration-cli: fix test name typoAntonio Murdaca2015-12-051-1/+1
| | | | Signed-off-by: Antonio Murdaca <runcom@redhat.com>
* Update daemon and docker core to use new content addressable storageTonis Tiigi2015-11-241-43/+0
| | | | | | | | | | | | | | | | | Add distribution package for managing pulls and pushes. This is based on the old code in the graph package, with major changes to work with the new image/layer model. Add v1 migration code. Update registry, api/*, and daemon packages to use the reference package's types where applicable. Update daemon package to use image/layer/tag stores instead of the graph package Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com> Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
* Correct parent chain in v2 push when v1Compatibility files on the disk are ↵Aaron Lehmann2015-11-171-0/+43
| | | | | | | | | | inconsistent This fixes an issue where two images with the same filesystem contents and configuration but different remote IDs could share a v1Compatibility file, resulting in corrupted manifests. Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
* fixing tests for updated CLI outputDavid Lawrence2015-11-131-2/+2
| | | | Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
* Use checker on integration test when possibleHu Keping2015-10-221-157/+56
| | | | Signed-off-by: Hu Keping <hukeping@huawei.com>
* Adding tests for backwards compatibilityDiogo Monica2015-10-091-0/+66
| | | | Signed-off-by: Diogo Monica <diogo@docker.com>
* Changing trustServer allowed URL behaviorDiogo Monica2015-10-081-2/+2
| | | | Signed-off-by: Diogo Monica <diogo@docker.com>
* Ignore ping errors in notary repository setupDerek McGowan2015-09-141-1/+1
| | | | | | | Notary is capable of acting in offline mode, making use of cache TUF data. When ping is not successful, notary should still be attempted without error. Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
* Remove TestPushInterruptAaron Lehmann2015-09-021-27/+0
| | | | | | This test relies on a race condition, and has been failing often in CI. Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
* Avoid buffering to tempfile when pushing with V2Stephen J Day2015-08-241-1/+1
| | | | | | | | | | | | | The practice of buffering to a tempfile during a pushing contributes massively to slow V2 push performance perception. The protocol was actually designed to avoid precalculation, supporting cut-through data push. This means we can assemble the layer, calculate its digest and push to the remote endpoint, all at the same time. This should increase performance massively on systems with slow disks or IO bottlenecks. Signed-off-by: Stephen J Day <stephen.day@docker.com>
* Update regression testArnaud Porterie2015-08-121-0/+34
| | | | Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
* Revert #14884Arnaud Porterie2015-08-121-26/+1
| | | | | | This reverts commit 810d3b2642d4a82dc186d6eff8c2e487ee624bc5. Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
* Updated to use latest version of notaryDerek McGowan2015-07-311-1/+1
| | | | | | Update UX to use aliases for root, snapshot, and target key Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
* Skip notary tests which update system clockDerek McGowan2015-07-291-0/+2
| | | | | | | Currently some notary tests change the system clock to check for expiration. Skip these tests until the code can be refactored to not rely on updating the system clock. Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
* Don't pass check.C to dockerCmdWithErrorBrian Goff2015-07-271-5/+5
| | | | Signed-off-by: Brian Goff <cpuguy83@gmail.com>
* Rename to flags and environment variables to content trustDerek McGowan2015-07-241-4/+4
| | | | | | | | Update help line to allow 90 characters instead of 80 The trust flag pushes out the help description column wider, requiring more room to display help messages. Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
* Added tests for expired snapshots and timestampsDiogo Monica2015-07-241-0/+69
| | | | Signed-off-by: Diogo Monica <diogo@docker.com>
* Add build integration cli testsDerek McGowan2015-07-241-1/+1
| | | | | | | | | Clean up tests to remove duplicate code Add tests which run pull and create in an isolated configuration directory. Add build test for untrusted tag Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
* Add test for incorrect nonroot passphraseDiogo Monica2015-07-241-30/+50
| | | | | | Fix failing tests for create, push, and pull Signed-off-by: Diogo Monica <diogo@docker.com>
* Add trust tests for Docker create, run, push, and pullNathan McCauley2015-07-241-1/+1
| | | | | | Created date util function Signed-off-by: Nathan McCauley <nathan.mccauley@docker.com>
* Add more integration tests for trusted push and pullDiogo Monica2015-07-241-0/+106
| | | | Signed-off-by: Diogo Monica <diogo@docker.com>
* Add integration cli trust testsDerek McGowan2015-07-241-0/+16
| | | | | | | Added notary server to docker base image. Created trust suite which runs trust server for running trusted commands. Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
* Avoid redundant HEAD requests for identical layers on pushAaron Lehmann2015-07-221-3/+27
| | | | | | | | | | | | | | | | | | | | | | pushV2Tag already deduplicates layers, but the scope of this deduplication is only for a particular tag. If we are pushing all tags in a repository, we may check layers several times. Fix this by moving the layersSeen map from the pushV2Tag function to the v2Pusher struct. In addition to avoiding some useless round-trips, this makes the "docker push" output less confusing. It formerly could contain many repeated lines like: 124e2127157f: Image already exists 124e2127157f: Image already exists ... Add test coverage based on the "docker push" output: a hash should not appear multiple times when pushing multiple tags. Fixes #14873 Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
* Use dockerCmd when possible (#14603)Vincent Demeester2015-07-141-33/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | - integration-cli/docker_cli_attach_test.go - integration-cli/docker_cli_attach_unix_test.go - integration-cli/docker_cli_build_test.go - integration-cli/docker_cli_build_unix_test.go - integration-cli/docker_cli_by_digest_test.go - integration-cli/docker_cli_commit_test.go - integration-cli/docker_cli_config_test.go - integration-cli/docker_cli_cp_test.go - integration-cli/docker_cli_create_test.go - integration-cli/docker_cli_pause_test.go - integration-cli/docker_cli_port_test.go - integration-cli/docker_cli_port_unix_test.go - integration-cli/docker_cli_proxy_test.go - integration-cli/docker_cli_ps_test.go - integration-cli/docker_cli_pull_test.go - integration-cli/docker_cli_push_test.go - docker_api_attach_test.go - docker_api_containers_test.go - docker_api_events_test.go - docker_api_exec_resize_test.go - docker_api_exec_test.go - docker_api_images_test.go - docker_api_info_test.go Signed-off-by: Vincent Demeester <vincent@sbr.pm>
* Correct wrong comment of TestPushBusyboxImage.Yuan Sun2015-07-071-1/+1
| | | | Signed-off-by: Yuan Sun <sunyuan3@huawei.com>
* Finally remove our copy of "archive/tar" now that Go 1.4 is the minimum!Tianon Gravi2015-05-011-1/+1
| | | | | | IT'S ABOUT TIME. :tada: Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>