mirror of
https://github.com/pyMC-dev/pyMC_Repeater.git
synced 2026-10-31 04:01:59 +01:00
feat(plugins): add runtime endpoint and functionality to retrieve plugin runtime data
This commit is contained in:
1 parent
6f9ef1c394
commit
6a393c5c61
8 files changed
+123
-3
No files matched your search
@@ -94,6 +94,13 @@ def test_ipc_list_status_start_stop(tmp_path: Path):
|
||||
st = client.status("openhop.demo")
|
||||
assert st["state"] == "STOPPED"
|
||||
|
||||
runtime_path = manager.storage.runtime_path("openhop.demo")
|
||||
runtime_path.parent.mkdir(parents=True, exist_ok=True)
|
||||
runtime_path.write_text(json.dumps({"schema": 1, "running": True}), encoding="utf-8")
|
||||
runtime = client.get_runtime("openhop.demo")
|
||||
assert runtime["exists"] is True
|
||||
assert runtime["runtime"]["schema"] == 1
|
||||
|
||||
with pytest.raises(PluginIPCError):
|
||||
client.status("missing.plugin")
|
||||
finally:
|
||||
|
||||
Reference in new issue
Block a user