Skip to content

Commit

Permalink
test: add override default mount config test
Browse files Browse the repository at this point in the history
tests user defined bind should override default mount config

Signed-off-by: Ace-Tang <aceapril@126.com>
  • Loading branch information
Ace-Tang authored and fuweid committed Mar 29, 2019
1 parent 3705165 commit 31e5fb1
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/cli_run_volume_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -541,3 +541,18 @@ func (suite *PouchRunVolumeSuite) TestRunWithQuotaID(c *check.C) {
}
c.Assert(found, check.Equals, true)
}

// TestRunOverrideVolume tests bind volume should override default config
func (suite *PouchRunVolumeSuite) TestRunOverrideVolume(c *check.C) {
cname := "TestRunOverrideVolume"
ret := command.PouchRun("run", "-d", "-v", "/sys/fs/cgroup:/sys/fs/cgroup",
"--name", cname, busyboxImage, "top")

defer DelContainerForceMultyTime(c, cname)
ret.Assert(c, icmd.Success)

output := command.PouchRun("inspect", "-f", "{{.ID}}", cname).Stdout()
containerID := strings.TrimSpace(output)

command.PouchRun("exec", cname, "ls", "/sys/fs/cgroup/memory/default/"+containerID).Assert(c, icmd.Success)
}

0 comments on commit 31e5fb1

Please sign in to comment.