Keep B2 client fixes and move VPS implementation to its standalone repository

This commit is contained in:
DCCONSTRUCTIONS
2026-09-29 12:41:21 +03:00
parent 03d44d0fb1
commit 6dd652f71e
85 changed files with 2201 additions and 9299 deletions
+3 -10
View File
@@ -63,18 +63,11 @@ def test_initial_usb_apply_rejects_unowned_or_incompatible_destination(case):
def test_initial_usb_apply_accepts_current_shipped_host():
import ast
import json
from pathlib import Path
# Read the shipped artifact's version without importing its hardware service.
source = Path(__file__).resolve().parents[1] / "apps/vps-host/ndc_vps/__init__.py"
module = ast.parse(source.read_text())
version = 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"
version = json.loads(source.read_text())["server_version"]
hosts, _, host = context()
host["status"]["version"] = version
assert apply(hosts, "device", 1) == {"ok": True}