浏览代码

Skip the busybox digest check when containerd is enabled

We always have a digest with containerd.

Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
Djordje Lukic 1 年之前
父节点
当前提交
6ca1b9e4ce
共有 1 个文件被更改,包括 6 次插入3 次删除
  1. 6 3
      integration-cli/docker_cli_by_digest_test.go

+ 6 - 3
integration-cli/docker_cli_by_digest_test.go

@@ -317,9 +317,12 @@ func (s *DockerRegistrySuite) TestListImagesWithDigests(c *testing.T) {
 	assert.Assert(c, reWithDigest1.MatchString(out), "expected %q: %s", reWithDigest1.String(), out)
 	// make sure image 2 has repo, tag, digest
 	assert.Assert(c, reWithDigest2.MatchString(out), "expected %q: %s", reWithDigest2.String(), out)
-	// make sure busybox has tag, but not digest
-	busyboxRe := regexp.MustCompile(`\s*busybox\s*latest\s*<none>\s`)
-	assert.Assert(c, busyboxRe.MatchString(out), "expected %q: %s", busyboxRe.String(), out)
+	// We always have a digest when using containerd to store images
+	if !testEnv.UsingSnapshotter() {
+		// make sure busybox has tag, but not digest
+		busyboxRe := regexp.MustCompile(`\s*busybox\s*latest\s*<none>\s`)
+		assert.Assert(c, busyboxRe.MatchString(out), "expected %q: %s", busyboxRe.String(), out)
+	}
 }
 
 func (s *DockerRegistrySuite) TestListDanglingImagesWithDigests(c *testing.T) {