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

Commit c01df03

Browse files
committed
fix ci
1 parent 461601b commit c01df03

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

engine/e2e-test/test_api_model_start.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def setup_and_teardown(self):
1212
success = start_server()
1313
if not success:
1414
raise Exception("Failed to start server")
15-
requests.post("http://localhost:3928/v1/engines/llama-cpp")
15+
run("Install engine", ["engines", "install", "llama-cpp"], 5 * 60)
1616
run("Delete model", ["models", "delete", "tinyllama:gguf"])
1717
run(
1818
"Pull model",
@@ -27,5 +27,7 @@ def setup_and_teardown(self):
2727

2828
def test_models_start_should_be_successful(self):
2929
json_body = {"model": "tinyllama:gguf"}
30-
response = requests.post("http://localhost:3928/v1/models/start", json=json_body)
30+
response = requests.post(
31+
"http://localhost:3928/v1/models/start", json=json_body
32+
)
3133
assert response.status_code == 200, f"status_code: {response.status_code}"

engine/e2e-test/test_api_model_stop.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import pytest
22
import requests
3-
from test_runner import start_server, stop_server
3+
from test_runner import run, start_server, stop_server
44

55

66
class TestApiModelStop:
@@ -13,16 +13,18 @@ def setup_and_teardown(self):
1313
if not success:
1414
raise Exception("Failed to start server")
1515

16-
requests.post("http://localhost:3928/engines/llama-cpp")
16+
run("Install engine", ["engines", "install", "llama-cpp"], 5 * 60)
1717
yield
1818

19-
requests.delete("http://localhost:3928/engines/llama-cpp")
19+
run("Uninstall engine", ["engines", "uninstall", "llama-cpp"])
2020
# Teardown
2121
stop_server()
2222

2323
def test_models_stop_should_be_successful(self):
2424
json_body = {"model": "tinyllama:gguf"}
25-
response = requests.post("http://localhost:3928/v1/models/start", json=json_body)
25+
response = requests.post(
26+
"http://localhost:3928/v1/models/start", json=json_body
27+
)
2628
assert response.status_code == 200, f"status_code: {response.status_code}"
2729
response = requests.post("http://localhost:3928/v1/models/stop", json=json_body)
2830
assert response.status_code == 200, f"status_code: {response.status_code}"

0 commit comments

Comments
 (0)