This test tests nothing because of error in cmd, where "echo 'should
fail'" passed as binary. Also this test directly contradicts
documentation and current daemon behavior.
Fixes #7826
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
| ... | ... |
@@ -507,27 +507,3 @@ func TestRunAutoRemove(t *testing.T) {
|
| 507 | 507 |
t.Fatalf("failed to remove container automatically: container %s still exists", temporaryContainerID)
|
| 508 | 508 |
} |
| 509 | 509 |
} |
| 510 |
- |
|
| 511 |
-// Expected behaviour: error out when attempting to bind mount non-existing source paths |
|
| 512 |
-func TestRunErrorBindNonExistingSource(t *testing.T) {
|
|
| 513 |
- key, err := libtrust.GenerateECP256PrivateKey() |
|
| 514 |
- if err != nil {
|
|
| 515 |
- t.Fatal(err) |
|
| 516 |
- } |
|
| 517 |
- |
|
| 518 |
- cli := client.NewDockerCli(nil, nil, ioutil.Discard, key, testDaemonProto, testDaemonAddr, nil) |
|
| 519 |
- defer cleanup(globalEngine, t) |
|
| 520 |
- |
|
| 521 |
- c := make(chan struct{})
|
|
| 522 |
- go func() {
|
|
| 523 |
- defer close(c) |
|
| 524 |
- // This check is made at runtime, can't be "unit tested" |
|
| 525 |
- if err := cli.CmdRun("-v", "/i/dont/exist:/tmp", unitTestImageID, "echo 'should fail'"); err == nil {
|
|
| 526 |
- t.Fatal("should have failed to run when using /i/dont/exist as a source for the bind mount")
|
|
| 527 |
- } |
|
| 528 |
- }() |
|
| 529 |
- |
|
| 530 |
- setTimeout(t, "CmdRun timed out", 5*time.Second, func() {
|
|
| 531 |
- <-c |
|
| 532 |
- }) |
|
| 533 |
-} |