[elbe-devel] [PATCH 2/3] elbepack: cyclonedx-sbom: use valid timestamp in reference tests
Thomas Weißschuh
thomas.weissschuh at linutronix.de
Fri Jul 5 15:28:47 CEST 2024
We want the reference data itself to satisfy the schema.
Instead of the non-date-time string "INVALID" use a valid string.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh at linutronix.de>
---
elbepack/tests/cyclonedx/cyclonedx_reference.json | 2 +-
elbepack/tests/cyclonedx/test_cyclonedx_sbom.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/elbepack/tests/cyclonedx/cyclonedx_reference.json b/elbepack/tests/cyclonedx/cyclonedx_reference.json
index 7fdba67878b8..bfa19f469a8c 100644
--- a/elbepack/tests/cyclonedx/cyclonedx_reference.json
+++ b/elbepack/tests/cyclonedx/cyclonedx_reference.json
@@ -4,7 +4,7 @@
"serialNumber": "urn:uuid:00000000-0000-0000-0000-000000000000",
"version": 1,
"metadata": {
- "timestamp": "INVALID",
+ "timestamp": "0001-01-01T00:00:00+00:00",
"tools": [
{
"vendor": "Linutronix",
diff --git a/elbepack/tests/cyclonedx/test_cyclonedx_sbom.py b/elbepack/tests/cyclonedx/test_cyclonedx_sbom.py
index b50c9fc8d1ac..223eecaf63be 100644
--- a/elbepack/tests/cyclonedx/test_cyclonedx_sbom.py
+++ b/elbepack/tests/cyclonedx/test_cyclonedx_sbom.py
@@ -30,7 +30,7 @@ def test_schema():
def test_reference_data():
test_bom = generate_test_bom()
- test_bom['metadata']['timestamp'] = 'INVALID'
+ test_bom['metadata']['timestamp'] = '0001-01-01T00:00:00+00:00'
test_bom['serialNumber'] = uuid.UUID(int=0).urn
test_bom['metadata']['tools'][0]['version'] = 'INVALID'
with here.joinpath('cyclonedx_reference.json').open() as f:
--
2.45.2
More information about the elbe-devel
mailing list