Fix unit tests due to missing mock MQ

This commit is contained in:
Seif Lotfy
2016-09-30 18:52:38 +02:00
parent c452d845fe
commit f5c4f5f7a9
6 changed files with 43 additions and 15 deletions

View File

@@ -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 {