diff --git a/integration-cli/docker_cli_exec_test.go b/integration-cli/docker_cli_exec_test.go index 3c59552c7b9cc9b5fe038564ce72ea71f171a2c9..2557ddf34c3debc6dcd13f468bc21489ae2081fd 100644 --- a/integration-cli/docker_cli_exec_test.go +++ b/integration-cli/docker_cli_exec_test.go @@ -479,7 +479,7 @@ func (s *DockerSuite) TestInspectExecID(c *check.C) { // But we should still be able to query the execID sc, body, err := sockRequest("GET", "/exec/"+execID+"/json", nil) if sc != http.StatusOK { - c.Fatalf("received status != 200 OK: %s\n%s", sc, body) + c.Fatalf("received status != 200 OK: %d\n%s", sc, body) } } diff --git a/runconfig/exec_test.go b/runconfig/exec_test.go index 1d27b8b320c0f63e0d3a14453fa9d1aeffd1f838..a4b7ea9bacbb0982abd0b3a433adcc7f06b68d5f 100644 --- a/runconfig/exec_test.go +++ b/runconfig/exec_test.go @@ -2,9 +2,10 @@ package runconfig import ( "fmt" - flag "github.com/docker/docker/pkg/mflag" "io/ioutil" "testing" + + flag "github.com/docker/docker/pkg/mflag" ) type arguments struct { @@ -118,11 +119,10 @@ func compareExecConfig(config1 *ExecConfig, config2 *ExecConfig) bool { } if len(config1.Cmd) != len(config2.Cmd) { return false - } else { - for index, value := range config1.Cmd { - if value != config2.Cmd[index] { - return false - } + } + for index, value := range config1.Cmd { + if value != config2.Cmd[index] { + return false } } return true diff --git a/runconfig/hostconfig_test.go b/runconfig/hostconfig_test.go index ab81220d5fcd92144271c9edbe4136ca8010687d..7c0befc7e7d94d952dee3b8db4487c6900cc7da9 100644 --- a/runconfig/hostconfig_test.go +++ b/runconfig/hostconfig_test.go @@ -248,11 +248,11 @@ func TestDecodeHostConfig(t *testing.T) { } if c.Privileged != false { - t.Fatalf("Expected privileged false, found %s\n", c.Privileged) + t.Fatalf("Expected privileged false, found %v\n", c.Privileged) } - if len(c.Binds) != 1 { - t.Fatalf("Expected 1 bind, found %v\n", c.Binds) + if l := len(c.Binds); l != 1 { + t.Fatalf("Expected 1 bind, found %d\n", l) } if c.CapAdd.Len() != 1 && c.CapAdd.Slice()[0] != "NET_ADMIN" {