watchtower/wtmock/tower_db: move mock tower db to wtmock pkg

This commit is contained in:
Conner Fromknecht
2019-04-26 17:19:58 -07:00
parent a783f35ad4
commit 2ce6228021
5 changed files with 168 additions and 149 deletions

View File

@@ -1,5 +1,3 @@
// +build dev
package wtserver_test
import (
@@ -53,7 +51,7 @@ func initServer(t *testing.T, db wtserver.DB,
t.Helper()
if db == nil {
db = wtdb.NewMockDB()
db = wtmock.NewTowerDB()
}
s, err := wtserver.New(&wtserver.Config{
@@ -687,7 +685,7 @@ func testServerStateUpdates(t *testing.T, test stateUpdateTestCase) {
// checking that the proper error is returned when the session doesn't exist and
// that a successful deletion does not disrupt other sessions.
func TestServerDeleteSession(t *testing.T) {
db := wtdb.NewMockDB()
db := wtmock.NewTowerDB()
localPub := randPubKey(t)