Browse Source

TestContainersAPICreateMountsCreate: minor optimization

Don't use two-stage mount in TestContainersAPICreateMountsCreate();
apparently it was written before mount.Mount() could accept propagation
flags.

While at it, remove rw as this is the default.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Kir Kolyshkin 6 năm trước cách đây
mục cha
commit
1cfdb2ffb8
1 tập tin đã thay đổi với 1 bổ sung2 xóa
  1. 1 2
      integration-cli/docker_api_containers_test.go

+ 1 - 2
integration-cli/docker_api_containers_test.go

@@ -2115,8 +2115,7 @@ func (s *DockerSuite) TestContainersAPICreateMountsCreate(c *check.C) {
 			assert.NilError(c, err)
 			defer os.RemoveAll(tmpDir3)
 
-			c.Assert(mount.Mount(tmpDir3, tmpDir3, "none", "bind,rw"), checker.IsNil)
-			c.Assert(mount.ForceMount("", tmpDir3, "none", "shared"), checker.IsNil)
+			c.Assert(mount.Mount(tmpDir3, tmpDir3, "none", "bind,shared"), checker.IsNil)
 
 			cases = append(cases, []testCase{
 				{