mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
Fix unit tests due to missing mock MQ
This commit is contained in:
@@ -8,10 +8,12 @@ import (
|
||||
|
||||
"github.com/iron-io/functions/api/datastore"
|
||||
"github.com/iron-io/functions/api/models"
|
||||
"github.com/iron-io/functions/api/mqs"
|
||||
)
|
||||
|
||||
func TestAppCreate(t *testing.T) {
|
||||
New(&datastore.Mock{}, testRunner(t))
|
||||
|
||||
New(&datastore.Mock{}, &mqs.Mock{}, testRunner(t))
|
||||
router := testRouter()
|
||||
|
||||
for i, test := range []struct {
|
||||
@@ -52,7 +54,7 @@ func TestAppCreate(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestAppDelete(t *testing.T) {
|
||||
New(&datastore.Mock{}, testRunner(t))
|
||||
New(&datastore.Mock{}, &mqs.Mock{}, testRunner(t))
|
||||
router := testRouter()
|
||||
|
||||
for i, test := range []struct {
|
||||
@@ -83,7 +85,7 @@ func TestAppDelete(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestAppList(t *testing.T) {
|
||||
New(&datastore.Mock{}, testRunner(t))
|
||||
New(&datastore.Mock{}, &mqs.Mock{}, testRunner(t))
|
||||
router := testRouter()
|
||||
|
||||
for i, test := range []struct {
|
||||
@@ -113,7 +115,7 @@ func TestAppList(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestAppGet(t *testing.T) {
|
||||
New(&datastore.Mock{}, testRunner(t))
|
||||
New(&datastore.Mock{}, &mqs.Mock{}, testRunner(t))
|
||||
router := testRouter()
|
||||
|
||||
for i, test := range []struct {
|
||||
@@ -143,7 +145,7 @@ func TestAppGet(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestAppUpdate(t *testing.T) {
|
||||
New(&datastore.Mock{}, testRunner(t))
|
||||
New(&datastore.Mock{}, &mqs.Mock{}, testRunner(t))
|
||||
router := testRouter()
|
||||
|
||||
for i, test := range []struct {
|
||||
|
||||
Reference in New Issue
Block a user