"""부팅 스모크 — 앱이 뜨고 헬스체크가 응답하는지. 보일러플레이트 이식 직후의 최소 확인. 도메인 코드가 얹히기 전에도 항상 통과해야 한다. """ async def test_healthz(client): """검증: /healthz 호출. 기대결과: 200, 서버 기동 시각 문자열(API_SERVER_START_TIME)이 그대로 반환.""" r = await client.get("/healthz") assert r.status_code == 200 assert isinstance(r.json(), str) and len(r.json()) > 0 async def test_readyz_checks_db(client, db_engine): """검증: /readyz 호출(테스트 DB 가 붙어 있는 정상 상태). 기대결과: ★ healthz 와 다르게 실제로 DB 에 SELECT 1 을 던져 본 뒤 200 — "프로세스가 살아 있다" 가 아니라 "요청을 처리할 수 있다" 를 본다(외부 감시용, router.router.readyz).""" r = await client.get("/readyz") assert r.status_code == 200 assert r.json() == {"ok": True, "db": "up"}