mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
fn: improve UX (#325)
* fn: make UX more consistent with regards to app name position * fn: improve detection of missing routes * fn: fix update operations - No longer delete-than-add for configuration updates - Path cleaning before most of routes operations
This commit is contained in:
committed by
Seif Lotfy سيف لطفي
parent
e2e82086c5
commit
fe845e1886
@@ -64,7 +64,11 @@ func TestRouteDelete(t *testing.T) {
|
||||
tasks := mockTasksConduit()
|
||||
defer close(tasks)
|
||||
|
||||
router := testRouter(&datastore.Mock{}, &mqs.Mock{}, testRunner(t), tasks)
|
||||
router := testRouter(&datastore.Mock{
|
||||
FakeRoutes: []*models.Route{
|
||||
&models.Route{AppName: "a", Path: "/myroute"},
|
||||
},
|
||||
}, &mqs.Mock{}, testRunner(t), tasks)
|
||||
|
||||
for i, test := range []struct {
|
||||
path string
|
||||
@@ -74,6 +78,7 @@ func TestRouteDelete(t *testing.T) {
|
||||
}{
|
||||
{"/v1/apps/a/routes", "", http.StatusTemporaryRedirect, nil},
|
||||
{"/v1/apps/a/routes/myroute", "", http.StatusOK, nil},
|
||||
{"/v1/apps/a/routes/missing", "", http.StatusNotFound, nil},
|
||||
} {
|
||||
_, rec := routerRequest(t, router, "DELETE", test.path, nil)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user