Thanks to @cpuguy83 for pointing these APIs out in #41638.
Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
| ... | ... |
@@ -285,7 +285,7 @@ func TestContainerVolumesMountedAsShared(t *testing.T) {
|
| 285 | 285 |
|
| 286 | 286 |
// Convert this directory into a shared mount point so that we do |
| 287 | 287 |
// not rely on propagation properties of parent mount. |
| 288 |
- if err := mount.Mount(tmpDir1.Path(), tmpDir1.Path(), "none", "bind,private"); err != nil {
|
|
| 288 |
+ if err := mount.MakePrivate(tmpDir1.Path()); err != nil {
|
|
| 289 | 289 |
t.Fatal(err) |
| 290 | 290 |
} |
| 291 | 291 |
defer func() {
|
| ... | ... |
@@ -293,7 +293,7 @@ func TestContainerVolumesMountedAsShared(t *testing.T) {
|
| 293 | 293 |
t.Fatal(err) |
| 294 | 294 |
} |
| 295 | 295 |
}() |
| 296 |
- if err := mount.Mount("none", tmpDir1.Path(), "none", "shared"); err != nil {
|
|
| 296 |
+ if err := mount.MakeShared(tmpDir1.Path()); err != nil {
|
|
| 297 | 297 |
t.Fatal(err) |
| 298 | 298 |
} |
| 299 | 299 |
|
| ... | ... |
@@ -342,7 +342,7 @@ func TestContainerVolumesMountedAsSlave(t *testing.T) {
|
| 342 | 342 |
|
| 343 | 343 |
// Convert this directory into a shared mount point so that we do |
| 344 | 344 |
// not rely on propagation properties of parent mount. |
| 345 |
- if err := mount.Mount(tmpDir1.Path(), tmpDir1.Path(), "none", "bind,private"); err != nil {
|
|
| 345 |
+ if err := mount.MakePrivate(tmpDir1.Path()); err != nil {
|
|
| 346 | 346 |
t.Fatal(err) |
| 347 | 347 |
} |
| 348 | 348 |
defer func() {
|
| ... | ... |
@@ -350,7 +350,7 @@ func TestContainerVolumesMountedAsSlave(t *testing.T) {
|
| 350 | 350 |
t.Fatal(err) |
| 351 | 351 |
} |
| 352 | 352 |
}() |
| 353 |
- if err := mount.Mount("none", tmpDir1.Path(), "none", "shared"); err != nil {
|
|
| 353 |
+ if err := mount.MakeShared(tmpDir1.Path()); err != nil {
|
|
| 354 | 354 |
t.Fatal(err) |
| 355 | 355 |
} |
| 356 | 356 |
|