Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
| ... | ... |
@@ -135,7 +135,7 @@ func (s *DockerCLIInspectSuite) TestInspectTypeFlagWithInvalidValue(c *testing.T |
| 135 | 135 |
|
| 136 | 136 |
out, exitCode, err := dockerCmdWithError("inspect", "--type=foobar", "busybox")
|
| 137 | 137 |
assert.Assert(c, err != nil, "%d", exitCode) |
| 138 |
- assert.Equal(c, exitCode, 1, fmt.Sprintf("%s", err))
|
|
| 138 |
+ assert.Equal(c, exitCode, 1, err) |
|
| 139 | 139 |
assert.Assert(c, strings.Contains(out, "not a valid value for --type")) |
| 140 | 140 |
} |
| 141 | 141 |
|
| ... | ... |
@@ -2,7 +2,6 @@ package container // import "github.com/docker/docker/integration/container" |
| 2 | 2 |
|
| 3 | 3 |
import ( |
| 4 | 4 |
"context" |
| 5 |
- "fmt" |
|
| 6 | 5 |
"os/exec" |
| 7 | 6 |
"regexp" |
| 8 | 7 |
"sort" |
| ... | ... |
@@ -84,9 +83,9 @@ func TestCheckpoint(t *testing.T) {
|
| 84 | 84 |
err = client.CheckpointCreate(ctx, cID, cptOpt) |
| 85 | 85 |
if err != nil {
|
| 86 | 86 |
// An error can contain a path to a dump file |
| 87 |
- t.Logf("%s", err)
|
|
| 87 |
+ t.Log(err) |
|
| 88 | 88 |
re := regexp.MustCompile("path= (.*): ")
|
| 89 |
- m := re.FindStringSubmatch(fmt.Sprintf("%s", err))
|
|
| 89 |
+ m := re.FindStringSubmatch(err.Error()) |
|
| 90 | 90 |
if len(m) >= 2 {
|
| 91 | 91 |
dumpLog := m[1] |
| 92 | 92 |
t.Logf("%s", dumpLog)
|