From cae5fc8047079e19c1e7ff9e420199995fc9c651 Mon Sep 17 00:00:00 2001 From: Michael Crosby Date: Thu, 26 Jun 2014 15:39:45 -0700 Subject: [PATCH] Remove api test for bind mount / Docker-DCO-1.1-Signed-off-by: Michael Crosby (github: crosbymichael) Upstream-commit: af025f2a95090974eaaf3d8792d5f467d0a637be Component: engine --- components/engine/integration/api_test.go | 36 ----------------------- 1 file changed, 36 deletions(-) diff --git a/components/engine/integration/api_test.go b/components/engine/integration/api_test.go index 620d6ecaa4..2d1b803682 100644 --- a/components/engine/integration/api_test.go +++ b/components/engine/integration/api_test.go @@ -672,42 +672,6 @@ func TestPostContainersStart(t *testing.T) { containerKill(eng, containerID, t) } -// Expected behaviour: using / as a bind mount source should throw an error -func TestRunErrorBindMountRootSource(t *testing.T) { - eng := NewTestEngine(t) - defer mkDaemonFromEngine(eng, t).Nuke() - - containerID := createTestContainer( - eng, - &runconfig.Config{ - Image: unitTestImageID, - Cmd: []string{"/bin/cat"}, - OpenStdin: true, - }, - t, - ) - - hostConfigJSON, err := json.Marshal(&runconfig.HostConfig{ - Binds: []string{"/:/tmp"}, - }) - - req, err := http.NewRequest("POST", "/containers/"+containerID+"/start", bytes.NewReader(hostConfigJSON)) - if err != nil { - t.Fatal(err) - } - - req.Header.Set("Content-Type", "application/json") - - r := httptest.NewRecorder() - if err := server.ServeRequest(eng, api.APIVERSION, r, req); err != nil { - t.Fatal(err) - } - if r.Code != http.StatusInternalServerError { - containerKill(eng, containerID, t) - t.Fatal("should have failed to run when using / as a source for the bind mount") - } -} - func TestPostContainersStop(t *testing.T) { eng := NewTestEngine(t) defer mkDaemonFromEngine(eng, t).Nuke()