mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Use specific APIs for shared mount-point behaviour
Thanks to @cpuguy83 for pointing these APIs out in #41638. Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
This commit is contained in:
parent
695b151a18
commit
1571e9331b
1 changed files with 4 additions and 4 deletions
|
@ -285,7 +285,7 @@ func TestContainerVolumesMountedAsShared(t *testing.T) {
|
|||
|
||||
// Convert this directory into a shared mount point so that we do
|
||||
// not rely on propagation properties of parent mount.
|
||||
if err := mount.Mount(tmpDir1.Path(), tmpDir1.Path(), "none", "bind,private"); err != nil {
|
||||
if err := mount.MakePrivate(tmpDir1.Path()); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
defer func() {
|
||||
|
@ -293,7 +293,7 @@ func TestContainerVolumesMountedAsShared(t *testing.T) {
|
|||
t.Fatal(err)
|
||||
}
|
||||
}()
|
||||
if err := mount.Mount("none", tmpDir1.Path(), "none", "shared"); err != nil {
|
||||
if err := mount.MakeShared(tmpDir1.Path()); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
|
@ -342,7 +342,7 @@ func TestContainerVolumesMountedAsSlave(t *testing.T) {
|
|||
|
||||
// Convert this directory into a shared mount point so that we do
|
||||
// not rely on propagation properties of parent mount.
|
||||
if err := mount.Mount(tmpDir1.Path(), tmpDir1.Path(), "none", "bind,private"); err != nil {
|
||||
if err := mount.MakePrivate(tmpDir1.Path()); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
defer func() {
|
||||
|
@ -350,7 +350,7 @@ func TestContainerVolumesMountedAsSlave(t *testing.T) {
|
|||
t.Fatal(err)
|
||||
}
|
||||
}()
|
||||
if err := mount.Mount("none", tmpDir1.Path(), "none", "shared"); err != nil {
|
||||
if err := mount.MakeShared(tmpDir1.Path()); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue