Skip to content

Commit

Permalink
Assume lists are sorted when defined
Browse files Browse the repository at this point in the history
  • Loading branch information
e-backmark-ericsson committed Jan 8, 2024
1 parent 093342a commit 5ca7de2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion definitions/EiffelArtifactReusedEvent/4.0.0.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ properties:
properties:
type:
enum:
- REUSED_ARTIFACT
- COMPOSITION
- REUSED_ARTIFACT
items:
$ref: ../EiffelEventLink/2.0.0.yml
required:
Expand Down
4 changes: 2 additions & 2 deletions schemas/EiffelArtifactReusedEvent/4.0.0.json
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,8 @@
"properties": {
"type": {
"enum": [
"REUSED_ARTIFACT",
"COMPOSITION"
"COMPOSITION",
"REUSED_ARTIFACT"
]
}
}
Expand Down
2 changes: 0 additions & 2 deletions test_definitions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"

0 comments on commit 5ca7de2

Please sign in to comment.