mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
All of the changes for func logs
This commit is contained in:
@@ -8,8 +8,10 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"gitlab-odx.oracle.com/odx/functions/api/datastore"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/models"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/runner/task"
|
||||
"gitlab-odx.oracle.com/odx/functions/api/logs"
|
||||
)
|
||||
|
||||
func TestRunnerHello(t *testing.T) {
|
||||
@@ -17,11 +19,14 @@ func TestRunnerHello(t *testing.T) {
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
defer cancel()
|
||||
|
||||
runner, err := New(ctx, NewFuncLogger(), NewMetricLogger())
|
||||
ds := datastore.NewMock()
|
||||
fnl := logs.NewMock()
|
||||
runner, err := New(ctx, NewFuncLogger(fnl), NewMetricLogger(), ds)
|
||||
if err != nil {
|
||||
t.Fatalf("Test error during New() - %s", err)
|
||||
}
|
||||
|
||||
|
||||
for i, test := range []struct {
|
||||
route *models.Route
|
||||
payload string
|
||||
@@ -71,7 +76,9 @@ func TestRunnerError(t *testing.T) {
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
defer cancel()
|
||||
|
||||
runner, err := New(ctx, NewFuncLogger(), NewMetricLogger())
|
||||
ds := datastore.NewMock()
|
||||
fnl := logs.NewMock()
|
||||
runner, err := New(ctx, NewFuncLogger(fnl), NewMetricLogger(), ds)
|
||||
if err != nil {
|
||||
t.Fatalf("Test error during New() - %s", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user