diff --git a/cmd/skopeo/utils.go b/cmd/skopeo/utils.go index 17e893ec..6073bdc6 100644 --- a/cmd/skopeo/utils.go +++ b/cmd/skopeo/utils.go @@ -30,11 +30,11 @@ type errorShouldDisplayUsage struct { // The error for closeErr is annotated with description (which is not a format string) // Typical usage: // -// defer func() { -// if err := something.Close(); err != nil { -// returnedErr = noteCloseFailure(returnedErr, "closing something", err) -// } -// } +// defer func() { +// if err := something.Close(); err != nil { +// returnedErr = noteCloseFailure(returnedErr, "closing something", err) +// } +// } func noteCloseFailure(err error, description string, closeErr error) error { // We don’t accept a Closer() and close it ourselves because signature.PolicyContext has .Destroy(), not .Close(). // This also makes it harder for a caller to do diff --git a/integration/openshift_shell_test.go b/integration/openshift_shell_test.go index 8e67a999..3e43ab02 100644 --- a/integration/openshift_shell_test.go +++ b/integration/openshift_shell_test.go @@ -15,11 +15,15 @@ TestRunShell is not really a test; it is a convenient way to use the registry se in openshift.go and CopySuite to get an interactive environment for experimentation. To use it, run: + sudo make shell + to start a container, then within the container: + SKOPEO_CONTAINER_TESTS=1 PS1='nested> ' go test -tags openshift_shell -timeout=24h ./integration -v -check.v -check.vv -check.f='CopySuite.TestRunShell' An example of what can be done within the container: + cd ..; make bin/skopeo PREFIX=/usr install ./skopeo --tls-verify=false copy --sign-by=personal@example.com docker://quay.io/libpod/busybox:latest atomic:localhost:5000/myns/personal:personal oc get istag personal:personal -o json