Skip to content

Commit

Permalink
Test/imgtestlib/gen_build_info_dir_path_prefix: use "manifest-id-<ID>"
Browse files Browse the repository at this point in the history
Prefix the manifest_id value in the generated path prefix with
"manifest-id-" to make it obvious what the value represents.

Signed-off-by: Tomáš Hozza <[email protected]>
  • Loading branch information
thozza committed Jan 7, 2025
1 parent e11626e commit 08f5bb5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion test/scripts/imgtestlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def gen_build_info_dir_path_prefix(osbuild_ref, runner_distro, distro=None, arch
The returned path always has a trailing separator at the end to signal that it is a directory.
"""
path = os.path.join(f"osbuild-ref-{osbuild_ref}", f"runner-{runner_distro}")
for p in (distro, arch, manifest_id):
for p in (distro, arch, f"manifest-id-{manifest_id}" if manifest_id else None):
if p is None:
return path + "/"
path = os.path.join(path, p)
Expand Down
4 changes: 2 additions & 2 deletions test/scripts/test_imgtestlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def test_read_seed():
"arch": "x86_64",
"manifest_id": "abc123123",
},
"osbuild-ref-abc123/runner-fedora-41/fedora-41/x86_64/abc123123/"
"osbuild-ref-abc123/runner-fedora-41/fedora-41/x86_64/manifest-id-abc123123/"
),
# Optional arg 'distro' not specified, thus following optional args 'arch' and 'manifest_id' are ignored
(
Expand Down Expand Up @@ -107,7 +107,7 @@ def test_gen_build_info_dir_path_prefix(kwargs, expected):
"manifest_id": "abc123"
},
testlib.S3_BUCKET + "/" + testlib.S3_PREFIX + \
"/osbuild-ref-abcdef123456/runner-fedora-41/fedora-41/aarch64/abc123/",
"/osbuild-ref-abcdef123456/runner-fedora-41/fedora-41/aarch64/manifest-id-abc123/",
),
(
{
Expand Down

0 comments on commit 08f5bb5

Please sign in to comment.