Rewrite HTTP handler for routes HTTP POST/PUT/PATCH methods

- adding tests for HTTP PUT
 - more tests for HTTP PATCH
This commit is contained in:
Denis Makogon
2017-08-16 13:55:30 +03:00
parent d11bafb868
commit 62d650f0a5
9 changed files with 226 additions and 93 deletions

View File

@@ -100,15 +100,6 @@ func TestRoutePut(t *testing.T) {
{datastore.NewMock(), logs.NewMock(), http.MethodPut, "/v1/apps/a/routes/myroute", `{ "route": { "image": "funcy/hello", "type": "sync" } }`, http.StatusOK, nil},
} {
test.run(t, i, buf)
test.ds = datastore.NewMockInit(nil,
[]*models.Route{
{
AppName: "a",
Path: "/myroute",
},
}, nil, nil,
)
test.run(t, i, buf)
}
}