Fixing fmt

This commit is contained in:
Denis Makogon
2017-07-17 20:57:18 +03:00
parent 4f5197a1c2
commit b3ba42e3b9

View File

@@ -115,7 +115,7 @@ func TestRoutePut(t *testing.T) {
func TestRouteDelete(t *testing.T) { func TestRouteDelete(t *testing.T) {
buf := setLogBuffer() buf := setLogBuffer()
routes := models.Routes{{AppName: "a", Path: "/myroute",}} routes := models.Routes{{AppName: "a", Path: "/myroute"}}
apps := []*models.App{{Name: "a", Routes: routes, Config: nil}} apps := []*models.App{{Name: "a", Routes: routes, Config: nil}}
for i, test := range []struct { for i, test := range []struct {
@@ -126,9 +126,8 @@ func TestRouteDelete(t *testing.T) {
expectedCode int expectedCode int
expectedError error expectedError error
}{ }{
{datastore.NewMock(), logs.NewMock(), "/v1/apps/a/routes/missing", "", http.StatusNotFound, models.ErrRoutesNotFound}, {datastore.NewMock(), logs.NewMock(), "/v1/apps/a/routes/missing", "", http.StatusNotFound, models.ErrAppsNotFound},
{datastore.NewMockInit(apps, routes, nil, nil, {datastore.NewMockInit(apps, routes, nil, nil), logs.NewMock(), "/v1/apps/a/routes/myroute", "", http.StatusOK, nil},
), logs.NewMock(), "/v1/apps/a/routes/myroute", "", http.StatusOK, nil},
} { } {
rnr, cancel := testRunner(t) rnr, cancel := testRunner(t)
srv := testServer(test.ds, &mqs.Mock{}, test.logDB, rnr) srv := testServer(test.ds, &mqs.Mock{}, test.logDB, rnr)