mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-11 05:06:51 +00:00
Other: Add FEATURE_TEST_LOG_IMAP env variable
When set will log IMAP commands during feature tests. This patch also updates Gluon to the latest version.
This commit is contained in:
committed by
James Houlahan
parent
f1160a11af
commit
29dcd5450f
@ -22,8 +22,11 @@ import (
|
||||
"crypto/tls"
|
||||
"fmt"
|
||||
"net/http/cookiejar"
|
||||
"os"
|
||||
"time"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
|
||||
"github.com/ProtonMail/proton-bridge/v2/internal/bridge"
|
||||
"github.com/ProtonMail/proton-bridge/v2/internal/cookies"
|
||||
"github.com/ProtonMail/proton-bridge/v2/internal/events"
|
||||
@ -68,6 +71,13 @@ func (t *testCtx) startBridge() error {
|
||||
return err
|
||||
}
|
||||
|
||||
var logIMAP bool
|
||||
|
||||
if len(os.Getenv("FEATURE_TEST_LOG_IMAP")) != 0 {
|
||||
logrus.SetLevel(logrus.TraceLevel)
|
||||
logIMAP = true
|
||||
}
|
||||
|
||||
// Create the bridge.
|
||||
bridge, eventCh, err := bridge.New(
|
||||
// App stuff
|
||||
@ -86,8 +96,8 @@ func (t *testCtx) startBridge() error {
|
||||
t.mocks.ProxyCtl,
|
||||
|
||||
// Logging stuff
|
||||
false,
|
||||
false,
|
||||
logIMAP,
|
||||
logIMAP,
|
||||
false,
|
||||
)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user