fix: 修复 test_startup_db_unhealthy JSONResponse 解析
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 35s
CI/CD Pipeline / PR Build API Image (pull_request) Failing after 1m6s
PR Automation / Auto Merge on CI Green + Approved (pull_request) Successful in 1m51s
CI/CD Pipeline / Validate - Type Check (mypy) (pull_request) Successful in 1m59s
CI/CD Pipeline / Validate - Migration (alembic) (pull_request) Successful in 1m58s
Preview Deploy / Deploy Preview Environment (pull_request) Successful in 2m4s
AI Code Review / AI Code Review (pull_request) Failing after 2m12s
PR Automation / Auto Approve on CI Green (pull_request) Successful in 3m46s
CI/CD Pipeline / Validate - Code Quality (pull_request) Successful in 6m45s
CI/CD Pipeline / PR Build Worker Image (pull_request) Successful in 6m23s
CI/CD Pipeline / Integration Tests (pull_request) Successful in 2m45s
CI/CD Pipeline / Unit Tests (pull_request) Successful in 9m11s
CI/CD Pipeline / CI Gate (pull_request) Failing after 5s
CI/CD Pipeline / Production Browser E2E (pull_request) Failing after 695h42m43s
CI/CD Pipeline / Deploy Production (pull_request) Failing after 695h42m44s
CI/CD Pipeline / Build Production Web Image (pull_request) Failing after 695h42m45s
CI/CD Pipeline / Build Production Worker Image (pull_request) Failing after 695h42m45s
CI/CD Pipeline / Build Production API Image (pull_request) Failing after 695h42m45s
CI/CD Pipeline / Frontend Lint (pull_request) Failing after 695h51m57s
CI/CD Pipeline / PR Build Web Image (pull_request) Failing after 695h51m55s
CI/CD Pipeline / ACR Image Cleanup (pull_request) Failing after 695h52m27s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (pull_request) Failing after 695h52m31s
CI/CD Pipeline / Build Staging Worker Image (pull_request) Failing after 695h52m33s
CI/CD Pipeline / Staging API Integration Tests (pull_request) Failing after 695h52m29s
CI/CD Pipeline / Build Staging Web Image (pull_request) Failing after 695h52m33s
CI/CD Pipeline / Build Staging API Image (pull_request) Failing after 695h52m33s
CI/CD Pipeline / Canary Release to Production (pull_request) Failing after 696h16m26s
CI/CD Pipeline / Frontend Unit Tests (pull_request) Failing after 696h25m39s
CI/CD Pipeline / Staging E2E Tests (pull_request) Failing after 696h26m11s

startup_check() 不健康时返回 JSONResponse 对象,
不能直接用下标访问,需要先 json.loads(result.body)。
This commit is contained in:
xiaoxia
2026-08-18 15:33:52 +08:00
parent f6ebc3645b
commit 45a9e4f2db
+3 -1
View File
@@ -180,5 +180,7 @@ class TestStartupCheck:
result = await startup_check()
assert result["status"] == "starting"
assert result.status_code == 503
import json
body = json.loads(result.body)
assert body["status"] == "starting"