mirror of
https://github.com/aimingmed/aimingmed-ai.git
synced 2026-01-19 13:23:23 +08:00
update
This commit is contained in:
parent
19a8c7e7ae
commit
5aa717aff7
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@ -92,6 +92,7 @@ jobs:
|
||||
[
|
||||
{
|
||||
"name": "backend-aimingmedai",
|
||||
"ports" : ["8004:80"],
|
||||
"env": {
|
||||
"ENVIRONMENT": "dev",
|
||||
"TESTING": "1",
|
||||
@ -102,6 +103,7 @@ jobs:
|
||||
},
|
||||
{
|
||||
"name": "frontend-aimingmedai",
|
||||
"ports" : ["3004:80"],
|
||||
"depends_on": ["backend-aimingmedai"],
|
||||
"env": {
|
||||
"ENVIRONMENT": "dev",
|
||||
|
||||
5
.github/workflows/template_test.yml
vendored
5
.github/workflows/template_test.yml
vendored
@ -109,6 +109,9 @@ jobs:
|
||||
$svc.environment = @{}
|
||||
}
|
||||
$svc.networks = @("test") # Assign service to the custom network
|
||||
if ($img.ports) {
|
||||
$svc.ports = $img.ports
|
||||
}
|
||||
|
||||
$compose.services.$serviceName = $svc
|
||||
}
|
||||
@ -154,7 +157,7 @@ jobs:
|
||||
shell: bash
|
||||
run: |
|
||||
TEST_DIRS='["tests/integration/backend"]'
|
||||
TEST_ENVS_JSON='["FRONTEND_URL=http://frontend:80","BACKEND_URL=http://backend:80","ENVIRONMENT=dev","TESTING=1"]'
|
||||
TEST_ENVS_JSON='["ENVIRONMENT=dev","TESTING=1"]'
|
||||
RESULTS_PATH="${{ inputs.testResultsPath }}"
|
||||
STAGING_DIR="${{ runner.temp }}/test-results" # Use runner temp dir for results
|
||||
mkdir -p "$STAGING_DIR"
|
||||
|
||||
@ -1,17 +1,15 @@
|
||||
import pytest
|
||||
import subprocess
|
||||
import requests
|
||||
import json
|
||||
import time
|
||||
import os
|
||||
import asyncio
|
||||
import websockets
|
||||
import os
|
||||
|
||||
|
||||
backend_host = os.getenv("BACKEND_URL", "backend-aimingmedai")
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_chatbot_integration():
|
||||
# Send a request to the chatbot endpoint
|
||||
url = "ws://backend-aimingmedai:80/ws"
|
||||
url = f"ws://{backend_host}:80/ws"
|
||||
data = [{"content": "Hello"}]
|
||||
try:
|
||||
async with websockets.connect(url) as websocket:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user