mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-10 04:36:43 +00:00
test: Add require.Eventually to TestBridge_UserAgentFromSMTPClient
This commit is contained in:
@ -25,6 +25,7 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
@ -300,8 +301,11 @@ func TestBridge_UserAgentFromSMTPClient(t *testing.T) {
|
|||||||
string(info.BridgePass)),
|
string(info.BridgePass)),
|
||||||
))
|
))
|
||||||
|
|
||||||
currentUserAgent = b.GetCurrentUserAgent()
|
require.Eventually(t, func() bool {
|
||||||
require.Contains(t, currentUserAgent, "UnknownClient/0.0.1")
|
currentUserAgent = b.GetCurrentUserAgent()
|
||||||
|
|
||||||
|
return strings.Contains(currentUserAgent, "UnknownClient/0.0.1")
|
||||||
|
}, time.Minute, 5*time.Second)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user