From c2d9104b45fa8711ac4e25abd03eeb45d3dd41be Mon Sep 17 00:00:00 2001 From: Winni Neessen Date: Fri, 11 Oct 2024 11:55:58 +0200 Subject: [PATCH] Update environment variables for SMTP authentication Renamed environment variables from TEST_USER and TEST_PASS to TEST_SMTPAUTH_USER and TEST_SMTPAUTH_PASS for clarity and consistency in setting SMTP authentication credentials. This change ensures that the correct credentials are applied during tests. --- client_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/client_test.go b/client_test.go index 7e34e97..45356e0 100644 --- a/client_test.go +++ b/client_test.go @@ -1188,8 +1188,8 @@ func TestClient_DialWithContext_switchAuth(t *testing.T) { // We switch to LOGIN auth, which the server supports client.SetSMTPAuth(SMTPAuthLogin) - client.SetUsername(os.Getenv("TEST_USER")) - client.SetPassword(os.Getenv("TEST_PASS")) + client.SetUsername(os.Getenv("TEST_SMTPAUTH_USER")) + client.SetPassword(os.Getenv("TEST_SMTPAUTH_PASS")) if err = client.DialWithContext(context.Background()); err != nil { t.Errorf("failed to dial to sending server: %s", err) } @@ -1208,8 +1208,8 @@ func TestClient_DialWithContext_switchAuth(t *testing.T) { } // We switch to CUSTOM by providing PLAIN auth as function - the server supports this - client.SetSMTPAuthCustom(smtp.PlainAuth("", os.Getenv("TEST_USER"), os.Getenv("TEST_PASS"), - os.Getenv("TEST_HOST"))) + client.SetSMTPAuthCustom(smtp.PlainAuth("", os.Getenv("TEST_SMTPAUTH_USER"), + os.Getenv("TEST_SMTPAUTH_PASS"), os.Getenv("TEST_HOST"))) if client.smtpAuthType != SMTPAuthCustom { t.Errorf("expected auth type to be Custom, got: %s", client.smtpAuthType) }