sync: 同步 v1.0.4 并脱敏配置与镜像

This commit is contained in:
MiFaZhan
2026-10-29 14:36:49 +08:00
parent 743e8e6e6e
commit 2206a393f7
516 changed files with 18119 additions and 2253 deletions
+4 -4
View File
@@ -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)