1
0
mirror of https://github.com/containers/skopeo.git synced 2025-05-08 16:06:20 +00:00
Commit Graph

27 Commits

Author SHA1 Message Date
Antonio Murdaca
3980ac5894
vendor
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-09-13 16:50:28 +02:00
Miloslav Trmač
3d42f226c2 Add integration tests for signature handling in (skopeo copy)
Note the need for openshiftCluster.relaxImageSignerPermissions.
2016-08-25 20:11:31 +02:00
Miloslav Trmač
0cb6cc6222 Fix integration tests on CentOS
This fixes --version integration test on CentOS, as noticed by
https://github.com/projectatomic/skopeo/pull/91 .  The underlying cause
is:
- Makefile builds with -ldflags "-X var=value", while go 1.4.2 only
  supports "-X var value".  This causes CentOS builds to be built
  without the specific commit information
- The --version integration test assumes that commit information will
  always follow the version number.

Changing either one of these would fix the build, changing the
integration test has the advantage that we don't have to use the
obsolete -X syntax and suffer warnings on newer Go versions.
2016-07-01 23:31:07 +02:00
Antonio Murdaca
6942920ee8 add possibility to download to OCI image-layout
- vendor containers/image c703326038d30c3422168dd9a1a5afaf51740331
- fix copy tests relying on v2s1 manifests

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-07-01 22:14:14 +02:00
Antonio Murdaca
064d37134b cmd: skopeo: fix version
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-06-30 17:46:45 +02:00
Antonio Murdaca
2e8bcf65f6 *: move to containers/image
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-06-27 17:17:13 +02:00
Antonio Murdaca
705f393109 move manifests stuff to its own pkg and add OCI mime types
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-06-23 12:12:48 +02:00
Miloslav Trmač
7d379cf87a Add integration tests for (skopeo copy) against the Atomic Registry
This builds from the image-signatures-rest branch for
https://github.com/openshift/origin/pull/9181 .

Testing push, pull, streaming.

Does not test working with the other Docker registries built in
Dockerfile; I will leave that to the author of that code :)

Note that this relies on an internet connection for pulling from the
Docker Hub (which is incidentally tested by that); pushing to no Docker
Registry, neither local nor Hub, is tested by this.

The tests only run in a container because the (oc login) / (docker
login)-like code modifies files in a home directory; the new
SKOPEO_CONTAINER_TESTS environment variable should protect against
accidental non-container runs.
2016-06-22 16:19:59 +02:00
Miloslav Trmač
39b06cb31c Add more helpers for running skopeo, use them in existing tests
- consumeAndLogOutputs
- assertSkopeoSucceeds
- assertSkopeoFails
- runCommandWithInput
All of these allow running commands as one-liners with no call-site
error handling, making tests much more readable.

Also modifies TestNoNeedAuthToPrivateRegistryV2ImageNotFound to use
check.Matches instead of manual strings.Contains conditions, which is
shorter and more consistent with the assertSkopeo... calls.
2016-06-22 16:19:59 +02:00
Miloslav Trmač
601f76f96d Fix consumeAndLogOutput
Primarily, make it actually work; reading into a non-zero-capacity but
zero-length slice would just return 0, the goroutine would terminate,
and even the producer of the output could fail with EPIPE/SIGPIPE.

Also make the logged output readable, converting it into a string
instead of a series of hexadecimal byte values.
2016-06-22 16:19:59 +02:00
Miloslav Trmač
2f2a688026 Move ConsumeAndLogOutput to integration/utils.go
This will be used also by non-signing tests.

No code changes besides removing the initial capital letter in the
function name; this is a separate commit only to make reviewing of
future changes to this function easier.
2016-06-22 16:19:59 +02:00
Antonio Murdaca
7c5db83261 Remove signature/fixtures subpackage
This will make the output of godoc cleaner, we can't filter out the
subpackage otherwise.

Also copy the needed fixture into the integration subpackage, instead of
referring to it using ../signature/fixtures (and we can't import
signature/fixtures_info-test.go now).

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-05-21 21:21:58 +02:00
Miloslav Trmač
521e3ce0eb Remove duplicated test 2016-05-21 04:46:57 +02:00
Miloslav Trmač
dd7c2d44fa Log command output on failures in signing integration tests 2016-04-11 17:41:57 +02:00
Miloslav Trmač
03f6cb89e6 Add standalone-sign and standalone-verify commands 2016-03-24 17:06:30 +01:00
Antonio Murdaca
3a09e2bf8e clean vendors and bootstrap tls verify
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-03-23 10:27:59 +01:00
Antonio Murdaca
c02155340e include needed deps
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-03-22 16:29:16 +01:00
Antonio Murdaca
fed651449e remove vendors ftw
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-03-22 16:02:55 +01:00
Antonio Murdaca
50a2ed1124 fix CI and remove docker/ dir
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-03-22 15:50:41 +01:00
Antonio Murdaca
0109708048 fix missing comma in tests
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-03-16 10:26:54 +01:00
Antonio Murdaca
adbf487541 fix readme, tests and vendors
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-03-16 10:21:36 +01:00
Antonio Murdaca
370f1bc685 reg v1 setup wip
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-03-04 13:02:52 +01:00
Antonio Murdaca
34fed9cabc update todo
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-03-04 10:54:15 +01:00
Antonio Murdaca
3de433ea4a re-enable and fix failing tests
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-02-02 13:51:10 +01:00
Antonio Murdaca
6cfd14f0c0 lots of todo and fixes
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-02-02 11:44:49 +01:00
Antonio Murdaca
c2b6a42855 validate scripts in container
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-01-24 12:27:53 +01:00
Antonio Murdaca
e17927ca1d add basic test infrastructure
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-01-23 18:31:03 +01:00