mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-17 15:46:44 +00:00
test: fix most integration tests (live)
This commit is contained in:
@ -24,6 +24,7 @@ import (
|
||||
"github.com/ProtonMail/proton-bridge/internal/bridge"
|
||||
"github.com/ProtonMail/proton-bridge/internal/preferences"
|
||||
"github.com/ProtonMail/proton-bridge/pkg/listener"
|
||||
"github.com/ProtonMail/proton-bridge/pkg/pmapi"
|
||||
)
|
||||
|
||||
// GetBridge returns bridge instance.
|
||||
@ -59,7 +60,7 @@ func newBridgeInstance(
|
||||
cfg *fakeConfig,
|
||||
credStore bridge.CredentialsStorer,
|
||||
eventListener listener.Listener,
|
||||
clientManager bridge.ClientManager,
|
||||
clientManager *pmapi.ClientManager,
|
||||
) *bridge.Bridge {
|
||||
version := os.Getenv("VERSION")
|
||||
bridge.UpdateCurrentUserAgent(version, runtime.GOOS, "", "")
|
||||
|
||||
@ -35,17 +35,20 @@ type server interface {
|
||||
// TestContext manages a bridge test (mocked API, bridge instance, IMAP/SMTP servers, setup steps).
|
||||
type TestContext struct {
|
||||
// Base setup for the whole bridge (core & imap & smtp).
|
||||
t *bddT
|
||||
cfg *fakeConfig
|
||||
listener listener.Listener
|
||||
pmapiController PMAPIController // pmapiController is used to create pmapi clients (either real or fake) and control server state.
|
||||
testAccounts *accounts.TestAccounts
|
||||
t *bddT
|
||||
cfg *fakeConfig
|
||||
listener listener.Listener
|
||||
testAccounts *accounts.TestAccounts
|
||||
|
||||
// pmapiController is used to control real or fake pmapi clients.
|
||||
// The clients are created by the clientManager.
|
||||
pmapiController PMAPIController
|
||||
clientManager *pmapi.ClientManager
|
||||
|
||||
// Bridge core related variables.
|
||||
bridge *bridge.Bridge
|
||||
bridgeLastError error
|
||||
credStore bridge.CredentialsStorer
|
||||
clientManager *pmapi.ClientManager
|
||||
|
||||
// IMAP related variables.
|
||||
imapAddr string
|
||||
|
||||
Reference in New Issue
Block a user