Merge pull request #65 from aimingmed/feature/backend-frontend-structure

check network connection for backend-aimingmedai
This commit is contained in:
Hong Kai LEE 2025-04-18 11:16:11 +08:00 committed by GitHub
commit afe9fb9fe3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 11 additions and 1 deletions

View File

@ -153,6 +153,16 @@ jobs:
# Check if all services are healthy
docker compose -f "${{ steps.create_compose.outputs.COMPOSE_FILE_PATH }}" ps
- name: Debug Network Connections
if: always() # Run even if previous steps failed
run: |
echo "--- Inspecting network: test-network-${{ github.run_id }} ---"
docker network inspect test-network-${{ github.run_id }}
echo "--- Listing running containers (docker ps) ---"
docker ps -a --format "table {{.ID}}\t{{.Names}}\t{{.Image}}\t{{.Status}}\t{{.Ports}}\t{{.Networks}}"
echo "--- Backend Service Logs ---"
docker logs backend-aimingmedai || echo "Could not get logs for backend-aimingmedai" # Replace with actual service name
- name: Run Tests
shell: bash
run: |

View File

@ -6,7 +6,7 @@ import websockets
@pytest.mark.asyncio
async def test_chatbot_integration():
# Send a request to the chatbot endpoint
url = "ws://localhost:8004/ws"
url = "ws://backend-aimingmedai:80/ws"
data = [{"content": "Hello"}]
try:
async with websockets.connect(url) as websocket: