diff --git a/integration-cli/docker_cli_exec_test.go b/integration-cli/docker_cli_exec_test.go index 3c59552c7b..2557ddf34c 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 1d27b8b320..a4b7ea9bac 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 ab81220d5f..7c0befc7e7 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" {