GRM-30: feat: add runner labels support and refactor i18n to JSON
Post-merge Vikunja update / vikunja (push) Successful in 7s
CI / quality (push) Successful in 1m5s
CI / molecule-tests (1) (push) Successful in 6m26s
CI / molecule-tests (0) (push) Successful in 8m50s
CI / molecule-tests (2) (push) Successful in 5m55s

This commit was merged in pull request #9.
This commit is contained in:
2026-06-20 18:42:39 +00:00
parent c8970da942
commit 0c6c735000
10 changed files with 890 additions and 772 deletions
+17 -1
View File
@@ -17,7 +17,15 @@ class TestRunnerRegistry:
def test_add_and_get(self, tmp_path: Path) -> None:
reg = RunnerRegistry(tmp_path / "runners.json")
reg.add("r1", host="10.0.0.1", user="ubuntu", key="/key", mode="docker", gitea_url="https://git.example.com")
reg.add(
"r1",
host="10.0.0.1",
user="ubuntu",
key="/key",
mode="docker",
gitea_url="https://git.example.com",
labels="docker:docker://alpine:latest",
)
info = reg.get("r1")
assert info is not None
assert info["host"] == "10.0.0.1"
@@ -25,8 +33,16 @@ class TestRunnerRegistry:
assert info["key"] == "/key"
assert info["mode"] == "docker"
assert info["gitea_url"] == "https://git.example.com"
assert info["labels"] == "docker:docker://alpine:latest"
assert "created_at" in info
def test_add_without_labels(self, tmp_path: Path) -> None:
reg = RunnerRegistry(tmp_path / "runners.json")
reg.add("r1", host="10.0.0.1", user="ubuntu")
info = reg.get("r1")
assert info is not None
assert info["labels"] is None
def test_get_missing(self, tmp_path: Path) -> None:
reg = RunnerRegistry(tmp_path / "runners.json")
assert reg.get("missing") is None