sync: 同步 v1.0.4 并脱敏配置与镜像
This commit is contained in:
@@ -83,8 +83,8 @@ func TestSMTPSuccessAndRejectedRecipient(t *testing.T) {
|
||||
}
|
||||
})
|
||||
err := SendSMTP(context.Background(), SMTPOptions{
|
||||
Address: address, Host: "localhost", From: "sender@example.com",
|
||||
To: []string{"recipient@example.com"}, Data: []byte("Subject: test\r\n\r\nmessage\r\n"), Timeout: time.Second,
|
||||
Address: address, Host: "localhost", From: "xxx@example.com",
|
||||
To: []string{"xxx@example.com"}, Data: []byte("Subject: test\r\n\r\nmessage\r\n"), Timeout: time.Second,
|
||||
})
|
||||
if (err != nil) != reject {
|
||||
t.Fatalf("unexpected SMTP result: rejected=%t error=%v", reject, err)
|
||||
@@ -120,8 +120,8 @@ func TestSMTPTimeoutInterruptsGreetingTLSAndProtocol(t *testing.T) {
|
||||
})
|
||||
started := time.Now()
|
||||
err := SendSMTP(context.Background(), SMTPOptions{
|
||||
Address: address, Host: "localhost", SSL: scenario == "tls", From: "sender@example.com",
|
||||
To: []string{"recipient@example.com"}, Data: []byte("message"), Timeout: 70 * time.Millisecond,
|
||||
Address: address, Host: "localhost", SSL: scenario == "tls", From: "xxx@example.com",
|
||||
To: []string{"xxx@example.com"}, Data: []byte("message"), Timeout: 70 * time.Millisecond,
|
||||
})
|
||||
if err == nil || time.Since(started) > time.Second {
|
||||
t.Fatalf("SMTP stall was not interrupted: %v", err)
|
||||
|
||||
Reference in New Issue
Block a user