1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

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)