mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
Fixing tests.
This commit is contained in:
@@ -23,12 +23,12 @@ func testRunner(t *testing.T) *runner.Runner {
|
||||
|
||||
func TestRouteRunnerGet(t *testing.T) {
|
||||
buf := setLogBuffer()
|
||||
New(&datastore.Mock{
|
||||
s := New(&datastore.Mock{
|
||||
FakeApps: []*models.App{
|
||||
{Name: "myapp", Config: models.Config{}},
|
||||
},
|
||||
}, &mqs.Mock{}, testRunner(t))
|
||||
router := testRouter()
|
||||
router := testRouter(s)
|
||||
|
||||
for i, test := range []struct {
|
||||
path string
|
||||
@@ -62,12 +62,12 @@ func TestRouteRunnerGet(t *testing.T) {
|
||||
|
||||
func TestRouteRunnerPost(t *testing.T) {
|
||||
buf := setLogBuffer()
|
||||
New(&datastore.Mock{
|
||||
s := New(&datastore.Mock{
|
||||
FakeApps: []*models.App{
|
||||
{Name: "myapp", Config: models.Config{}},
|
||||
},
|
||||
}, &mqs.Mock{}, testRunner(t))
|
||||
router := testRouter()
|
||||
router := testRouter(s)
|
||||
|
||||
for i, test := range []struct {
|
||||
path string
|
||||
@@ -104,7 +104,7 @@ func TestRouteRunnerPost(t *testing.T) {
|
||||
|
||||
func TestRouteRunnerExecution(t *testing.T) {
|
||||
buf := setLogBuffer()
|
||||
New(&datastore.Mock{
|
||||
s := New(&datastore.Mock{
|
||||
FakeApps: []*models.App{
|
||||
{Name: "myapp", Config: models.Config{}},
|
||||
},
|
||||
@@ -113,7 +113,7 @@ func TestRouteRunnerExecution(t *testing.T) {
|
||||
{Path: "/myerror", AppName: "myapp", Image: "iron/error", Headers: map[string][]string{"X-Function": {"Test"}}},
|
||||
},
|
||||
}, &mqs.Mock{}, testRunner(t))
|
||||
router := testRouter()
|
||||
router := testRouter(s)
|
||||
|
||||
for i, test := range []struct {
|
||||
path string
|
||||
|
||||
Reference in New Issue
Block a user