mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Fix minor vet warnings
Also use Asserts where it's possible. Signed-off-by: Alexander Morozov <lk4d4@docker.com>
This commit is contained in:
parent
c2bf90eb59
commit
7a20a270bc
3 changed files with 11 additions and 35 deletions
|
@ -23,18 +23,12 @@ func (s *DockerSuite) TestApiUpdateContainer(c *check.C) {
|
|||
_, _, err := sockRequest("POST", "/containers/"+name+"/update", hostConfig)
|
||||
c.Assert(err, check.IsNil)
|
||||
|
||||
memory := inspectField(c, name, "HostConfig.Memory")
|
||||
if memory != "314572800" {
|
||||
c.Fatalf("Got the wrong memory value, we got %d, expected 314572800(300M).", memory)
|
||||
}
|
||||
c.Assert(inspectField(c, name, "HostConfig.Memory"), checker.Equals, "314572800")
|
||||
file := "/sys/fs/cgroup/memory/memory.limit_in_bytes"
|
||||
out, _ := dockerCmd(c, "exec", name, "cat", file)
|
||||
c.Assert(strings.TrimSpace(out), checker.Equals, "314572800")
|
||||
|
||||
memorySwap := inspectField(c, name, "HostConfig.MemorySwap")
|
||||
if memorySwap != "524288000" {
|
||||
c.Fatalf("Got the wrong memorySwap value, we got %d, expected 524288000(500M).", memorySwap)
|
||||
}
|
||||
c.Assert(inspectField(c, name, "HostConfig.MemorySwap"), checker.Equals, "524288000")
|
||||
file = "/sys/fs/cgroup/memory/memory.memsw.limit_in_bytes"
|
||||
out, _ = dockerCmd(c, "exec", name, "cat", file)
|
||||
c.Assert(strings.TrimSpace(out), checker.Equals, "524288000")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue