diff --git a/api/agent/func_logger.go b/api/agent/func_logger.go index ff394d7fa..2d856c8d4 100644 --- a/api/agent/func_logger.go +++ b/api/agent/func_logger.go @@ -51,10 +51,11 @@ func NewFuncLogger(ctx context.Context, appName, path, image, reqID string, logD // we don't need to log per line to db, but we do need to limit it limitw := newLimitWriter(MB, &dbWriter{ - Buffer: dbuf, - db: logDB, - ctx: ctx, - reqID: reqID, + Buffer: dbuf, + db: logDB, + ctx: ctx, + reqID: reqID, + appName: appName, }) // TODO / NOTE: we want linew to be first because limitw may error if limit @@ -177,15 +178,16 @@ func (li *lineWriter) Close() error { type dbWriter struct { *bytes.Buffer - db models.LogStore - ctx context.Context - reqID string + db models.LogStore + ctx context.Context + reqID string + appName string } func (w *dbWriter) Close() error { span, ctx := opentracing.StartSpanFromContext(context.Background(), "agent_log_write") defer span.Finish() - return w.db.InsertLog(ctx, w.reqID, w.String()) + return w.db.InsertLog(ctx, w.appName, w.reqID, w.String()) } func (w *dbWriter) Write(b []byte) (int, error) { diff --git a/api/datastore/internal/datastoreutil/metrics.go b/api/datastore/internal/datastoreutil/metrics.go index a48e27a77..cf1c8afbf 100644 --- a/api/datastore/internal/datastoreutil/metrics.go +++ b/api/datastore/internal/datastoreutil/metrics.go @@ -100,22 +100,22 @@ func (m *metricds) GetCalls(ctx context.Context, filter *models.CallFilter) ([]* return m.ds.GetCalls(ctx, filter) } -func (m *metricds) InsertLog(ctx context.Context, callID string, callLog string) error { +func (m *metricds) InsertLog(ctx context.Context, appName, callID, callLog string) error { span, ctx := opentracing.StartSpanFromContext(ctx, "ds_insert_log") defer span.Finish() - return m.ds.InsertLog(ctx, callID, callLog) + return m.ds.InsertLog(ctx, appName, callID, callLog) } -func (m *metricds) GetLog(ctx context.Context, callID string) (*models.CallLog, error) { +func (m *metricds) GetLog(ctx context.Context, appName, callID string) (*models.CallLog, error) { span, ctx := opentracing.StartSpanFromContext(ctx, "ds_get_log") defer span.Finish() - return m.ds.GetLog(ctx, callID) + return m.ds.GetLog(ctx, appName, callID) } -func (m *metricds) DeleteLog(ctx context.Context, callID string) error { +func (m *metricds) DeleteLog(ctx context.Context, appName, callID string) error { span, ctx := opentracing.StartSpanFromContext(ctx, "ds_delete_log") defer span.Finish() - return m.ds.DeleteLog(ctx, callID) + return m.ds.DeleteLog(ctx, appName, callID) } // instant & no context ;) diff --git a/api/datastore/internal/datastoreutil/validator.go b/api/datastore/internal/datastoreutil/validator.go index 897b6f212..c08728820 100644 --- a/api/datastore/internal/datastoreutil/validator.go +++ b/api/datastore/internal/datastoreutil/validator.go @@ -138,8 +138,8 @@ func (v *validator) GetCall(ctx context.Context, appName, callID string) (*model return v.Datastore.GetCall(ctx, appName, callID) } -func (v *validator) DeleteLog(ctx context.Context, callID string) error { - return v.Datastore.DeleteLog(ctx, callID) +func (v *validator) DeleteLog(ctx context.Context, appName, callID string) error { + return v.Datastore.DeleteLog(ctx, appName, callID) } // GetDatabase returns the underlying sqlx database implementation diff --git a/api/datastore/mock.go b/api/datastore/mock.go index ef5403832..2aa6f9b33 100644 --- a/api/datastore/mock.go +++ b/api/datastore/mock.go @@ -60,6 +60,8 @@ func (m *mock) UpdateApp(ctx context.Context, app *models.App) (*models.App, err } func (m *mock) RemoveApp(ctx context.Context, appName string) error { + m.batchDeleteCalls(ctx, appName) + m.batchDeleteRoutes(ctx, appName) for i, a := range m.Apps { if a.Name == appName { m.Apps = append(m.Apps[:i], m.Apps[i+1:]...) @@ -157,6 +159,28 @@ func (m *mock) GetCalls(ctx context.Context, filter *models.CallFilter) ([]*mode return m.Calls, nil } +func (m *mock) batchDeleteCalls(ctx context.Context, appName string) error { + newCalls := []*models.Call{} + for _, c := range m.Calls { + if c.AppName != appName { + newCalls = append(newCalls, c) + } + } + m.Calls = newCalls + return nil +} + +func (m *mock) batchDeleteRoutes(ctx context.Context, appName string) error { + newRoutes := []*models.Route{} + for _, c := range m.Routes { + if c.AppName != appName { + newRoutes = append(newRoutes, c) + } + } + m.Routes = newRoutes + return nil +} + // GetDatabase returns nil here since shouldn't really be used func (m *mock) GetDatabase() *sqlx.DB { return nil diff --git a/api/datastore/sql/sql.go b/api/datastore/sql/sql.go index 87d3ad13a..e427bb842 100644 --- a/api/datastore/sql/sql.go +++ b/api/datastore/sql/sql.go @@ -61,6 +61,7 @@ var tables = [...]string{`CREATE TABLE IF NOT EXISTS routes ( `CREATE TABLE IF NOT EXISTS logs ( id varchar(256) NOT NULL PRIMARY KEY, + app_name varchar(256) NOT NULL, log text NOT NULL );`, } @@ -220,9 +221,18 @@ func (ds *sqlStore) UpdateApp(ctx context.Context, newapp *models.App) (*models. } func (ds *sqlStore) RemoveApp(ctx context.Context, appName string) error { - query := ds.db.Rebind(`DELETE FROM apps WHERE name = ?`) - _, err := ds.db.ExecContext(ctx, query, appName) - return err + res, err := ds.db.ExecContext(ctx, ds.db.Rebind( + `DELETE FROM apps WHERE name = ?; + DELETE FROM logs WHERE app_name=?; + DELETE FROM calls WHERE app_name=?; + DELETE FROM routes WHERE app_name=?;`), appName, appName, appName, appName) + if err != nil { + return err + } + if _, err := res.RowsAffected(); err != nil { + return models.ErrAppsNotFound + } + return nil } func (ds *sqlStore) GetApp(ctx context.Context, name string) (*models.App, error) { @@ -589,15 +599,15 @@ func (ds *sqlStore) GetCalls(ctx context.Context, filter *models.CallFilter) ([] return res, nil } -func (ds *sqlStore) InsertLog(ctx context.Context, callID, callLog string) error { - query := ds.db.Rebind(`INSERT INTO logs (id, log) VALUES (?, ?);`) - _, err := ds.db.ExecContext(ctx, query, callID, callLog) +func (ds *sqlStore) InsertLog(ctx context.Context, appName, callID, callLog string) error { + query := ds.db.Rebind(`INSERT INTO logs (id, app_name, log) VALUES (?, ?, ?);`) + _, err := ds.db.ExecContext(ctx, query, callID, appName, callLog) return err } -func (ds *sqlStore) GetLog(ctx context.Context, callID string) (*models.CallLog, error) { - query := ds.db.Rebind(`SELECT log FROM logs WHERE id=?`) - row := ds.db.QueryRowContext(ctx, query, callID) +func (ds *sqlStore) GetLog(ctx context.Context, appName, callID string) (*models.CallLog, error) { + query := ds.db.Rebind(`SELECT log FROM logs WHERE id=? AND app_name=?`) + row := ds.db.QueryRowContext(ctx, query, callID, appName) var log string err := row.Scan(&log) @@ -609,14 +619,15 @@ func (ds *sqlStore) GetLog(ctx context.Context, callID string) (*models.CallLog, } return &models.CallLog{ - CallID: callID, - Log: log, + CallID: callID, + Log: log, + AppName: appName, }, nil } -func (ds *sqlStore) DeleteLog(ctx context.Context, callID string) error { - query := ds.db.Rebind(`DELETE FROM logs WHERE id=?`) - _, err := ds.db.ExecContext(ctx, query, callID) +func (ds *sqlStore) DeleteLog(ctx context.Context, appName, callID string) error { + query := ds.db.Rebind(`DELETE FROM logs WHERE id=? AND app_name=?`) + _, err := ds.db.ExecContext(ctx, query, callID, appName) return err } diff --git a/api/logs/mock.go b/api/logs/mock.go index 894d7ad7b..0a1f298c4 100644 --- a/api/logs/mock.go +++ b/api/logs/mock.go @@ -27,12 +27,12 @@ func (m *mock) SetDatastore(ctx context.Context, ds models.Datastore) { m.ds = ds } -func (m *mock) InsertLog(ctx context.Context, callID string, callLog string) error { +func (m *mock) InsertLog(ctx context.Context, appName, callID, callLog string) error { m.Logs[callID] = &models.CallLog{CallID: callID, Log: callLog} return nil } -func (m *mock) GetLog(ctx context.Context, callID string) (*models.CallLog, error) { +func (m *mock) GetLog(ctx context.Context, appName, callID string) (*models.CallLog, error) { logEntry := m.Logs[callID] if logEntry == nil { return nil, errors.New("Call log not found") @@ -41,7 +41,7 @@ func (m *mock) GetLog(ctx context.Context, callID string) (*models.CallLog, erro return m.Logs[callID], nil } -func (m *mock) DeleteLog(ctx context.Context, callID string) error { +func (m *mock) DeleteLog(ctx context.Context, appName, callID string) error { delete(m.Logs, callID) return nil } diff --git a/api/logs/testing/test.go b/api/logs/testing/test.go index 8055c84ac..482b7affa 100644 --- a/api/logs/testing/test.go +++ b/api/logs/testing/test.go @@ -44,7 +44,7 @@ func Test(t *testing.T, fnl models.LogStore, ds models.Datastore) { if err != nil { t.Fatalf("Test InsertCall(ctx, &call): unexpected error `%v`", err) } - err = fnl.InsertLog(ctx, call.ID, "test") + err = fnl.InsertLog(ctx, call.AppName, call.ID, "test") if err != nil { t.Fatalf("Test InsertLog(ctx, call.ID, logText): unexpected error during inserting log `%v`", err) } @@ -56,11 +56,11 @@ func Test(t *testing.T, fnl models.LogStore, ds models.Datastore) { if err != nil { t.Fatalf("Test InsertCall(ctx, &call): unexpected error `%v`", err) } - err = fnl.InsertLog(ctx, call.ID, logText) + err = fnl.InsertLog(ctx, call.AppName, call.ID, logText) if err != nil { t.Fatalf("Test InsertLog(ctx, call.ID, logText): unexpected error during inserting log `%v`", err) } - logEntry, err := fnl.GetLog(ctx, call.ID) + logEntry, err := fnl.GetLog(ctx, call.AppName, call.ID) if !strings.Contains(logEntry.Log, logText) { t.Fatalf("Test GetLog(ctx, call.ID, logText): unexpected error, log mismatch. "+ "Expected: `%v`. Got `%v`.", logText, logEntry.Log) @@ -73,16 +73,16 @@ func Test(t *testing.T, fnl models.LogStore, ds models.Datastore) { if err != nil { t.Fatalf("Test InsertCall(ctx, &call): unexpected error `%v`", err) } - err = fnl.InsertLog(ctx, call.ID, logText) + err = fnl.InsertLog(ctx, call.AppName, call.ID, logText) if err != nil { t.Fatalf("Test InsertLog(ctx, call.ID, logText): unexpected error during inserting log `%v`", err) } - logEntry, err := fnl.GetLog(ctx, call.ID) + logEntry, err := fnl.GetLog(ctx, call.AppName, call.ID) if !strings.Contains(logEntry.Log, logText) { t.Fatalf("Test GetLog(ctx, call.ID, logText): unexpected error, log mismatch. "+ "Expected: `%v`. Got `%v`.", logText, logEntry.Log) } - err = fnl.DeleteLog(ctx, call.ID) + err = fnl.DeleteLog(ctx, call.AppName, call.ID) if err != nil { t.Fatalf("Test DeleteLog(ctx, call.ID): unexpected error during deleting log `%v`", err) } diff --git a/api/models/call.go b/api/models/call.go index eef0bd3be..8a33cb3d6 100644 --- a/api/models/call.go +++ b/api/models/call.go @@ -23,8 +23,9 @@ const ( var possibleStatuses = [...]string{"delayed", "queued", "running", "success", "error", "cancelled"} type CallLog struct { - CallID string `json:"call_id"` - Log string `json:"log"` + CallID string `json:"call_id"` + Log string `json:"log"` + AppName string `json:"app_name"` } // Call is a representation of a specific invocation of a route. diff --git a/api/models/datastore.go b/api/models/datastore.go index b4e1ed798..b77ba6b48 100644 --- a/api/models/datastore.go +++ b/api/models/datastore.go @@ -28,7 +28,6 @@ type Datastore interface { // RemoveApp removes the App named appName. Returns ErrDatastoreEmptyAppName if appName is empty. // Returns ErrAppsNotFound if an App is not found. - // TODO remove routes automatically? #528 RemoveApp(ctx context.Context, appName string) error // GetRoute looks up a matching Route for appName and the literal request route routePath. diff --git a/api/models/logs.go b/api/models/logs.go index fe0fb5634..a4cc7da88 100644 --- a/api/models/logs.go +++ b/api/models/logs.go @@ -11,13 +11,13 @@ type LogStore interface { // InsertLog will insert the log at callID, overwriting if it previously // existed. - InsertLog(ctx context.Context, callID string, callLog string) error + InsertLog(ctx context.Context, appName, callID string, callLog string) error // GetLog will return the log at callID, an error will be returned if the log // cannot be found. - GetLog(ctx context.Context, callID string) (*CallLog, error) + GetLog(ctx context.Context, appName, callID string) (*CallLog, error) // DeleteLog will remove the log at callID, it will not return an error if // the log does not exist before removal. - DeleteLog(ctx context.Context, callID string) error + DeleteLog(ctx context.Context, appName, callID string) error } diff --git a/api/server/apps_delete.go b/api/server/apps_delete.go index 708a4dc65..56c963caa 100644 --- a/api/server/apps_delete.go +++ b/api/server/apps_delete.go @@ -15,30 +15,7 @@ func (s *Server) handleAppDelete(c *gin.Context) { app := &models.App{Name: c.MustGet(api.AppName).(string)} - routes, err := s.Datastore.GetRoutesByApp(ctx, app.Name, &models.RouteFilter{}) - if err != nil { - log.WithError(err).Error("error getting route in app delete") - handleErrorResponse(c, err) - return - } - //TODO allow this? #528 - if len(routes) > 0 { - handleErrorResponse(c, models.ErrDeleteAppsWithRoutes) - return - } - - err = s.FireBeforeAppDelete(ctx, app) - if err != nil { - log.WithError(err).Error("error firing before app delete") - handleErrorResponse(c, err) - return - } - - app, err = s.Datastore.GetApp(ctx, app.Name) - if err != nil { - handleErrorResponse(c, err) - return - } + err := s.FireBeforeAppDelete(ctx, app) err = s.Datastore.RemoveApp(ctx, app.Name) if err != nil { diff --git a/api/server/call_logs.go b/api/server/call_logs.go index 8ee04ba7a..0f9ef83ae 100644 --- a/api/server/call_logs.go +++ b/api/server/call_logs.go @@ -18,7 +18,7 @@ func (s *Server) handleCallLogGet(c *gin.Context) { return } - callObj, err := s.LogDB.GetLog(ctx, callID) + callObj, err := s.LogDB.GetLog(ctx, appName, callID) if err != nil { handleErrorResponse(c, err) return @@ -37,7 +37,7 @@ func (s *Server) handleCallLogDelete(c *gin.Context) { handleErrorResponse(c, err) return } - err = s.LogDB.DeleteLog(ctx, callID) + err = s.LogDB.DeleteLog(ctx, appName, callID) if err != nil { handleErrorResponse(c, err) return diff --git a/api/server/server_test.go b/api/server/server_test.go index 9d4687703..ae3043597 100644 --- a/api/server/server_test.go +++ b/api/server/server_test.go @@ -121,7 +121,6 @@ func TestFullStack(t *testing.T) { {"execute myroute2", "POST", "/r/myapp/myroute2", `{ "name": "Teste" }`, http.StatusInternalServerError, 2}, {"get myroute2", "GET", "/v1/apps/myapp/routes/myroute2", ``, http.StatusOK, 2}, {"delete myroute", "DELETE", "/v1/apps/myapp/routes/myroute", ``, http.StatusOK, 1}, - {"delete app (fail)", "DELETE", "/v1/apps/myapp", ``, http.StatusConflict, 1}, {"delete myroute2", "DELETE", "/v1/apps/myapp/routes/myroute2", ``, http.StatusOK, 0}, {"delete app (success)", "DELETE", "/v1/apps/myapp", ``, http.StatusOK, 0}, {"get deleted app", "GET", "/v1/apps/myapp", ``, http.StatusNotFound, 0}, diff --git a/test/fn-api-tests/calls_test.go b/test/fn-api-tests/calls_test.go index 339c075d7..f0e57ffef 100644 --- a/test/fn-api-tests/calls_test.go +++ b/test/fn-api-tests/calls_test.go @@ -62,7 +62,6 @@ func TestCalls(t *testing.T) { t.Error("Must fail because `dummy` call does not exist.") } - DeleteRoute(t, s.Context, s.Client, s.AppName, s.RoutePath) DeleteApp(t, s.Context, s.Client, s.AppName) }) @@ -97,7 +96,6 @@ func TestCalls(t *testing.T) { t.Errorf("Unexpected error occurred: %v.", msg) } } - DeleteRoute(t, s.Context, s.Client, s.AppName, s.RoutePath) DeleteApp(t, s.Context, s.Client, s.AppName) }) @@ -135,7 +133,6 @@ func TestCalls(t *testing.T) { t.Errorf("Call path mismatch.\n\tExpected: %v\n\tActual: %v", c.Path, s.RoutePath) } } - DeleteRoute(t, s.Context, s.Client, s.AppName, s.RoutePath) DeleteApp(t, s.Context, s.Client, s.AppName) }) diff --git a/test/fn-api-tests/exec_test.go b/test/fn-api-tests/exec_test.go index bc2c2912a..dfa1f5d4b 100644 --- a/test/fn-api-tests/exec_test.go +++ b/test/fn-api-tests/exec_test.go @@ -75,7 +75,6 @@ func TestRouteExecutions(t *testing.T) { if !strings.Contains(expectedOutput, output.String()) { t.Errorf("Assertion error.\n\tExpected: %v\n\tActual: %v", expectedOutput, output.String()) } - DeleteRoute(t, s.Context, s.Client, s.AppName, s.RoutePath) DeleteApp(t, s.Context, s.Client, s.AppName) }) @@ -105,7 +104,6 @@ func TestRouteExecutions(t *testing.T) { if !strings.Contains(expectedOutput, output.String()) { t.Errorf("Assertion error.\n\tExpected: %v\n\tActual: %v", expectedOutput, output.String()) } - DeleteRoute(t, s.Context, s.Client, s.AppName, s.RoutePath) DeleteApp(t, s.Context, s.Client, s.AppName) }) @@ -132,7 +130,6 @@ func TestRouteExecutions(t *testing.T) { CheckRouteResponseError(t, err) CallAsync(t, u, &bytes.Buffer{}) - DeleteRoute(t, s.Context, s.Client, s.AppName, s.RoutePath) DeleteApp(t, s.Context, s.Client, s.AppName) }) @@ -188,7 +185,6 @@ func TestRouteExecutions(t *testing.T) { t.Errorf("Call object status mismatch.\n\tExpected: %v\n\tActual:%v", "success", callObject.Status) } - DeleteRoute(t, s.Context, s.Client, s.AppName, s.RoutePath) DeleteApp(t, s.Context, s.Client, s.AppName) }) @@ -237,7 +233,6 @@ func TestRouteExecutions(t *testing.T) { "output", "callObj.Payload.Call.Status") } - DeleteRoute(t, s.Context, s.Client, s.AppName, routePath) DeleteApp(t, s.Context, s.Client, s.AppName) }) @@ -283,7 +278,6 @@ func TestRouteExecutions(t *testing.T) { "string, but got: %v", logObj.Payload.Log.Log) } - DeleteRoute(t, s.Context, s.Client, s.AppName, routePath) DeleteApp(t, s.Context, s.Client, s.AppName) }) @@ -356,7 +350,6 @@ func TestRouteExecutions(t *testing.T) { t.Errorf("Unexpected error: %s", err) } - DeleteRoute(t, s.Context, s.Client, s.AppName, routePath) DeleteApp(t, s.Context, s.Client, s.AppName) }) @@ -401,7 +394,6 @@ func TestRouteExecutions(t *testing.T) { t.Errorf("Log entry suppose to be truncated up to expected size %v, got %v", size/1024, len(logObj.Payload.Log.Log)) } - DeleteRoute(t, s.Context, s.Client, s.AppName, routePath) DeleteApp(t, s.Context, s.Client, s.AppName) }) diff --git a/test/fn-api-tests/routes_test.go b/test/fn-api-tests/routes_test.go index 0e72ff150..ad82f376f 100644 --- a/test/fn-api-tests/routes_test.go +++ b/test/fn-api-tests/routes_test.go @@ -29,7 +29,6 @@ func TestRoutes(t *testing.T) { CreateApp(t, s.Context, s.Client, s.AppName, map[string]string{}) CreateRoute(t, s.Context, s.Client, s.AppName, s.RoutePath, s.Image, s.RouteType, s.Format, s.RouteConfig, s.RouteHeaders) - DeleteRoute(t, s.Context, s.Client, s.AppName, s.RoutePath) DeleteApp(t, s.Context, s.Client, s.AppName) }) @@ -42,7 +41,6 @@ func TestRoutes(t *testing.T) { if !assertContainsRoute(ListRoutes(t, s.Context, s.Client, s.AppName), s.RoutePath) { t.Errorf("Unable to find corresponding route `%v` in list", s.RoutePath) } - DeleteRoute(t, s.Context, s.Client, s.AppName, s.RoutePath) DeleteApp(t, s.Context, s.Client, s.AppName) }) @@ -58,7 +56,6 @@ func TestRoutes(t *testing.T) { t.Errorf("Unable to find corresponding route `%v` in list", s.RoutePath) } - DeleteRoute(t, s.Context, s.Client, s.AppName, s.RoutePath) DeleteApp(t, s.Context, s.Client, s.AppName) }) @@ -78,7 +75,6 @@ func TestRoutes(t *testing.T) { CheckRouteResponseError(t, err) assertRouteFields(t, routeResp.Payload.Route, s.RoutePath, s.Image, newRouteType, s.Format) - DeleteRoute(t, s.Context, s.Client, s.AppName, s.RoutePath) DeleteApp(t, s.Context, s.Client, s.AppName) }) @@ -102,7 +98,6 @@ func TestRoutes(t *testing.T) { CheckRouteResponseError(t, err) assertRouteFields(t, routeResp.Payload.Route, s.RoutePath, s.Image, s.RouteType, s.Format) - DeleteRoute(t, s.Context, s.Client, s.AppName, s.RoutePath) DeleteApp(t, s.Context, s.Client, s.AppName) }) @@ -122,7 +117,6 @@ func TestRoutes(t *testing.T) { t.Errorf("Route path suppose to be immutable, but it's not.") } - DeleteRoute(t, s.Context, s.Client, s.AppName, s.RoutePath) DeleteApp(t, s.Context, s.Client, s.AppName) }) @@ -138,7 +132,6 @@ func TestRoutes(t *testing.T) { t.Errorf("Route duplicate error should appear, but it didn't") } - DeleteRoute(t, s.Context, s.Client, s.AppName, s.RoutePath) DeleteApp(t, s.Context, s.Client, s.AppName) }) @@ -171,7 +164,6 @@ func TestRoutes(t *testing.T) { DeployRoute(t, s.Context, s.Client, s.AppName, s.RoutePath, s.Image, s.RouteType, s.Format, s.RouteConfig, s.RouteHeaders) GetApp(t, s.Context, s.Client, s.AppName) GetRoute(t, s.Context, s.Client, s.AppName, s.RoutePath) - DeleteRoute(t, s.Context, s.Client, s.AppName, s.RoutePath) DeleteApp(t, s.Context, s.Client, s.AppName) }) @@ -181,7 +173,6 @@ func TestRoutes(t *testing.T) { DeployRoute(t, s.Context, s.Client, s.AppName, s.RoutePath, s.Image, s.RouteType, s.Format, s.RouteConfig, s.RouteHeaders) GetApp(t, s.Context, s.Client, s.AppName) GetRoute(t, s.Context, s.Client, s.AppName, s.RoutePath) - DeleteRoute(t, s.Context, s.Client, s.AppName, s.RoutePath) DeleteApp(t, s.Context, s.Client, s.AppName) }) @@ -199,8 +190,6 @@ func TestRoutes(t *testing.T) { s.Format, s.RouteConfig, s.RouteHeaders) assertRouteFields(t, updatedRoute, s.RoutePath, s.Image, newRouteType, s.Format) - DeleteRoute(t, s.Context, s.Client, s.AppName, s.RoutePath) DeleteApp(t, s.Context, s.Client, s.AppName) }) - }