Remove api test for bind mount /
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
This commit is contained in:
parent
e39b8eade1
commit
af025f2a95
1 changed files with 0 additions and 36 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Reference in a new issue