feat(mail): add MailSender port and explicit provider selection

This commit is contained in:
shira committed 2026-10-06 00:38:58 +03:00
1 parent e7d0d92ef9
commit 6153887eb5
26 files changed
+1253 -29

No files matched your search

+11
View File
@@ -118,10 +118,21 @@ func testEnvironment(values map[string]string) LookupEnv {
if key == "SEAWEEDFS_SECRET_KEY" {
return "test-secret", true
}
if value, ok := mailFixture[key]; ok {
return value, true
}
return "", false
}
}
// mailFixture is the smallest valid mail configuration. Mail tests override
// or remove entries to cover each transport.
var mailFixture = map[string]string{
"EMAIL_PROVIDER": "disabled",
"EMAIL_FROM": "Lincodex <no-reply@example.com>",
"APP_PUBLIC_URL": "http://localhost:8080",
}
func TestLoadFromEnvSeaweedFS(t *testing.T) {
settings, err := LoadFromEnv(testEnvironment(nil))
if err != nil {