mirror of
https://github.com/aimingmed/aimingmed-ai.git
synced 2026-02-05 22:53:23 +08:00
Merge pull request #65 from aimingmed/feature/backend-frontend-structure
check network connection for backend-aimingmedai
This commit is contained in:
commit
afe9fb9fe3
10
.github/workflows/template_test.yml
vendored
10
.github/workflows/template_test.yml
vendored
@ -153,6 +153,16 @@ jobs:
|
|||||||
# Check if all services are healthy
|
# Check if all services are healthy
|
||||||
docker compose -f "${{ steps.create_compose.outputs.COMPOSE_FILE_PATH }}" ps
|
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
|
- name: Run Tests
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@ -6,7 +6,7 @@ import websockets
|
|||||||
@pytest.mark.asyncio
|
@pytest.mark.asyncio
|
||||||
async def test_chatbot_integration():
|
async def test_chatbot_integration():
|
||||||
# Send a request to the chatbot endpoint
|
# Send a request to the chatbot endpoint
|
||||||
url = "ws://localhost:8004/ws"
|
url = "ws://backend-aimingmedai:80/ws"
|
||||||
data = [{"content": "Hello"}]
|
data = [{"content": "Hello"}]
|
||||||
try:
|
try:
|
||||||
async with websockets.connect(url) as websocket:
|
async with websockets.connect(url) as websocket:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user