integration(-cli): remove some redundant formatting

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2022-10-05 16:33:28 +02:00
parent 07b2e4cb79
commit 838fc976c8
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
2 changed files with 3 additions and 4 deletions

View File

@ -135,7 +135,7 @@ func (s *DockerCLIInspectSuite) TestInspectTypeFlagWithInvalidValue(c *testing.T
out, exitCode, err := dockerCmdWithError("inspect", "--type=foobar", "busybox")
assert.Assert(c, err != nil, "%d", exitCode)
assert.Equal(c, exitCode, 1, fmt.Sprintf("%s", err))
assert.Equal(c, exitCode, 1, err)
assert.Assert(c, strings.Contains(out, "not a valid value for --type"))
}

View File

@ -2,7 +2,6 @@ package container // import "github.com/docker/docker/integration/container"
import (
"context"
"fmt"
"os/exec"
"regexp"
"sort"
@ -84,9 +83,9 @@ func TestCheckpoint(t *testing.T) {
err = client.CheckpointCreate(ctx, cID, cptOpt)
if err != nil {
// An error can contain a path to a dump file
t.Logf("%s", err)
t.Log(err)
re := regexp.MustCompile("path= (.*): ")
m := re.FindStringSubmatch(fmt.Sprintf("%s", err))
m := re.FindStringSubmatch(err.Error())
if len(m) >= 2 {
dumpLog := m[1]
t.Logf("%s", dumpLog)