Skip to content

Add email testing SMTP server#34

Merged
soedirgo merged 2 commits into
mainfrom
feat/smtp
May 18, 2021
Merged

Add email testing SMTP server#34
soedirgo merged 2 commits into
mainfrom
feat/smtp

Conversation

@soedirgo
Copy link
Copy Markdown
Member

What kind of change does this PR introduce?

Feature.

What is the current behavior?

No SMTP server, so no way to check sent emails.

Fixes #22.

What is the new behavior?

Adds an email testing server (inbucket). Can't do things like password reset yet, but at least we can now see sent emails for email confirmation, invitation, password reset, and magic link.

@soedirgo soedirgo requested a review from kiwicopple May 18, 2021 00:10
Copy link
Copy Markdown
Member

@kiwicopple kiwicopple left a comment

Choose a reason for hiding this comment

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

Looks great @soedirgo 👍

@soedirgo soedirgo merged commit 8859a93 into main May 18, 2021
@soedirgo soedirgo deleted the feat/smtp branch May 18, 2021 13:06
@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 0.4.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

kallebysantos pushed a commit to kallebysantos/supabase-cli that referenced this pull request May 6, 2026
…(CLI-1360, CLI-1361) (supabase#34)

## What kind of change does this PR introduce?

Enhancement to the E2E test framework (CLI-1360, CLI-1361). Stacks on
supabase#33.

## What is the current behavior?

- Tests set up replay server state and run CLI subprocesses inline with
ad-hoc `beforeEach`/`afterEach` boilerplate, duplicated across every
test file.
- Fixture data is stored as flat per-endpoint JSON files
(`recorded/<METHOD>_<PATH>/default.response.json`) with no ordering
guarantees for multi-step commands.
- Placeholder normalisation used numbered suffixes (`<UUID_1>`,
`<TIMESTAMP_1>`, etc.) that caused Go CLI `time.Parse` failures when
parsed as real timestamps.

## What is the new behavior?

**CLI-1360 — `testBehaviour` / `testParity` custom test API:**
- `testBehaviour(name, fn)` wraps a test with full harness lifecycle:
temp dir, scenario start/end, and access to `{ run, apiUrl }`.
- `testParity(args, opts?)` runs the same command against Go and
TS-legacy inside a managed scenario and asserts full parity (stdout,
stderr, exit code, requests, fs side-effects).
- Both are exported from `test-context.ts` and eliminate all per-file
setup boilerplate.

**CLI-1361 — Scenario-based fixture system:**
- Fixtures are stored as ordered
`fixtures/scenarios/<slug>/interactions.json` arrays, one entry per
request/response pair.
- Recording (`RECORD=true`) dual-writes: each scenario is flushed
atomically on `DELETE /_ctrl/scenario`, even when no API calls were made
(error-override tests).
- Replay uses `normalizeUrlPath` for stable, idempotent path comparison
(no numbered placeholder counters).
- Placeholder normalisation simplified to unnumbered `<UUID>`,
`<PROJECT_REF>`, `<JWT>`, `<API_KEY>`. Timestamps become a fixed valid
ISO string (`2000-01-01T00:00:00Z`) so Go CLI `time.Parse` calls succeed
against fixture data.
- Go version-update notifications stripped from normalised output so
parity assertions are not broken by upgrade banners.
@supabase-cli-releaser supabase-cli-releaser Bot mentioned this pull request May 12, 2026
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.

Support magic link through GoTrue

2 participants