diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 0fcfa67af887..e7f58f22312b 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -24,8 +24,7 @@ jobs: - alpine - buster engine-version: -# - 20.10-dind # FIXME: Fails on 20.10 - - stable-dind # TODO: Use 20.10-dind, stable-dind is deprecated + - 20.10-dind include: - target: non-experimental engine-version: 19.03-dind diff --git a/e2e/compose-env.yaml b/e2e/compose-env.yaml index a4c700c4654c..bd7616d86620 100644 --- a/e2e/compose-env.yaml +++ b/e2e/compose-env.yaml @@ -5,7 +5,7 @@ services: image: 'registry:2' engine: - image: 'docker:${TEST_ENGINE_VERSION:-stable-dind}' + image: 'docker:${TEST_ENGINE_VERSION:-dind}' privileged: true command: ['--insecure-registry=registry:5000'] environment: diff --git a/e2e/image/pull_test.go b/e2e/image/pull_test.go index 0d12fe68fa57..d94a1d374ea5 100644 --- a/e2e/image/pull_test.go +++ b/e2e/image/pull_test.go @@ -1,6 +1,7 @@ package image import ( + "strings" "testing" "github.com/docker/cli/e2e/internal/fixtures" @@ -16,6 +17,7 @@ const registryPrefix = "registry:5000" func TestPullWithContentTrust(t *testing.T) { skip.If(t, environment.RemoteDaemon()) + skip.If(t, strings.HasPrefix(environment.DaemonVersion(), "19.03"), "skipping on 19.03 daemon, as output format differs") dir := fixtures.SetupConfigFile(t) defer dir.Remove() diff --git a/e2e/image/testdata/pull-with-content-trust.golden b/e2e/image/testdata/pull-with-content-trust.golden index 9cb9a92a1714..12412cb9dec3 100644 --- a/e2e/image/testdata/pull-with-content-trust.golden +++ b/e2e/image/testdata/pull-with-content-trust.golden @@ -1,5 +1,5 @@ Pull (1 of 1): registry:5000/trust-pull:latest@sha256:641b95ddb2ea9dc2af1a0113b6b348ebc20872ba615204fbe12148e98fd6f23d -sha256:641b95ddb2ea9dc2af1a0113b6b348ebc20872ba615204fbe12148e98fd6f23d: Pulling from trust-pull +registry:5000/trust-pull@sha256:641b95ddb2ea9dc2af1a0113b6b348ebc20872ba615204fbe12148e98fd6f23d: Pulling from trust-pull Digest: sha256:641b95ddb2ea9dc2af1a0113b6b348ebc20872ba615204fbe12148e98fd6f23d Status: Downloaded newer image for registry:5000/trust-pull@sha256:641b95ddb2ea9dc2af1a0113b6b348ebc20872ba615204fbe12148e98fd6f23d registry:5000/trust-pull:latest diff --git a/internal/test/environment/testenv.go b/internal/test/environment/testenv.go index bb80a9b2cca8..fea629fee69d 100644 --- a/internal/test/environment/testenv.go +++ b/internal/test/environment/testenv.go @@ -70,6 +70,12 @@ func boolFromString(val string) bool { // DefaultPollSettings used with gotestyourself/poll var DefaultPollSettings = poll.WithDelay(100 * time.Millisecond) +// DaemonVersion returns the version of the daemon +func DaemonVersion() string { + result := icmd.RunCmd(icmd.Command("docker", "info", "--format", "{{.ServerVersion}}")) + return strings.TrimSpace(result.Stdout()) +} + // SkipIfNotExperimentalDaemon returns whether the test docker daemon is in experimental mode func SkipIfNotExperimentalDaemon(t *testing.T) { t.Helper()