forked from mtusi2026/mtusi2026lab2
reworked
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
import os
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
import pytest
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
sys.path.insert(0, str(ROOT / "tests"))
|
||||
from client import Client, Failure # noqa: E402
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def base_url():
|
||||
return os.environ.get("BASE_URL", "http://127.0.0.1:8080")
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def live(base_url):
|
||||
c = Client(base_url, timeout=15)
|
||||
try:
|
||||
c.call("GET", "/health/ready", schema="Health")
|
||||
except Failure as exc:
|
||||
pytest.skip("API is not ready: %s" % exc)
|
||||
return c
|
||||
Reference in New Issue
Block a user