Skip to content

Commit 31fd179

Browse files
authored
Merge pull request package-url#695 from jkowalleck/tests/qualifier-checksum-normalize
tests: add tests for qualifier `checksum` normalization
2 parents d0b8330 + 4448592 commit 31fd179

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

tests/spec/specification-test.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,33 @@
143143
"expected_output": null,
144144
"expected_failure": true,
145145
"expected_failure_reason": "Should fail to build a PURL from invalid input components"
146+
},
147+
{
148+
"description": "Build with normalized checksum",
149+
"test_group": "base",
150+
"test_type": "build",
151+
"input": {
152+
"type": "generic",
153+
"namespace": null,
154+
"name": "openssl",
155+
"version": "1.1.10g",
156+
"qualifiers": {
157+
"checksum": "SHA256:dE4d501267Da"
158+
},
159+
"subpath": null
160+
},
161+
"expected_output": "pkg:generic/openssl@1.1.10g?checksum=sha256:de4d501267da",
162+
"expected_failure": false,
163+
"expected_failure_reason": null
164+
},
165+
{
166+
"description": "Roundtrip with normalized checksum",
167+
"test_group": "base",
168+
"test_type": "roundtrip",
169+
"input": "pkg:generic/bitwarderl?checksum=SHA256:dE4d501267Da",
170+
"expected_output": "pkg:generic/bitwarderl?checksum=sha256:de4d501267da",
171+
"expected_failure": false,
172+
"expected_failure_reason": null
146173
}
147174
]
148175
}

0 commit comments

Comments
 (0)