integration-cli: remove cli.Build(), cli.Inspect()

They were just small wrappers arround cli.Args(), and the abstraction
made one wonder if they were doing some "magic" things, but they weren't,
so just inlining the `cli.Args()` makes it more transparent what's executed.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2022-02-23 13:19:28 +01:00
parent bc0885f364
commit 940730093b
4 changed files with 27 additions and 37 deletions

View File

@@ -3943,7 +3943,7 @@ func (s *DockerCLIRunSuite) TestRunRm(c *testing.T) {
name := "miss-me-when-im-gone"
cli.DockerCmd(c, "run", "--name="+name, "--rm", "busybox")
cli.Docker(cli.Inspect(name), cli.Format(".name")).Assert(c, icmd.Expected{
cli.Docker(cli.Args("inspect", name), cli.Format(".name")).Assert(c, icmd.Expected{
ExitCode: 1,
Err: "No such object: " + name,
})
@@ -3955,7 +3955,7 @@ func (s *DockerCLIRunSuite) TestRunRmPre125Api(c *testing.T) {
envs := appendBaseEnv(os.Getenv("DOCKER_TLS_VERIFY") != "", "DOCKER_API_VERSION=1.24")
cli.Docker(cli.Args("run", "--name="+name, "--rm", "busybox"), cli.WithEnvironmentVariables(envs...)).Assert(c, icmd.Success)
cli.Docker(cli.Inspect(name), cli.Format(".name")).Assert(c, icmd.Expected{
cli.Docker(cli.Args("inspect", name), cli.Format(".name")).Assert(c, icmd.Expected{
ExitCode: 1,
Err: "No such object: " + name,
})