1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Adding support for network/id/endpoints in api

Signed-off-by: Madhu Venugopal <madhu@docker.com>
This commit is contained in:
Madhu Venugopal 2015-05-22 07:53:41 -07:00
parent 5ee5e2452f
commit b5a6c849e3
2 changed files with 3 additions and 3 deletions

View file

@ -89,7 +89,7 @@ func (h *httpHandler) initRouter() {
{"/networks/" + nwID, nil, procGetNetwork},
{"/networks/" + nwID + "/endpoints", []string{"name", epName}, procGetEndpoints},
{"/networks/" + nwID + "/endpoints", []string{"partial-id", epPID}, procGetEndpoints},
{"/networks/" + nwID + "/endpoints", nil, procGetEndpoints},
{"/networks/" + nwID + "/endpoints/" + epID, nil, procGetEndpoint},
},
"POST": {

View file

@ -1391,8 +1391,8 @@ func TestEndToEnd(t *testing.T) {
t.Fatal(err)
}
handleRequest(rsp, req)
if rsp.statusCode != http.StatusNotFound {
t.Fatalf("Expected StatusNotFound. Got (%d): %s", rsp.statusCode, rsp.body)
if rsp.statusCode != http.StatusOK {
t.Fatalf("Expected StatusOK. Got (%d): %s", rsp.statusCode, rsp.body)
}
req, err = http.NewRequest("GET", "/networks/"+nid+"/endpoints?name=bla", nil)