mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
Datastore refactor and added postgres tests (#259)
* fix apps & routes creation/update * refactor datastore and added postgres tests * added test-datastore and fixed circleci test
This commit is contained in:
@@ -27,7 +27,12 @@ func (m *Mock) GetApps(appFilter *models.AppFilter) ([]*models.App, error) {
|
||||
return m.FakeApps, nil
|
||||
}
|
||||
|
||||
func (m *Mock) StoreApp(app *models.App) (*models.App, error) {
|
||||
func (m *Mock) InsertApp(app *models.App) (*models.App, error) {
|
||||
// TODO: improve this mock method
|
||||
return m.FakeApp, nil
|
||||
}
|
||||
|
||||
func (m *Mock) UpdateApp(app *models.App) (*models.App, error) {
|
||||
// TODO: improve this mock method
|
||||
return m.FakeApp, nil
|
||||
}
|
||||
@@ -69,7 +74,12 @@ func (m *Mock) GetRoutesByApp(appName string, routeFilter *models.RouteFilter) (
|
||||
return routes, nil
|
||||
}
|
||||
|
||||
func (m *Mock) StoreRoute(route *models.Route) (*models.Route, error) {
|
||||
func (m *Mock) InsertRoute(route *models.Route) (*models.Route, error) {
|
||||
// TODO: improve this mock method
|
||||
return m.FakeRoute, nil
|
||||
}
|
||||
|
||||
func (m *Mock) UpdateRoute(route *models.Route) (*models.Route, error) {
|
||||
// TODO: improve this mock method
|
||||
return m.FakeRoute, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user