From 82a466046fde6b2f03e360466e2e9dd3926fdfe5 Mon Sep 17 00:00:00 2001 From: Ales Raszka Date: Wed, 30 Oct 2024 16:53:00 +0100 Subject: [PATCH] fix: update product level SBOM name The name format defined in the script is different from what is expected. This commit removes the underscore in the name and replace it with a space. JIRA: ISV-5314 Signed-off-by: Ales Raszka --- sbom/create_product_sbom.py | 2 +- sbom/test_create_product_sbom.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sbom/create_product_sbom.py b/sbom/create_product_sbom.py index 254fa08..57cca5c 100755 --- a/sbom/create_product_sbom.py +++ b/sbom/create_product_sbom.py @@ -126,7 +126,7 @@ def create_sbom(data_path: str) -> Dict: "created": datetime.now(timezone.utc).isoformat(timespec="seconds"), "creators": ["Organization: Red Hat", "Tool: Konflux CI"], }, - "name": f"{product_name}_{product_version}", + "name": f"{product_name} {product_version}", "packages": packages, "relationships": relationships, } diff --git a/sbom/test_create_product_sbom.py b/sbom/test_create_product_sbom.py index 4a7ef18..9669504 100644 --- a/sbom/test_create_product_sbom.py +++ b/sbom/test_create_product_sbom.py @@ -39,7 +39,7 @@ def test_create_sbom_no_components(self, mock_datetime: MagicMock, mock_uuid: Ma "created": time.isoformat(timespec="seconds"), "creators": ["Organization: Red Hat", "Tool: Konflux CI"], }, - "name": "product_1.2.3", + "name": "product 1.2.3", "packages": [ { "SPDXID": "SPDXRef-product", @@ -98,7 +98,7 @@ def test_create_sbom_single_component( "created": time.isoformat(timespec="seconds"), "creators": ["Organization: Red Hat", "Tool: Konflux CI"], }, - "name": "product_1.2.3", + "name": "product 1.2.3", "packages": [ { "SPDXID": "SPDXRef-product", @@ -178,7 +178,7 @@ def test_create_sbom_multiple_components_multiple_purls( "created": time.isoformat(timespec="seconds"), "creators": ["Organization: Red Hat", "Tool: Konflux CI"], }, - "name": "product_1.2.3", + "name": "product 1.2.3", "packages": [ { "SPDXID": "SPDXRef-product",