Browse code

Remove api test for bind mount / Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)

Michael Crosby authored on 2014/06/27 07:39:45
Showing 1 changed files
... ...
@@ -672,42 +672,6 @@ func TestPostContainersStart(t *testing.T) {
672 672
 	containerKill(eng, containerID, t)
673 673
 }
674 674
 
675
-// Expected behaviour: using / as a bind mount source should throw an error
676
-func TestRunErrorBindMountRootSource(t *testing.T) {
677
-	eng := NewTestEngine(t)
678
-	defer mkDaemonFromEngine(eng, t).Nuke()
679
-
680
-	containerID := createTestContainer(
681
-		eng,
682
-		&runconfig.Config{
683
-			Image:     unitTestImageID,
684
-			Cmd:       []string{"/bin/cat"},
685
-			OpenStdin: true,
686
-		},
687
-		t,
688
-	)
689
-
690
-	hostConfigJSON, err := json.Marshal(&runconfig.HostConfig{
691
-		Binds: []string{"/:/tmp"},
692
-	})
693
-
694
-	req, err := http.NewRequest("POST", "/containers/"+containerID+"/start", bytes.NewReader(hostConfigJSON))
695
-	if err != nil {
696
-		t.Fatal(err)
697
-	}
698
-
699
-	req.Header.Set("Content-Type", "application/json")
700
-
701
-	r := httptest.NewRecorder()
702
-	if err := server.ServeRequest(eng, api.APIVERSION, r, req); err != nil {
703
-		t.Fatal(err)
704
-	}
705
-	if r.Code != http.StatusInternalServerError {
706
-		containerKill(eng, containerID, t)
707
-		t.Fatal("should have failed to run when using / as a source for the bind mount")
708
-	}
709
-}
710
-
711 675
 func TestPostContainersStop(t *testing.T) {
712 676
 	eng := NewTestEngine(t)
713 677
 	defer mkDaemonFromEngine(eng, t).Nuke()