tests-refactor #137
@ -13,6 +13,8 @@ import (
|
|||||||
"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/handlers/server"
|
||||||
"git.grassecon.net/urdt/ussd/internal/storage"
|
"git.grassecon.net/urdt/ussd/internal/storage"
|
||||||
|
"git.grassecon.net/urdt/ussd/internal/testutil/testservice"
|
||||||
|
"git.grassecon.net/urdt/ussd/internal/testutil/testtag"
|
||||||
testdataloader "github.com/peteole/testdata-loader"
|
testdataloader "github.com/peteole/testdata-loader"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -79,12 +81,12 @@ func TestEngine(sessionId string) (engine.Engine, func(), chan bool) {
|
|||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
if AccountService == nil {
|
if testtag.AccountService == nil {
|
||||||
AccountService = &server.AccountService{}
|
testtag.AccountService = &server.AccountService{}
|
||||||
}
|
}
|
||||||
|
|
||||||
switch AccountService.(type) {
|
switch testtag.AccountService.(type) {
|
||||||
case *server.TestAccountService:
|
case *testservice.TestAccountService:
|
||||||
go func() {
|
go func() {
|
||||||
eventChannel <- false
|
eventChannel <- false
|
||||||
}()
|
}()
|
||||||
@ -97,7 +99,7 @@ func TestEngine(sessionId string) (engine.Engine, func(), chan bool) {
|
|||||||
panic("Unknown account service type")
|
panic("Unknown account service type")
|
||||||
}
|
}
|
||||||
|
|
||||||
hl, err := lhs.GetHandler(AccountService)
|
hl, err := lhs.GetHandler(testtag.AccountService)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Fprintf(os.Stderr, err.Error())
|
fmt.Fprintf(os.Stderr, err.Error())
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
|
Loading…
Reference in New Issue
Block a user