Commit Graph

21 Commits

Author SHA1 Message Date
987b06e286 Use cli for trusted relate command
This also removed some skipped test (that are skipped for a long while).

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: b0ba39d4312ff20b11fc777092cc0c3e5ddeb19f
Component: engine
2017-04-19 14:04:39 +02:00
9210b1bdbd Introduce a cli package for test-integration
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 50c4475df6304e0cf12ea95217eb00ab5d572e34
Component: engine
2017-03-23 18:35:22 +01:00
bdb483e4e4 Clean more build utils in integration cli
- Remove deprecated buildImage* functions
- Rename buildImageNew to buildImage
- Use *check.C in fakeContext* setup and in getIdByName

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: c10f6ef43f884306eb3ef60b2d19fdc931cf34cc
Component: engine
2017-01-17 15:42:38 +01:00
78d1ff88be Update trustedCmd to be compatible with testutil/cmd
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 303b1d200af65ebb165602d0137f8b24b7c54d66
Component: engine
2017-01-09 11:07:05 +01:00
2758f0996d Remove pkg/integration and move it to testutil or integration-cli
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 33968e6c7df164fff0a882c50ae7f4f7e6190e4b
Component: engine
2016-12-30 18:26:34 +01:00
2f9b83d720 Clean integration-cli/utils.go from most of its content
Most of the code is now on pkg/integration.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: def13fa23c812d367e3c61d9c39bdcee66929c17
Component: engine
2016-12-28 19:05:48 +01:00
3962433600 Fix API incompatibilities between notary v0.3.0 and v0.4.2:
- some function signatures have changed - use the new ones
- re-generate the notary delegation key certs, since notary doesn't allow SHA1
- fix some error message mapping because now if a root rotation fails to validate trusted operations will fail

Signed-off-by: cyli <cyli@twistedmatrix.com>
Upstream-commit: 0797af39c2abb681a0e291651686872539a9e187
Component: engine
2016-10-14 17:53:34 -07:00
ffcbf49a63 Pull, Pull-A, and Build will only pull tags from the targets role or the targets/releases role.
It will ignore tags in all other delegation roles.

Signed-off-by: cyli <cyli@twistedmatrix.com>
Upstream-commit: 623ccc2f319ec28929c75a09bba76916c84f0d2b
Component: engine
2016-03-21 10:56:49 -07:00
39ea52c5c0 Add test for targets/releases preference when pulling
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
Upstream-commit: ca57f4e6a8ac7861009d03957e1b508036eac98f
Component: engine
2016-03-21 10:56:42 -07:00
534b2f0779 Vendor in notary v0.2.0
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
Upstream-commit: 84dc2d9e70f1ad4422732421e2d6b91274f4dfae
Component: engine
2016-02-25 13:40:00 -08:00
8bc92ae008 Assert error in body of function inspectField*
1. Replace raw `docker inspect -f xxx` with `inspectField`, to make code
cleaner and more consistent
2. assert the error in function `inspectField*` so we don't need to
assert the return value of it every time, this will make inspect easier.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: 62a856e9129c9d5cf7db9ea6322c9073d68e3ea4
Component: engine
2016-01-29 23:39:07 +08:00
142063ee1c Update integration tests with new error messages, and to use different repos 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>
Upstream-commit: 0617521ba2ce160899852bb707c15bae7309f18a
Component: engine
2016-01-26 18:02:00 -08:00
9952183b81 revendor notary and wrap friendlier error messages
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
Upstream-commit: dd7436c832a5dd777d0276c3e3b1819062b86ebc
Component: engine
2016-01-14 20:35:59 -08:00
296e59632a Merge pull request #19170 from aaronlehmann/delete-prune-digests
Prune digest references when deleting by tag
Upstream-commit: c0c66c57b2d898e43f7dd74ad9f2f256ea5dfcdf
Component: engine
2016-01-12 15:15:36 -08:00
eb73b224c4 Prune digest references when deleting by tag
When pulling an image with content trust enabled, two references are
created: a digest reference and a tag reference. Deleting by tag
wouldn't actually remove the image, because the digest reference keeps
it alive.

This change modifies the rmi logic so that digest references don't keep
an image alive. If the last tag referencing a given image is deleted,
any digest references to it will be removed as well, so the image can
actually get deleted. This fixes the usability problem with deletions
when content trust is in use, so something like "docker pull busybox;
docker rmi busybox" will work as expected.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 2f048f73e122ab90b8f35a088b4be52bd255caad
Component: engine
2016-01-12 12:11:43 -08:00
1ce594cbcd update tests and error messages, revendor notary with tag
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
Upstream-commit: 1c32a66877f2ddc3f1cce66d78c69e032d6cf795
Component: engine
2016-01-08 09:11:33 -08:00
b741751f8d Notary delegation integration into docker
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
Upstream-commit: 1c125f50cfce422b19a15e84c5a3940890fb2e23
Component: engine
2016-01-07 19:35:45 -08:00
89639c244b "Assert change"
Signed-off-by: GoBella <caili_welcome@163.com>
Upstream-commit: c16dd88c5ef35ee5fc508d1f4cef0aacd3ed58a1
Component: engine
2015-11-17 18:40:18 +08:00
5950661408 Fix text not matching the actual tests
Also fixes a typo in image name.

Fixes #16648

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Upstream-commit: 8781367c77a915799dff2892f4506f085ac6b68b
Component: engine
2015-09-29 15:26:04 +02:00
0dc44a70e4 Ignore ping errors in notary repository setup
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)
Upstream-commit: 5e11cd43aa21a9d0eb1f5f205f05dc7b14ee4d43
Component: engine
2015-09-14 11:08:25 -07:00
0249cbd7d9 Update image pull tests
Update and migrate existing tests to the `DockerHubPullSuite`. Most
tests were preserved, but refactored and made more exhaustive. One test
was deliberately removed (`TestPullVerified`) as it is unreliable and
that the feature was obsoleted by content trust.

Move all trust related tests to `docker_cli_pull_trusted_test.go`.

Move tests depending on a local registry to `docker_cli_pull_local_test.go`.

Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
Upstream-commit: f324f4851f28edfd8dab82cd624a4ec1f01cd207
Component: engine
2015-09-03 15:57:41 -07:00