From 08f5bb5ce2a1da02787b264d467f46d888d8cc1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hozza?= Date: Tue, 7 Jan 2025 13:39:03 +0100 Subject: [PATCH] Test/imgtestlib/gen_build_info_dir_path_prefix: use "manifest-id-" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- test/scripts/imgtestlib.py | 2 +- test/scripts/test_imgtestlib.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/scripts/imgtestlib.py b/test/scripts/imgtestlib.py index 882320b036..db68784a25 100644 --- a/test/scripts/imgtestlib.py +++ b/test/scripts/imgtestlib.py @@ -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) diff --git a/test/scripts/test_imgtestlib.py b/test/scripts/test_imgtestlib.py index 08d939a996..53cc5ec580 100644 --- a/test/scripts/test_imgtestlib.py +++ b/test/scripts/test_imgtestlib.py @@ -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 ( @@ -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/", ), ( {