summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastiaan van Stijn <github@gone.nl>2022-10-05 16:33:28 +0200
committerSebastiaan van Stijn <github@gone.nl>2022-10-08 17:41:39 +0200
commit838fc976c82c5d09e622cdf275ebd4032e06819c (patch)
tree990c88854a068e694e59d5b47f855168fa11468e
parent07b2e4cb7945e08feec99a7d1d2e80f0e6dc5aed (diff)
downloaddocker-838fc976c82c5d09e622cdf275ebd4032e06819c.tar.gz
integration(-cli): remove some redundant formatting
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
-rw-r--r--integration-cli/docker_cli_inspect_test.go2
-rw-r--r--integration/container/checkpoint_test.go5
2 files changed, 3 insertions, 4 deletions
diff --git a/integration-cli/docker_cli_inspect_test.go b/integration-cli/docker_cli_inspect_test.go
index 8c026e5e7c..bbc19cb10f 100644
--- a/integration-cli/docker_cli_inspect_test.go
+++ b/integration-cli/docker_cli_inspect_test.go
@@ -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"))
}
diff --git a/integration/container/checkpoint_test.go b/integration/container/checkpoint_test.go
index fb37fcea60..0bb8fcf581 100644
--- a/integration/container/checkpoint_test.go
+++ b/integration/container/checkpoint_test.go
@@ -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)