menu-traversals #108

Closed
carlos wants to merge 72 commits from menu-traversals into master
Showing only changes of commit 09bf266644 - Show all commits

View File

@ -6,11 +6,11 @@ import (
"os" "os"
"path" "path"
"git.defalsify.org/vise.git/db"
"git.defalsify.org/vise.git/engine" "git.defalsify.org/vise.git/engine"
"git.defalsify.org/vise.git/logging" "git.defalsify.org/vise.git/logging"
"git.defalsify.org/vise.git/resource" "git.defalsify.org/vise.git/resource"
"git.grassecon.net/urdt/ussd/internal/handlers" "git.grassecon.net/urdt/ussd/internal/handlers"
"git.grassecon.net/urdt/ussd/internal/handlers/server"
"git.grassecon.net/urdt/ussd/internal/storage" "git.grassecon.net/urdt/ussd/internal/storage"
testdataloader "github.com/peteole/testdata-loader" testdataloader "github.com/peteole/testdata-loader"
) )
@ -21,7 +21,7 @@ var (
scriptDir = path.Join(baseDir, "services", "registration") scriptDir = path.Join(baseDir, "services", "registration")
) )
func TestEngine(sessionId string) (engine.Engine, func(), *db.Db) { func TestEngine(sessionId string) (engine.Engine, func()) {
ctx := context.Background() ctx := context.Background()
ctx = context.WithValue(ctx, "SessionId", sessionId) ctx = context.WithValue(ctx, "SessionId", sessionId)
pfp := path.Join(scriptDir, "pp.csv") pfp := path.Join(scriptDir, "pp.csv")
@ -76,7 +76,8 @@ func TestEngine(sessionId string) (engine.Engine, func(), *db.Db) {
os.Exit(1) os.Exit(1)
} }
hl, err := lhs.GetHandler() mockAccountService := server.MockAccountService{}
hl, err := lhs.GetHandler(&mockAccountService)
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, err.Error()) fmt.Fprintf(os.Stderr, err.Error())
os.Exit(1) os.Exit(1)
@ -99,5 +100,5 @@ func TestEngine(sessionId string) (engine.Engine, func(), *db.Db) {
} }
//en = en.WithDebug(nil) //en = en.WithDebug(nil)
return en, cleanFn, lhs.UserdataStore return en, cleanFn
} }