Fix irc handler tests

This commit is contained in:
Ken-Håvard Lieng 2018-06-01 03:37:22 +02:00
parent 24f9553aa5
commit 09248edd59
1 changed files with 7 additions and 0 deletions

View File

@ -10,6 +10,7 @@ import (
"github.com/khlieng/dispatch/pkg/irc"
"github.com/khlieng/dispatch/storage"
"github.com/khlieng/dispatch/storage/bleve"
"github.com/khlieng/dispatch/storage/boltdb"
)
@ -34,6 +35,12 @@ func TestMain(m *testing.M) {
}
user.SetMessageStore(db)
search, err := bleve.New(storage.Path.Index(user.Username))
if err != nil {
log.Fatal(err)
}
user.SetMessageSearchProvider(search)
channelStore = storage.NewChannelStore()
code := m.Run()