Add multiaccount to push notification tests

This commit is contained in:
Andrea Maria Piana 2020-12-15 17:22:56 +01:00
parent e0eb96a992
commit ac37e4f412
1 changed files with 5 additions and 0 deletions

View File

@ -12,6 +12,7 @@ import (
"github.com/stretchr/testify/suite" "github.com/stretchr/testify/suite"
"go.uber.org/zap" "go.uber.org/zap"
"github.com/status-im/status-go/account/generator"
gethbridge "github.com/status-im/status-go/eth-node/bridge/geth" gethbridge "github.com/status-im/status-go/eth-node/bridge/geth"
"github.com/status-im/status-go/eth-node/crypto" "github.com/status-im/status-go/eth-node/crypto"
"github.com/status-im/status-go/eth-node/types" "github.com/status-im/status-go/eth-node/types"
@ -85,6 +86,9 @@ func (s *MessengerPushNotificationSuite) newMessengerWithKey(shh types.Waku, pri
madb, err := multiaccounts.InitializeDB(tmpfile.Name()) madb, err := multiaccounts.InitializeDB(tmpfile.Name())
s.Require().NoError(err) s.Require().NoError(err)
acc := generator.NewAccount(privateKey, nil)
iai := acc.ToIdentifiedAccountInfo("")
options := []Option{ options := []Option{
WithCustomLogger(s.logger), WithCustomLogger(s.logger),
WithMessagesPersistenceEnabled(), WithMessagesPersistenceEnabled(),
@ -92,6 +96,7 @@ func (s *MessengerPushNotificationSuite) newMessengerWithKey(shh types.Waku, pri
WithDatasync(), WithDatasync(),
WithPushNotifications(), WithPushNotifications(),
WithMultiAccounts(madb), WithMultiAccounts(madb),
WithAccount(iai.ToMultiAccount()),
} }
return s.newMessengerWithOptions(shh, privateKey, options) return s.newMessengerWithOptions(shh, privateKey, options)
} }