Bläddra i källkod

integration-cli/build: Alias `cmp` as `is`

To make it consistent with other tests.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
Paweł Gronowski 1 år sedan
förälder
incheckning
dffccfd0f1
1 ändrade filer med 8 tillägg och 8 borttagningar
  1. 8 8
      integration-cli/docker_cli_build_test.go

+ 8 - 8
integration-cli/docker_cli_build_test.go

@@ -26,7 +26,7 @@ import (
 	"github.com/moby/buildkit/frontend/dockerfile/command"
 	"github.com/opencontainers/go-digest"
 	"gotest.tools/v3/assert"
-	"gotest.tools/v3/assert/cmp"
+	is "gotest.tools/v3/assert/cmp"
 	"gotest.tools/v3/icmd"
 )
 
@@ -4626,7 +4626,7 @@ func (s *DockerCLIBuildSuite) TestBuildMultiStageArg(c *testing.T) {
 	result.Assert(c, icmd.Success)
 
 	imgs := strings.Split(strings.TrimSpace(result.Stdout()), "\n")
-	assert.Assert(c, cmp.Len(imgs, 1), `only one image with "multifromtest" label is expected`)
+	assert.Assert(c, is.Len(imgs, 1), `only one image with "multifromtest" label is expected`)
 
 	parentID := imgs[0]
 
@@ -4656,7 +4656,7 @@ func (s *DockerCLIBuildSuite) TestBuildMultiStageGlobalArg(c *testing.T) {
 	result.Assert(c, icmd.Success)
 
 	imgs := strings.Split(strings.TrimSpace(result.Stdout()), "\n")
-	assert.Assert(c, cmp.Len(imgs, 1), `only one image with "multifromtest" label is expected`)
+	assert.Assert(c, is.Len(imgs, 1), `only one image with "multifromtest" label is expected`)
 
 	parentID := imgs[0]
 
@@ -4783,7 +4783,7 @@ func (s *DockerCLIBuildSuite) TestBuildFollowSymlinkToFile(c *testing.T) {
 	cli.BuildCmd(c, name, build.WithExternalBuildContext(ctx))
 
 	out := cli.DockerCmd(c, "run", "--rm", name, "cat", "target").Combined()
-	assert.Assert(c, cmp.Regexp("^bar$", out))
+	assert.Assert(c, is.Regexp("^bar$", out))
 
 	// change target file should invalidate cache
 	err = os.WriteFile(filepath.Join(ctx.Dir, "foo"), []byte("baz"), 0o644)
@@ -4792,7 +4792,7 @@ func (s *DockerCLIBuildSuite) TestBuildFollowSymlinkToFile(c *testing.T) {
 	result := cli.BuildCmd(c, name, build.WithExternalBuildContext(ctx))
 	assert.Assert(c, !strings.Contains(result.Combined(), "Using cache"))
 	out = cli.DockerCmd(c, "run", "--rm", name, "cat", "target").Combined()
-	assert.Assert(c, cmp.Regexp("^baz$", out))
+	assert.Assert(c, is.Regexp("^baz$", out))
 }
 
 func (s *DockerCLIBuildSuite) TestBuildFollowSymlinkToDir(c *testing.T) {
@@ -4813,7 +4813,7 @@ func (s *DockerCLIBuildSuite) TestBuildFollowSymlinkToDir(c *testing.T) {
 	cli.BuildCmd(c, name, build.WithExternalBuildContext(ctx))
 
 	out := cli.DockerCmd(c, "run", "--rm", name, "cat", "abc", "def").Combined()
-	assert.Assert(c, cmp.Regexp("^barbaz$", out))
+	assert.Assert(c, is.Regexp("^barbaz$", out))
 
 	// change target file should invalidate cache
 	err = os.WriteFile(filepath.Join(ctx.Dir, "foo/def"), []byte("bax"), 0o644)
@@ -4822,7 +4822,7 @@ func (s *DockerCLIBuildSuite) TestBuildFollowSymlinkToDir(c *testing.T) {
 	result := cli.BuildCmd(c, name, build.WithExternalBuildContext(ctx))
 	assert.Assert(c, !strings.Contains(result.Combined(), "Using cache"))
 	out = cli.DockerCmd(c, "run", "--rm", name, "cat", "abc", "def").Combined()
-	assert.Assert(c, cmp.Regexp("^barbax$", out))
+	assert.Assert(c, is.Regexp("^barbax$", out))
 }
 
 // TestBuildSymlinkBasename tests that target file gets basename from symlink,
@@ -4844,7 +4844,7 @@ func (s *DockerCLIBuildSuite) TestBuildSymlinkBasename(c *testing.T) {
 	cli.BuildCmd(c, name, build.WithExternalBuildContext(ctx))
 
 	out := cli.DockerCmd(c, "run", "--rm", name, "cat", "asymlink").Combined()
-	assert.Assert(c, cmp.Regexp("^bar$", out))
+	assert.Assert(c, is.Regexp("^bar$", out))
 }
 
 // #17827