mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Add minor vet fixes
Signed-off-by: Antonio Murdaca <runcom@linux.com>
This commit is contained in:
parent
9264d38424
commit
26ce3f4c90
3 changed files with 10 additions and 10 deletions
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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,12 +119,11 @@ 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
|
||||
}
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
|
|
@ -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" {
|
||||
|
|
Loading…
Reference in a new issue