From 43b8e94b2bc9ee3d410532a1b3b3879c3188a5d4 Mon Sep 17 00:00:00 2001 From: Samuel Hawksby-Robinson Date: Thu, 26 Nov 2020 17:10:03 +0000 Subject: [PATCH] Resolved an additional fail test related to multiaccounts in the Messenger --- protocol/messenger_test.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/protocol/messenger_test.go b/protocol/messenger_test.go index ca052dcc6..91f24d61b 100644 --- a/protocol/messenger_test.go +++ b/protocol/messenger_test.go @@ -6,6 +6,7 @@ import ( "encoding/hex" "encoding/json" "errors" + "io/ioutil" "math/big" "strconv" "strings" @@ -22,6 +23,7 @@ import ( "github.com/status-im/status-go/eth-node/crypto" "github.com/status-im/status-go/eth-node/types" enstypes "github.com/status-im/status-go/eth-node/types/ens" + "github.com/status-im/status-go/multiaccounts" "github.com/status-im/status-go/protocol/common" "github.com/status-im/status-go/protocol/protobuf" "github.com/status-im/status-go/protocol/tt" @@ -108,10 +110,16 @@ func (s *MessengerSuite) SetupTest() { } func (s *MessengerSuite) newMessengerWithKey(shh types.Waku, privateKey *ecdsa.PrivateKey) *Messenger { + tmpfile, err := ioutil.TempFile("", "accounts-tests-") + s.Require().NoError(err) + madb, err := multiaccounts.InitializeDB(tmpfile.Name()) + s.Require().NoError(err) + options := []Option{ WithCustomLogger(s.logger), WithMessagesPersistenceEnabled(), WithDatabaseConfig(":memory:", "some-key"), + WithMultiAccounts(madb), } if s.enableDataSync { options = append(options, WithDatasync())