mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-10 04:36:43 +00:00
GODT-1645: fix rebase changes
This commit is contained in:
committed by
Romain Le Jeune
parent
075da27d13
commit
af5ce101ef
@ -54,7 +54,7 @@ func (ctx *TestContext) LoginUser(username string, password, mailboxPassword []b
|
||||
}
|
||||
}
|
||||
|
||||
user, err := ctx.users.FinishLogin(client, auth, mailboxPassword)
|
||||
userID, err := ctx.users.FinishLogin(client, auth, mailboxPassword)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "failed to finish login")
|
||||
}
|
||||
@ -65,7 +65,7 @@ func (ctx *TestContext) LoginUser(username string, password, mailboxPassword []b
|
||||
logrus.Warn("Pausing user.Logout by 2 minutes to not hit issues with too many login attempts.")
|
||||
time.Sleep(2 * time.Minute)
|
||||
}
|
||||
return user.Logout()
|
||||
return ctx.bridge.LogoutUser(userID)
|
||||
}, "Logging out user",
|
||||
)
|
||||
|
||||
@ -83,12 +83,14 @@ func (ctx *TestContext) FinishLogin(client pmapi.Client, mailboxPassword []byte)
|
||||
return errors.New("cannot get current auth tokens from client")
|
||||
}
|
||||
|
||||
user, err := ctx.users.FinishLogin(client, c.GetCurrentAuth(), mailboxPassword)
|
||||
userID, err := ctx.users.FinishLogin(client, c.GetCurrentAuth(), mailboxPassword)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "failed to finish login")
|
||||
}
|
||||
|
||||
ctx.addCleanupChecked(user.Logout, "Logging out user")
|
||||
ctx.addCleanupChecked(func() error {
|
||||
return ctx.bridge.LogoutUser(userID)
|
||||
}, "Logging out user")
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user