File tree Expand file tree Collapse file tree
src/app/presentation/http/controllers/general Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -28,30 +28,22 @@ jobs:
2828 export APP_ENV=local
2929 python config/toml_config_manager.py
3030 cd config/local
31- echo "Generated .env.local content:"
32- cat .env.local
3331 export COMPOSE_ENV_FILES=.env.local
3432 docker compose up -d --build
3533
3634 - name : Verify Application Health
3735 run : |
38- timeout 10s bash -c '
39- while ! curl -sf http://0 .0.0.0 :9999/api/v1/; do
40- sleep 1
41- done
42- '
36+ timeout 10s bash -s <<'BASH '
37+ while ! curl -sf http://127 .0.0.1 :9999/api/v1/; do
38+ sleep 1
39+ done
40+ BASH
4341
4442 - name : Test Signup Handler
4543 run : |
46- timeout 10s bash -c "
47- while ! curl -sf -X POST \
48- 'http://0.0.0.0:9999/api/v1/account/signup' \
49- -H 'accept: application/json' \
50- -H 'Content-Type: application/json' \
51- -d '{
52- \"username\": \"string\",
53- \"password\": \"string\"
54- }'; do
55- sleep 1
56- done
57- "
44+ curl -f --json @- http://127.0.0.1:9999/api/v1/account/signup <<'JSON'
45+ {
46+ "username": "string",
47+ "password": "string"
48+ }
49+ JSON
Original file line number Diff line number Diff line change 22from starlette .requests import Request
33
44
5- def create_healthcheck_router () -> APIRouter :
5+ def create_health_router () -> APIRouter :
66 router = APIRouter ()
77
88 @router .get ("/" )
9- async def healthcheck (_ : Request ) -> dict [str , str ]:
9+ async def health (_ : Request ) -> dict [str , str ]:
1010 """
1111 - Open to everyone.
1212 - Returns `200 OK` if the API is alive.
Original file line number Diff line number Diff line change 11from fastapi import APIRouter
22
3- from app .presentation .http .controllers .general .healthcheck import (
4- create_healthcheck_router ,
3+ from app .presentation .http .controllers .general .health import (
4+ create_health_router ,
55)
66
77
@@ -10,7 +10,7 @@ def create_general_router() -> APIRouter:
1010 tags = ["General" ],
1111 )
1212
13- sub_routers = (create_healthcheck_router (),)
13+ sub_routers = (create_health_router (),)
1414
1515 for sub_router in sub_routers :
1616 router .include_router (sub_router )
You can’t perform that action at this time.
0 commit comments