mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-22 18:16:43 +00:00
GODT-1409 Wait in GetEvents during message preparation for live API.
This commit is contained in:
@ -177,3 +177,6 @@ func (ctx *TestContext) SetLastError(err error) {
|
||||
func (ctx *TestContext) GetLastError() error {
|
||||
return ctx.lastError
|
||||
}
|
||||
|
||||
func (ctx *TestContext) MessagePreparationStarted() { ctx.pmapiController.LockEvents() }
|
||||
func (ctx *TestContext) MessagePreparationFinished() { ctx.pmapiController.UnlockEvents() }
|
||||
|
||||
@ -42,6 +42,8 @@ type PMAPIController interface {
|
||||
WasCalled(method, path string, expectedRequest []byte) bool
|
||||
WasCalledRegex(methodRegex, pathRegex string, expectedRequest []byte) (bool, error)
|
||||
GetCalls(method, path string) [][]byte
|
||||
LockEvents()
|
||||
UnlockEvents()
|
||||
}
|
||||
|
||||
func newPMAPIController(app string, listener listener.Listener) (PMAPIController, pmapi.Manager) {
|
||||
|
||||
Reference in New Issue
Block a user