diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-10-23 23:25:46 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-10-24 00:42:16 +0900 |
| commit | 2442eda8d960681d53e5f463a974a7f44ffe312e (patch) | |
| tree | a30501452180df8f2966200a70a0599e767d631c /test | |
| parent | 05488bfb8f43f12bc0306e03b675d4f415fc6328 (diff) | |
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 <cat@gensokyo.uk>
Diffstat (limited to 'test')
| -rw-r--r-- | test/test.py | 14 |
1 files changed, 6 insertions, 8 deletions
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): |
