Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.

Commit ff1cf8b

Browse files
committed
fix: e2e tests
1 parent fb71045 commit ff1cf8b

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

engine/e2e-test/main.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import sys
33

44
### e2e tests are expensive, have to keep engines tests in order
5+
from test_api_engine_list import TestApiEngineList
56
from test_api_engine import TestApiEngine
67
from test_api_model import TestApiModel
78
from test_api_model_import import TestApiModelImport
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import pytest
2+
import requests
3+
from test_runner import start_server, stop_server
4+
5+
6+
class TestApiEngineList:
7+
8+
@pytest.fixture(autouse=True)
9+
def setup_and_teardown(self):
10+
# Setup
11+
# Not sure why but on macOS amd, the first start server timeouts with CI
12+
start_server()
13+
stop_server()
14+
success = start_server()
15+
if not success:
16+
raise Exception("Failed to start server")
17+
18+
yield
19+
20+
# Teardown
21+
stop_server()
22+
23+
def test_engines_list_api_run_successfully(self):
24+
response = requests.get("http://localhost:3928/engines")
25+
assert response.status_code == 200

0 commit comments

Comments
 (0)