GODT-1609: Fix tests

This commit is contained in:
James Houlahan
2022-10-04 18:15:12 +02:00
parent 6ac68984f2
commit 120ac6c480
4 changed files with 9 additions and 8 deletions

View File

@ -49,7 +49,7 @@ type testCtx struct {
userIDByName map[string]string
userAddrByEmail map[string]map[string]string
userPassByID map[string]string
userBridgePassByID map[string]string
userBridgePassByID map[string][]byte
// These are the IMAP and SMTP clients used to connect to bridge.
imapClients map[string]*imapClient
@ -89,7 +89,7 @@ func newTestCtx(tb testing.TB) *testCtx {
userIDByName: make(map[string]string),
userAddrByEmail: make(map[string]map[string]string),
userPassByID: make(map[string]string),
userBridgePassByID: make(map[string]string),
userBridgePassByID: make(map[string][]byte),
imapClients: make(map[string]*imapClient),
smtpClients: make(map[string]*smtpClient),
@ -148,10 +148,10 @@ func (t *testCtx) setUserPass(userID, pass string) {
}
func (t *testCtx) getUserBridgePass(userID string) string {
return t.userBridgePassByID[userID]
return string(t.userBridgePassByID[userID])
}
func (t *testCtx) setUserBridgePass(userID, pass string) {
func (t *testCtx) setUserBridgePass(userID string, pass []byte) {
t.userBridgePassByID[userID] = pass
}

View File

@ -162,7 +162,7 @@ func (s *scenario) theAddressOfAccountHasMessagesInMailbox(address, username str
}
func (s *scenario) userLogsInWithUsernameAndPassword(username, password string) error {
userID, err := s.t.bridge.LoginUser(context.Background(), username, password, nil, nil)
userID, err := s.t.bridge.LoginUser(context.Background(), username, []byte(password), nil, nil)
if err != nil {
s.t.pushError(err)
} else {