test(web): honor playwright smoke base url
This commit is contained in:
@@ -22,7 +22,7 @@ import { test, expect } from '@playwright/test'
|
||||
import * as fs from 'fs'
|
||||
import * as path from 'path'
|
||||
|
||||
const BASE_URL = 'https://awoooi.wooo.work'
|
||||
const BASE_URL = process.env.PLAYWRIGHT_BASE_URL || 'http://localhost:3000'
|
||||
const SCREENSHOT_DIR = 'test-results/screenshots'
|
||||
|
||||
// 確保截圖目錄存在
|
||||
|
||||
@@ -50,6 +50,23 @@
|
||||
- `git diff --check`
|
||||
- `python3 scripts/security/security-mirror-progress-guard.py --root .` → `SECURITY_MIRROR_PROGRESS_GUARD_OK`
|
||||
|
||||
**Production 部署後驗證**:
|
||||
|
||||
- Gitea main:`4667a86c feat(adr100): surface replay execution gate` 已推版。
|
||||
- K3s production 映像:
|
||||
- `awoooi-api` → `192.168.0.110:5000/awoooi/api:4667a86c6d983e5a729f9988d6dc1b8f5cb90ffd`,`2/2` ready
|
||||
- `awoooi-worker` → `192.168.0.110:5000/awoooi/api:4667a86c6d983e5a729f9988d6dc1b8f5cb90ffd`,`1/1` ready
|
||||
- `awoooi-web` → `192.168.0.110:5000/awoooi/web:4667a86c6d983e5a729f9988d6dc1b8f5cb90ffd`,`2/2` ready
|
||||
- Production health:`https://awoooi.wooo.work/api/v1/health` → `status=healthy`。
|
||||
- Production replay dry-run:
|
||||
- `INC-20260601-1B3388` → `replay_gate.status=blocked_unsupported_write_route`、`next_step=author_supported_executor_step`、`repair_executed=false`。
|
||||
- `INC-20260601-B51DFD` → `replay_gate.status=runtime_replay_ready`、`next_step=queue_runtime_replay_with_gate5_projection`、`repair_executed=false`。
|
||||
- Gitea Actions:
|
||||
- `code-review.yaml` → success。
|
||||
- `cd.yaml` tests / build-and-deploy → success;post-deploy `E2E Smoke Test` → failed。Gitea log storage 查不到 `4658.log.zst`,需另追 runner log 保存鏈路。
|
||||
- 手動同等 production smoke:`PLAYWRIGHT_BASE_URL=https://awoooi.wooo.work pnpm --dir apps/web exec playwright test tests/e2e/smoke.spec.ts --reporter=line` → `5 passed`。
|
||||
- 追加清理:`apps/web/tests/e2e/smoke.spec.ts` 改為使用 `PLAYWRIGHT_BASE_URL`,避免 smoke 本身硬編 production URL 或本機驗證誤啟錯誤 target。
|
||||
|
||||
**目前整體進度(本階段完成後)**:
|
||||
|
||||
- ADR-100 非成功驗證補救工作項:約 `95%`;`ready_for_replay` 已從只看 read-only dry-run,提升到可判斷 write replay gate / blocked reason / next step。
|
||||
|
||||
Reference in New Issue
Block a user