generated from coulomb/repo-seed
Add profile-driven lifecycle rules
This commit is contained in:
@@ -58,6 +58,24 @@ def test_service_runner_handles_health() -> None:
|
||||
assert response["ok"] is True
|
||||
|
||||
|
||||
def test_service_runner_handles_profile_driven_lifecycle_plan() -> None:
|
||||
runner = LocalServiceRunner()
|
||||
|
||||
response = runner.handle(
|
||||
"graph.lifecycle.plan",
|
||||
{
|
||||
"profile": _load("memory-profile.json"),
|
||||
"graph": _load("memory-graph.json"),
|
||||
"parameters": {"refresh_digests": {"event.restart": "new"}},
|
||||
},
|
||||
)
|
||||
|
||||
actions = {(action["target_id"], action["action"]) for action in response["data"]["dry_run_actions"]}
|
||||
assert response["operation"] == "graph.lifecycle.plan"
|
||||
assert response["data"]["profile_id"] == "phase-memory-fixture-profile"
|
||||
assert ("event.restart", "refresh") in actions
|
||||
|
||||
|
||||
def test_profile_driven_runtime_config_resolves_file_backed_adapters(tmp_path) -> None:
|
||||
config = RuntimeConfig.from_profile(
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user