From 2d1306291b63a95725c281118340ce2dabd71c8c Mon Sep 17 00:00:00 2001 From: silverwind Date: Fri, 30 Jan 2026 20:42:32 +0100 Subject: [PATCH] Use reserved .test TLD for unit tests (#36498) `smtp.mydomain.test` is a real domain that resolves to something and which is being connected to while running tests. Instead, use [.test](https://en.wikipedia.org/wiki/.test) which is guaranteed to never be registered on the internet, so all connections to it will fail with NXDOMAIN dns error. --- modules/setting/mailer_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/setting/mailer_test.go b/modules/setting/mailer_test.go index ceef35b051..f281715973 100644 --- a/modules/setting/mailer_test.go +++ b/modules/setting/mailer_test.go @@ -11,12 +11,12 @@ import ( func Test_loadMailerFrom(t *testing.T) { kases := map[string]*Mailer{ - "smtp.mydomain.com": { - SMTPAddr: "smtp.mydomain.com", + "smtp.mydomain.test": { + SMTPAddr: "smtp.mydomain.test", SMTPPort: "465", }, - "smtp.mydomain.com:123": { - SMTPAddr: "smtp.mydomain.com", + "smtp.mydomain.test:123": { + SMTPAddr: "smtp.mydomain.test", SMTPPort: "123", }, ":123": {