王性驊
|
1f660b547a
|
add fix eage case
|
2026-05-26 14:05:33 +08:00 |
王性驊
|
9616969fd0
|
test(e2e): 加 banner / e2e-list / k6 風格 user journey
讓「我有哪些測試、現在在測什麼」一眼看得到,並補上跨 endpoint 的狀態流測試:
每個測試開頭印中文 banner
- 新增 e2eStep(t, id, method, path, desc) helper(test/e2e/setup_test.go)
- 17 個 contract test 開頭加 banner,go test -v 會逐個顯示
▶ [M-01] GET /api/v1/members/me — 讀 profile(tenant/uid/status)
- 對外 ID 與 docs/e2e-testing.md 的測試覆蓋矩陣對齊
新增 make e2e-list
- scripts/e2e-list.sh 掃 _test.go,分兩節印 contract tests + journeys;
每個 journey 列出所有 step ID + 描述(Step 用 ▶、SkipStep 用 ⊘)
scripts 彩色 step banner + optional MailHog
- scripts/e2e-lib.sh 抽共用 helpers(e2e_step/info/ok/warn、e2e_print_services)
- e2e-run.sh / e2e-up.sh 改用 step banner + 服務面板(執行完印出 Mongo/Redis/
Gateway/MailHog 的 URL)
- E2E_WITH_SMTP=1 會額外起 MailHog(http://localhost:8025),方便肉眼確認流程
k6 風格 user journey
- 新增 test/e2e/journey.go:NewJourney + Step + SkipStep + Summary,
任一步 fail 自動 skip 後續,輸出 ▶ [J-x.y] 階層 banner
- J-1 Tenant Owner 入職第一天(12 steps):/me → PATCH → email verify
→ phone verify → TOTP enroll/verify/replay/disable
- J-2 Tenant Admin 建 qa_engineer 角色 → 指派 → 二人視角驗證 → 撤銷(8 steps)
- J-3 Session 生命週期 refresh → /me → logout → 舊 token 401(4 steps,ZZZ 排最後)
- J-4 完整註冊 → 登入(5 steps stub,標 SkipStep;接 ZITADEL container 後改 Step 即可)
- make e2e-journey / make test-e2e-journey 拆獨立 target;e2e-run.sh 透過
E2E_MODE=journey + E2E_TEST_PATTERN_ZZZ 切換
docs/e2e-testing.md
- 首節改為「我現在有哪些測試?make e2e-list」並附 banner 範例輸出
- 加 Journeys 章節:journey 列表、執行範例、失敗時的輸出、寫新 journey 範本
- 補 e2e-journey / test-e2e-journey / E2E_WITH_SMTP 環境變數
Co-authored-by: Cursor <cursoragent@cursor.com>
|
2026-05-22 17:18:36 +08:00 |
王性驊
|
1f3eb3c992
|
add member totp
|
2026-05-22 07:52:39 +08:00 |
王性驊
|
2ae86e9002
|
add member totp
|
2026-05-21 07:51:22 +08:00 |
王性驊
|
240fa92f6f
|
add member totp
|
2026-05-20 21:03:59 +08:00 |
王性驊
|
3afe3f9502
|
fix error msg
|
2026-05-20 17:32:22 +08:00 |
王性驊
|
35c6577ac8
|
chore: gitignore local gateway.dev.yaml and add example template
Stop tracking personal dev config (ports, credentials). Developers copy
etc/gateway.dev.example.yaml to etc/gateway.dev.yaml locally.
Co-authored-by: Cursor <cursoragent@cursor.com>
|
2026-05-20 15:14:44 +08:00 |
王性驊
|
49e7099bf2
|
add notification and member modules with local dev stack
Implement outbound notification (sync/async, idempotency, quota, DLQ),
member OTP/verification, SMTP/SES/Mitake providers, shared Redis wiring,
docker-compose for Mongo/Redis, and gateway config documentation.
Co-authored-by: Cursor <cursoragent@cursor.com>
|
2026-05-20 15:01:08 +08:00 |
王性驊
|
fb5ac4b09f
|
add lint
|
2026-05-19 21:15:18 +08:00 |
王性驊
|
ea4f45f949
|
init project
|
2026-05-19 19:00:28 +08:00 |