stages(groups): port to v2 and allow devices/mounts

This will allow us to generate `bootc install to-filesystem` compatible
devices/mount setups for the groups stage.
This commit is contained in:
Michael Vogt 2024-04-15 09:51:27 +02:00 committed by Ondřej Budai
parent 2a0027557f
commit 7c04e1c596
2 changed files with 30 additions and 14 deletions

View file

@ -29,3 +29,10 @@ def test_schema_validation(stage_schema, test_data, expected_err):
else:
assert res.valid is False
assert_jsonschema_error_contains(res, expected_err, expected_num_errs=1)
def test_schema_supports_bootc_style_mounts(stage_schema, bootc_devices_mounts_dict):
test_input = bootc_devices_mounts_dict
test_input["type"] = STAGE_NAME
res = stage_schema.validate(test_input)
assert res.valid is True, f"err: {[e.as_dict() for e in res.errors]}"