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:
parent
07b2e4cb79
commit
838fc976c8
2 changed files with 3 additions and 4 deletions
|
@ -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"))
|
||||
}
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue