Skip to content

test(smtp): send a password when moving SMTP to a private host - #14857

Merged
abnegate merged 1 commit into
mainfrom
fix/smtp-private-host-test
Oct 23, 2026
Merged

abnegate merged 1 commit into
mainfrom
fix/smtp-private-host-test

Conversation

@ChiragAgg5k

@ChiragAgg5k ChiragAgg5k commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

main is red on the Project e2e lane: SMTPConsoleClientTest and SMTPCustomServerTest fail testUpdateSMTPPrivateHost, expecting project_smtp_config_invalid but getting general_argument_invalid.

Two fixes merged today interact. #14795 requires the write-only SMTP password again when the host, port or security changes. #14811 added a test that moves SMTP to a private host. An earlier test in the same class stores a password, and the new test changes the host without sending one, so #14795's check rejects the request before #14811's public-host check runs.

Both behaviours are intended, so this only fixes the test: it now sends a password on both private-host updates, so the request reaches the host check it means to cover.

Related: appwrite-labs/cloud#6674

The private-host test changes the host after an earlier test stored a
password, so the write-only password rule (#14795) rejected it before the
public-host check (#14811) ran.
@luxor-code-review

luxor-code-review Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Review complete. No issues found — approved ✅.


This small PR updates only the shared e2e test base for the SMTP service, threading a password value through both setup code paths so the suite covers SMTP credentials in addition to host/port configuration.

Files Change
tests/e2e/Services/Project/SMTPBase.php Adds password: 'password' to both SMTP update/setup calls in the shared trait, keeping the success and rejection assertions otherwise unchanged.

No production code, config, or collections are touched; reviewers noted no defects in the test-only change.

Reviewed commit: 3a4de7f

@ghost

ghost commented Oct 22, 2026 •

Copy link
Copy Markdown

🟢 Tier S · Ready to merge

The private-host SMTP e2e test now includes a password in both update requests. This lets the test exercise the private-host validation and the disabled-configuration behavior under the current password requirement.

Verdict New comments Fixed Still open
✅ Approved 0 0 0
📂 Walkthrough · 1
File Change
tests/e2e/Services/Project/SMTPBase.php Supplies the SMTP password in both private-host update requests.

Reviewed 3a4de7f · Details · Comment @hansi-codes review to re-run, or mention @hansi-codes with a question.

@ChiragAgg5k ChiragAgg5k self-assigned this Oct 22, 2026

@ghost ghost left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Tier S · Looks good to merge. Summary

@github-actions

Copy link
Copy Markdown

Security rules

No new WARNING or ERROR findings from security rules.

6 existing findings tracked in .semgrep/baseline.json
  • php.appwrite.guest-write-without-abuse-limit (3)
  • php.appwrite.secret-compare-timing (1)
  • php.appwrite.weak-secret-env-default (2)

Posted by Checks / Rules. Re-runs update this comment in place. Rule details and baseline: .semgrep/README.md.

@github-actions

Copy link
Copy Markdown

✨ Benchmark results

Comparing main (before) → fix/smtp-private-host-test (after).

Metric Before After Change
🚀 Requests/sec 167.24 167.1 ⚪ -0.1%
⏱️ Latency P50 102.54 ms 103.37 ms ⚪ +0.8%
⏱️ Latency P95 242.94 ms 238.52 ms ⚪ -1.8%
Per-scenario breakdown & investigation details

Metrics below reflect the current branch (after). Δ P95 compares against the base.

Scenario P50 (ms) P95 (ms) Requests RPS Δ P95 (ms)
API total 103.37 238.52 10,317 167.1 -4.42
Account 187.61 343.04 543 9.19 -11.81
TablesDB 99.82 187.21 5,611 92.2 -15.19
Storage 95.15 227.13 2,715 47.14 +6.28
Functions 147.16 291.63 1,448 25.86 +23.89

Top API waits (after)

API request Max wait (ms)
storage.buckets.create 560.57
functions.create 483.1
account.prefs.update 472.13
account.name.update 442.27
functions.delete 434.11

@cursor cursor Bot mentioned this pull request Oct 23, 2026
1 of 2 tasks
@abnegate
abnegate merged commit d63021b into main Oct 23, 2026
33 checks passed
@abnegate
abnegate deleted the fix/smtp-private-host-test branch October 23, 2026 02:05
Tapraj-Pathak pushed a commit to Tapraj-Pathak/appwrite that referenced this pull request Oct 24, 2026
…-test

test(smtp): send a password when moving SMTP to a private host

(cherry picked from commit d63021b)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants