Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: refactor utils #1760

Merged
merged 9 commits into from
Dec 3, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix: e2e tests
sangjanai committed Dec 3, 2024
commit a96e5ac0d6b309d72f58a9051af83e8061cfa608
1 change: 1 addition & 0 deletions engine/e2e-test/main.py
Original file line number Diff line number Diff line change
@@ -2,6 +2,7 @@
import sys

### e2e tests are expensive, have to keep engines tests in order
from test_api_engine_list import TestApiEngineList
from test_api_engine import TestApiEngine
from test_api_model import TestApiModel
from test_api_model_import import TestApiModelImport
5 changes: 0 additions & 5 deletions engine/e2e-test/test_api_engine.py
Original file line number Diff line number Diff line change
@@ -20,11 +20,6 @@ def setup_and_teardown(self):

# Teardown
stop_server()

# engines list
def test_engines_list_api_run_successfully(self):
response = requests.get("http://localhost:3928/engines")
assert response.status_code == 200

# engines get
def test_engines_get_llamacpp_should_be_successful(self):
25 changes: 25 additions & 0 deletions engine/e2e-test/test_api_engine_list.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import pytest
import requests
from test_runner import start_server, stop_server


class TestApiEngineList:

@pytest.fixture(autouse=True)
def setup_and_teardown(self):
# Setup
# Not sure why but on macOS amd, the first start server timeouts with CI
start_server()
stop_server()
success = start_server()
if not success:
raise Exception("Failed to start server")

yield

# Teardown
stop_server()

def test_engines_list_api_run_successfully(self):
response = requests.get("http://localhost:3928/engines")
assert response.status_code == 200