test(identity): add isolated browser mail fixture
This commit is contained in:
1 parent
86f562f5b6
commit
24638d46d2
20 files changed
+885
-20
No files matched your search
@@ -0,0 +1,20 @@
|
||||
//go:build e2e
|
||||
|
||||
package resend
|
||||
|
||||
import "time"
|
||||
|
||||
const e2eEndpoint = "http://mail-fixture:8025/emails"
|
||||
|
||||
// NewE2ESender is compiled only into the isolated registration E2E image. Its
|
||||
// endpoint is fixed to the Compose fixture and cannot be selected at runtime.
|
||||
func NewE2ESender(apiKey, from string, timeout time.Duration) (*Sender, error) {
|
||||
sender, err := newSender(apiKey, from, timeout, e2eEndpoint, time.Now)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
// The local fixture must stay internal even when the host has proxy
|
||||
// variables configured for ordinary provider traffic.
|
||||
sender.client = newHTTPClientWithProxy(timeout, nil)
|
||||
return sender, nil
|
||||
}
|
||||
Reference in new issue
Block a user