integration-cli: remove deprecated buildImageSuccessfully utility

This was deprecated in 50c4475df6, which
introduced the cli test-utils package.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2025-10-05 17:25:15 +02:00
parent f739c61c69
commit 288b9f033b
22 changed files with 239 additions and 245 deletions

View File

@@ -412,7 +412,7 @@ func (s *DockerCLIRunSuite) TestRunCreateVolumesInSymlinkDir(c *testing.T) {
containerPath = "/test/test"
cmd = "true"
}
buildImageSuccessfully(c, name, build.WithDockerfile(dockerFile))
cli.BuildCmd(c, name, build.WithDockerfile(dockerFile))
cli.DockerCmd(c, "run", "-v", containerPath, name, cmd)
}
@@ -437,7 +437,7 @@ func (s *DockerCLIRunSuite) TestRunCreateVolumesInSymlinkDir2(c *testing.T) {
containerPath = "/test/test"
cmd = "true"
}
buildImageSuccessfully(c, name, build.WithDockerfile(dockerFile))
cli.BuildCmd(c, name, build.WithDockerfile(dockerFile))
cli.DockerCmd(c, "run", "-v", containerPath, name, cmd)
}
@@ -1582,7 +1582,7 @@ func (s *DockerCLIRunSuite) TestRunCopyVolumeUIDGID(c *testing.T) {
// Not applicable on Windows as it does not support uid or gid in this way
testRequires(c, DaemonIsLinux)
name := "testrunvolumesuidgid"
buildImageSuccessfully(c, name, build.WithDockerfile(`FROM busybox
cli.BuildCmd(c, name, build.WithDockerfile(`FROM busybox
RUN echo 'dockerio:x:1001:1001::/bin:/bin/false' >> /etc/passwd
RUN echo 'dockerio:x:1001:' >> /etc/group
RUN mkdir -p /hello && touch /hello/test && chown dockerio.dockerio /hello`))
@@ -1601,7 +1601,7 @@ func (s *DockerCLIRunSuite) TestRunCopyVolumeContent(c *testing.T) {
// that copies from the image to the volume.
testRequires(c, DaemonIsLinux)
name := "testruncopyvolumecontent"
buildImageSuccessfully(c, name, build.WithDockerfile(`FROM busybox
cli.BuildCmd(c, name, build.WithDockerfile(`FROM busybox
RUN mkdir -p /hello/local && echo hello > /hello/local/world`))
// Test that the content is copied from the image to the volume
@@ -1613,7 +1613,7 @@ func (s *DockerCLIRunSuite) TestRunCopyVolumeContent(c *testing.T) {
func (s *DockerCLIRunSuite) TestRunCleanupCmdOnEntrypoint(c *testing.T) {
name := "testrunmdcleanuponentrypoint"
buildImageSuccessfully(c, name, build.WithDockerfile(`FROM busybox
cli.BuildCmd(c, name, build.WithDockerfile(`FROM busybox
ENTRYPOINT ["echo"]
CMD ["testingpoint"]`))
@@ -2073,7 +2073,7 @@ func (s *DockerCLIRunSuite) TestVolumesNoCopyData(c *testing.T) {
// are pre-populated such as is built in the dockerfile used in this test.
testRequires(c, DaemonIsLinux)
prefix, slash := getPrefixAndSlashFromDaemonPlatform()
buildImageSuccessfully(c, "dataimage", build.WithDockerfile(`FROM busybox
cli.BuildCmd(c, "dataimage", build.WithDockerfile(`FROM busybox
RUN ["mkdir", "-p", "/foo"]
RUN ["touch", "/foo/bar"]`))
cli.DockerCmd(c, "run", "--name", "test", "-v", prefix+slash+"foo", "busybox")
@@ -2104,7 +2104,7 @@ func (s *DockerCLIRunSuite) TestRunNoOutputFromPullInStdout(c *testing.T) {
func (s *DockerCLIRunSuite) TestRunVolumesCleanPaths(c *testing.T) {
testRequires(c, testEnv.IsLocalDaemon)
prefix, slash := getPrefixAndSlashFromDaemonPlatform()
buildImageSuccessfully(c, "run_volumes_clean_paths", build.WithDockerfile(`FROM busybox
cli.BuildCmd(c, "run_volumes_clean_paths", build.WithDockerfile(`FROM busybox
VOLUME `+prefix+`/foo/`))
cli.DockerCmd(c, "run", "-v", prefix+"/foo", "-v", prefix+"/bar/", "--name", "dark_helmet", "run_volumes_clean_paths")
@@ -3599,7 +3599,7 @@ func (s *DockerCLIRunSuite) TestRunInitLayerPathOwnership(c *testing.T) {
// Not applicable on Windows as it does not support Linux uid/gid ownership
testRequires(c, DaemonIsLinux)
name := "testetcfileownership"
buildImageSuccessfully(c, name, build.WithDockerfile(`FROM busybox
cli.BuildCmd(c, name, build.WithDockerfile(`FROM busybox
RUN echo 'dockerio:x:1001:1001::/bin:/bin/false' >> /etc/passwd
RUN echo 'dockerio:x:1001:' >> /etc/group
RUN chown dockerio:dockerio /etc`))
@@ -3651,7 +3651,7 @@ func (s *DockerCLIRunSuite) TestRunNamedVolumeCopyImageData(c *testing.T) {
testRequires(c, DaemonIsLinux)
testImg := "testvolumecopy"
buildImageSuccessfully(c, testImg, build.WithDockerfile(`
cli.BuildCmd(c, testImg, build.WithDockerfile(`
FROM busybox
RUN mkdir -p /foo && echo hello > /foo/hello
`))
@@ -3770,7 +3770,7 @@ func (s *DockerCLIRunSuite) TestRunVolumeWithOneCharacter(c *testing.T) {
func (s *DockerCLIRunSuite) TestRunVolumeCopyFlag(c *testing.T) {
testRequires(c, DaemonIsLinux) // Windows does not support copying data from image to the volume
buildImageSuccessfully(c, "volumecopy", build.WithDockerfile(`FROM busybox
cli.BuildCmd(c, "volumecopy", build.WithDockerfile(`FROM busybox
RUN mkdir /foo && echo hello > /foo/bar
CMD cat /foo/bar`))
cli.DockerCmd(c, "volume", "create", "test")