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 --- cmd/hpkg/test/test.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'cmd/hpkg/test/test.py') diff --git a/cmd/hpkg/test/test.py b/cmd/hpkg/test/test.py index e2a002d6..6f16729d 100644 --- a/cmd/hpkg/test/test.py +++ b/cmd/hpkg/test/test.py @@ -60,13 +60,11 @@ def check_state(name, enablements): raise Exception(f"unexpected state length {len(instances)}") instance = next(iter(instances.values())) - config = instance['config'] + if len(instance['container']['args']) != 1 or not (instance['container']['args'][0].startswith("/nix/store/")) or f"hakurei-{name}-" not in (instance['container']['args'][0]): + raise Exception(f"unexpected args {instance['container']['args']}") - if len(config['container']['args']) != 1 or not (config['container']['args'][0].startswith("/nix/store/")) or f"hakurei-{name}-" not in (config['container']['args'][0]): - raise Exception(f"unexpected args {config['container']['args']}") - - if config['enablements'] != enablements: - raise Exception(f"unexpected enablements {config['enablements']}") + if instance['enablements'] != enablements: + raise Exception(f"unexpected enablements {instance['enablements']}") start_all() -- cgit v1.3.1