Browse code

Remove an unit test from integrations test

Guillaume J. Charmes authored on 2013/11/30 03:17:04
Showing 1 changed files
... ...
@@ -774,25 +774,6 @@ func TestCmdLogs(t *testing.T) {
774 774
 	}
775 775
 }
776 776
 
777
-// Expected behaviour: using / as a bind mount source should throw an error
778
-func TestRunErrorBindMountRootSource(t *testing.T) {
779
-
780
-	cli := docker.NewDockerCli(nil, nil, ioutil.Discard, testDaemonProto, testDaemonAddr)
781
-	defer cleanup(globalEngine, t)
782
-
783
-	c := make(chan struct{})
784
-	go func() {
785
-		defer close(c)
786
-		if err := cli.CmdRun("-v", "/:/tmp", unitTestImageID, "echo 'should fail'"); err == nil {
787
-			t.Fatal("should have failed to run when using / as a source for the bind mount")
788
-		}
789
-	}()
790
-
791
-	setTimeout(t, "CmdRun timed out", 5*time.Second, func() {
792
-		<-c
793
-	})
794
-}
795
-
796 777
 // Expected behaviour: error out when attempting to bind mount non-existing source paths
797 778
 func TestRunErrorBindNonExistingSource(t *testing.T) {
798 779
 
... ...
@@ -802,6 +783,7 @@ func TestRunErrorBindNonExistingSource(t *testing.T) {
802 802
 	c := make(chan struct{})
803 803
 	go func() {
804 804
 		defer close(c)
805
+		// This check is made at runtime, can't be "unit tested"
805 806
 		if err := cli.CmdRun("-v", "/i/dont/exist:/tmp", unitTestImageID, "echo 'should fail'"); err == nil {
806 807
 			t.Fatal("should have failed to run when using /i/dont/exist as a source for the bind mount")
807 808
 		}