stages: fix test values for "images" inputs

The "images" inputs in the tests were bad test values and only worked
"by accident" [0]. Thanks to Achilleas for discovering this!

This commit fixes this.

[0] https://github.com/osbuild/osbuild/pull/1752#discussion_r1580891435
This commit is contained in:
Michael Vogt 2024-04-26 15:16:32 +02:00 committed by Achilleas Koutsou
parent bd8f361851
commit d50857e5aa
4 changed files with 29 additions and 54 deletions

View file

@ -183,3 +183,21 @@ def find_one_subclass_in_module(module: ModuleType, subclass: Type) -> object:
raise ValueError(f"already have {cls}, also found {name}:{memb}")
cls = memb
return cls
def make_fake_images_inputs(fake_oci_path, name):
fname = fake_oci_path.name
dirname = fake_oci_path.parent
return {
"images": {
"path": dirname,
"data": {
"archives": {
fname: {
"format": "oci-archive",
"name": name,
},
},
},
},
}