Keep B2 client fixes and move VPS implementation to its standalone repository
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
"""Core/VPS ownership survives lost HTTP, restarts and per-attempt timeouts."""
|
||||
|
||||
import ast
|
||||
import json
|
||||
import time
|
||||
from pathlib import Path
|
||||
@@ -16,14 +15,8 @@ from k1link.fleet.independent_equipment import EquipmentStore
|
||||
|
||||
|
||||
def shipped_version():
|
||||
source = Path(__file__).resolve().parents[1] / "apps/vps-host/ndc_vps/__init__.py"
|
||||
module = ast.parse(source.read_text())
|
||||
return next(
|
||||
ast.literal_eval(n.value)
|
||||
for n in module.body
|
||||
if isinstance(n, ast.Assign)
|
||||
and any(isinstance(t, ast.Name) and t.id == "VERSION" for t in n.targets)
|
||||
)
|
||||
source = Path(__file__).resolve().parent / "fixtures/arnavi_vps/client-v1.json"
|
||||
return json.loads(source.read_text())["server_version"]
|
||||
|
||||
|
||||
@pytest.fixture(params=sorted({"0.1.32", shipped_version()}))
|
||||
|
||||
Reference in New Issue
Block a user