From 2442eda8d960681d53e5f463a974a7f44ffe312e Mon Sep 17 00:00:00 2001 From: Ophestra Date: Thu, 23 Oct 2025 23:25:46 +0900 Subject: hst/instance: embed config struct This makes the resulting json easier to parse since it can now be deserialised into the config struct. Signed-off-by: Ophestra --- test/test.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'test') diff --git a/test/test.py b/test/test.py index 3c36c61e..cfc2f843 100644 --- a/test/test.py +++ b/test/test.py @@ -58,17 +58,15 @@ def check_state(name, enablements): raise Exception(f"unexpected state length {len(instances)}") instance = next(iter(instances.values())) - config = instance['config'] - command = f"{name}-start" - if not (config['container']['path'].startswith("/nix/store/")) or not (config['container']['path'].endswith(command)): - raise Exception(f"unexpected path {config['path']}") + if not (instance['container']['path'].startswith("/nix/store/")) or not (instance['container']['path'].endswith(command)): + raise Exception(f"unexpected path {instance['path']}") - if len(config['container']['args']) != 1 or config['container']['args'][0] != command: - raise Exception(f"unexpected args {config['args']}") + if len(instance['container']['args']) != 1 or instance['container']['args'][0] != command: + raise Exception(f"unexpected args {instance['args']}") - if config['enablements'] != enablements: - raise Exception(f"unexpected enablements {config['enablements']['enablements']}") + if instance['enablements'] != enablements: + raise Exception(f"unexpected enablements {instance['enablements']['enablements']}") def hakurei(command): -- cgit v1.3.1