mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
Datastore validator (#565)
* add datastore validator; adapt mock and tests * adapt bolt datastore to common validator * adapt postgres datastore to validator * adapt redis datastore to common validator
This commit is contained in:
committed by
Travis Reeder
parent
5803886a06
commit
06171800e2
@@ -40,16 +40,16 @@ func testRouterAsync(ds models.Datastore, mq models.MessageQueue, rnr *runner.Ru
|
||||
|
||||
func TestRouteRunnerAsyncExecution(t *testing.T) {
|
||||
tasks := mockTasksConduit()
|
||||
ds := &datastore.Mock{
|
||||
Apps: []*models.App{
|
||||
ds := datastore.NewMockInit(
|
||||
[]*models.App{
|
||||
{Name: "myapp", Config: map[string]string{"app": "true"}},
|
||||
},
|
||||
Routes: []*models.Route{
|
||||
[]*models.Route{
|
||||
{Type: "async", Path: "/myroute", AppName: "myapp", Image: "iron/hello", Config: map[string]string{"test": "true"}},
|
||||
{Type: "async", Path: "/myerror", AppName: "myapp", Image: "iron/error", Config: map[string]string{"test": "true"}},
|
||||
{Type: "async", Path: "/myroute/:param", AppName: "myapp", Image: "iron/hello", Config: map[string]string{"test": "true"}},
|
||||
},
|
||||
}
|
||||
)
|
||||
mq := &mqs.Mock{}
|
||||
|
||||
for i, test := range []struct {
|
||||
|
||||
Reference in New Issue
Block a user