Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
| ... | ... |
@@ -511,20 +511,8 @@ func TestVolumesFromGetsProperMode(t *testing.T) {
|
| 511 | 511 |
func TestRunNoDupVolumes(t *testing.T) {
|
| 512 | 512 |
defer deleteAllContainers() |
| 513 | 513 |
|
| 514 |
- bindPath1, err := ioutil.TempDir("", "test1")
|
|
| 515 |
- if err != nil {
|
|
| 516 |
- t.Fatal(err) |
|
| 517 |
- } |
|
| 518 |
- defer os.Remove(bindPath1) |
|
| 519 |
- |
|
| 520 |
- bindPath2, err := ioutil.TempDir("", "test2")
|
|
| 521 |
- if err != nil {
|
|
| 522 |
- t.Fatal(err) |
|
| 523 |
- } |
|
| 524 |
- defer os.Remove(bindPath2) |
|
| 525 |
- |
|
| 526 |
- mountstr1 := bindPath1 + ":/someplace" |
|
| 527 |
- mountstr2 := bindPath2 + ":/someplace" |
|
| 514 |
+ mountstr1 := randomUnixTmpDirPath("test1") + ":/someplace"
|
|
| 515 |
+ mountstr2 := randomUnixTmpDirPath("test2") + ":/someplace"
|
|
| 528 | 516 |
|
| 529 | 517 |
cmd := exec.Command(dockerBinary, "run", "-v", mountstr1, "-v", mountstr2, "busybox", "true") |
| 530 | 518 |
if out, _, err := runCommandWithOutput(cmd); err == nil {
|