Fix SMTP test configuration to work without authentication

Remove maildev authentication configuration as the mailcatcher image doesn't support it.
Tests now use empty credentials which works with the unauthenticated maildev instance.

Co-authored-by: stnguyen90 <1477010+stnguyen90@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2025-12-12 06:01:00 +00:00
parent 048e20a1d2
commit 3a5bb6b5a6
3 changed files with 7 additions and 10 deletions
+2 -2
View File
@@ -69,8 +69,8 @@ _APP_STORAGE_ANTIVIRUS_PORT=3310
_APP_SMTP_HOST=maildev
_APP_SMTP_PORT=1025
_APP_SMTP_SECURE=
_APP_SMTP_USERNAME=user
_APP_SMTP_PASSWORD=password
_APP_SMTP_USERNAME=
_APP_SMTP_PASSWORD=
_APP_SMS_PROVIDER=sms://username:password@mock
_APP_SMS_FROM=+123456789
_APP_SMS_PROJECTS_DENY_LIST=
-3
View File
@@ -1110,9 +1110,6 @@ services:
- "traefik.http.routers.appwrite_maildev_https.rule=Host(`mail.localhost`)"
- "traefik.http.routers.appwrite_maildev_https.service=appwrite_maildev"
- "traefik.http.routers.appwrite_maildev_https.tls=true"
environment:
- MAILDEV_INCOMING_USER=${_APP_SMTP_USERNAME}
- MAILDEV_INCOMING_PASS=${_APP_SMTP_PASSWORD}
request-catcher-webhook: # used mainly for dev tests (mock HTTP webhook)
image: appwrite/requestcatcher:1.0.0
@@ -620,11 +620,11 @@ class ProjectsConsoleClientTest extends Scope
$id = $data['projectId'];
$smtpHost = System::getEnv('_APP_SMTP_HOST', "maildev");
$smtpPort = intval(System::getEnv('_APP_SMTP_PORT', "1025"));
$smtpUsername = System::getEnv('_APP_SMTP_USERNAME', 'user');
$smtpPassword = System::getEnv('_APP_SMTP_PASSWORD', 'password');
$smtpUsername = System::getEnv('_APP_SMTP_USERNAME', '');
$smtpPassword = System::getEnv('_APP_SMTP_PASSWORD', '');
/**
* Test for SUCCESS: Valid Credentials
* Test for SUCCESS: Valid Connection (no auth required)
*/
$response = $this->client->call(Client::METHOD_PATCH, '/projects/' . $id . '/smtp', array_merge([
'content-type' => 'application/json',
@@ -695,8 +695,8 @@ class ProjectsConsoleClientTest extends Scope
{
$smtpHost = System::getEnv('_APP_SMTP_HOST', "maildev");
$smtpPort = intval(System::getEnv('_APP_SMTP_PORT', "1025"));
$smtpUsername = System::getEnv('_APP_SMTP_USERNAME', 'user');
$smtpPassword = System::getEnv('_APP_SMTP_PASSWORD', 'password');
$smtpUsername = System::getEnv('_APP_SMTP_USERNAME', '');
$smtpPassword = System::getEnv('_APP_SMTP_PASSWORD', '');
// Create a team
$team = $this->client->call(Client::METHOD_POST, '/teams', array_merge([