1
0
mirror of https://github.com/moby/moby.git synced 2025-11-30 07:21:52 +03:00

integration-cli: DockerAPISuite: replace dockerCmd and waitRun

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2023-07-27 13:13:00 +02:00
parent 908821d48a
commit 1baec48367
10 changed files with 174 additions and 191 deletions

View File

@@ -11,6 +11,7 @@ import (
"testing"
"github.com/docker/docker/api/types/versions"
"github.com/docker/docker/integration-cli/cli"
"github.com/docker/docker/testutil"
"github.com/docker/docker/testutil/request"
"github.com/pkg/errors"
@@ -19,7 +20,7 @@ import (
func (s *DockerAPISuite) TestExecResizeAPIHeightWidthNoInt(c *testing.T) {
testRequires(c, DaemonIsLinux)
out, _ := dockerCmd(c, "run", "-d", "busybox", "top")
out := cli.DockerCmd(c, "run", "-d", "busybox", "top").Stdout()
cleanedContainerID := strings.TrimSpace(out)
endpoint := "/exec/" + cleanedContainerID + "/resize?h=foo&w=bar"
@@ -35,7 +36,7 @@ func (s *DockerAPISuite) TestExecResizeAPIHeightWidthNoInt(c *testing.T) {
// Part of #14845
func (s *DockerAPISuite) TestExecResizeImmediatelyAfterExecStart(c *testing.T) {
name := "exec_resize_test"
dockerCmd(c, "run", "-d", "-i", "-t", "--name", name, "--restart", "always", "busybox", "/bin/sh")
cli.DockerCmd(c, "run", "-d", "-i", "-t", "--name", name, "--restart", "always", "busybox", "/bin/sh")
testExecResize := func() error {
data := map[string]interface{}{