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 /cmd/hpkg/test/test.py | |
| 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 'cmd/hpkg/test/test.py')
| -rw-r--r-- | cmd/hpkg/test/test.py | 10 |
1 files changed, 4 insertions, 6 deletions
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() |
