From 5ca7de226ab2b3d9bd863036207da53dca378333 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20B=C3=A4ckmark?= Date: Mon, 8 Jan 2024 14:53:34 +0100 Subject: [PATCH] Assume lists are sorted when defined --- definitions/EiffelArtifactReusedEvent/4.0.0.yml | 2 +- schemas/EiffelArtifactReusedEvent/4.0.0.json | 4 ++-- test_definitions.py | 2 -- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/definitions/EiffelArtifactReusedEvent/4.0.0.yml b/definitions/EiffelArtifactReusedEvent/4.0.0.yml index 7e4afaf3..a537a875 100644 --- a/definitions/EiffelArtifactReusedEvent/4.0.0.yml +++ b/definitions/EiffelArtifactReusedEvent/4.0.0.yml @@ -38,8 +38,8 @@ properties: properties: type: enum: - - REUSED_ARTIFACT - COMPOSITION + - REUSED_ARTIFACT items: $ref: ../EiffelEventLink/2.0.0.yml required: diff --git a/schemas/EiffelArtifactReusedEvent/4.0.0.json b/schemas/EiffelArtifactReusedEvent/4.0.0.json index 589c2f3f..e3dfb991 100644 --- a/schemas/EiffelArtifactReusedEvent/4.0.0.json +++ b/schemas/EiffelArtifactReusedEvent/4.0.0.json @@ -159,8 +159,8 @@ "properties": { "type": { "enum": [ - "REUSED_ARTIFACT", - "COMPOSITION" + "COMPOSITION", + "REUSED_ARTIFACT" ] } } diff --git a/test_definitions.py b/test_definitions.py index ce8a8c34..9c5c74f5 100644 --- a/test_definitions.py +++ b/test_definitions.py @@ -119,12 +119,10 @@ def test_links(definition_file, manifest): contained_link_types = ( schema_links_contains.get("properties").get("type").get("enum") ) - contained_link_types.sort() links = definition_file.definition.get("_links", {}) for link in links: if links[link]["required"]: required_link_types.append(link) - required_link_types.sort() assert ( contained_link_types == required_link_types ), f"Required '{required_link_types}' and contained '{contained_link_types}' link types do not match"