Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat(cli): add mock SMTP server for testing scaletest notifications#20221

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
kacpersaw wants to merge5 commits intomain
base:main
Choose a base branch
Loading
fromkacpersaw/scaletest-smtp-mock-server

Conversation

kacpersaw
Copy link
Contributor

@kacpersawkacpersaw commentedOct 8, 2025
edited
Loading

This PR adds a fake SMTP server for scale testing. It collects emails sent during tests, which you can then check using the HTTP API.

Changes

  • Added mock SMTP server
  • Addedcoder scaletest smtp CLI command
  • Implemented HTTP API endpoints to retrieve messages by email
  • Added auto-purge to prevent memory issues

HTTP API Endpoints

  • GET /messages?email=<email> – Get messages sent to an email address
  • POST /purge – Clear all messages from memory

The HTTP API parses raw email messages to extract thedate,subject, andnotification ID.

Notification IDs are sent in emails like this:

<p><ahref="http://127.0.0.1:3000/settings/notifications?disabled=4e19c0ac-94e1-4532-9515-d1801aa283b2"style="color: #2563eb; text-decoration: none;">    Stop receiving emails like this</a></p>

CLI

coder scaletest smtp --host localhost --port 33199 --api-port 8080 --purge-at-count 1000

Flags:

  • --host: Host for the mock SMTP and API server (default: localhost)
  • --port: Port for the mock SMTP server (random if not specified)
  • --api-port: Port for the HTTP API server (random if not specified)
  • --purge-at-count: Max number of messages before auto-purging (default: 100000)

@kacpersawGraphite App
Copy link
ContributorAuthor

@kacpersawkacpersawforce-pushed thekacpersaw/scaletest-smtp-mock-server branch from5830a76 to20790fcCompareOctober 8, 2025 16:02
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@spikecurtisspikecurtisAwaiting requested review from spikecurtis

At least 1 approving review is required to merge this pull request.

Assignees

@kacpersawkacpersaw

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

1 participant
@kacpersaw

[8]ページ先頭

©2009-2025 Movatter.jp