Skip to content

Commit 9edac14

Browse files
committed
Update tests
Signed-off-by: Tushar Goel <tushar.goel.dav@gmail.com>
1 parent f3cc7ae commit 9edac14

5 files changed

Lines changed: 29 additions & 5 deletions

File tree

tests/types/gem-test.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,12 @@
167167
"test_group": "base",
168168
"test_type": "validation",
169169
"input": "pkg:gem/sinatra@3.1.2?unknown=value",
170-
"expected_output": []
170+
"expected_output": [
171+
{
172+
"severity": "info",
173+
"message": "Invalid qualifiers found: unknown. Allowed qualifiers are: platform, repository_url"
174+
}
175+
]
171176
},
172177
{
173178
"description": "Extra unknown qualifier",

tests/types/generic-test.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,11 +149,16 @@
149149
"expected_output": []
150150
},
151151
{
152-
"description": "Valid generic package with vcs_url",
152+
"description": "generic package with vcs_url",
153153
"test_group": "base",
154154
"test_type": "validation",
155155
"input": "pkg:generic/bitwarderl?vcs_url=git+https://git.fsfe.org/dxtr/bitwarderl@cc55108da32",
156-
"expected_output": []
156+
"expected_output": [
157+
{
158+
"level": "info",
159+
"message": "Invalid qualifiers found: vcs_url. Allowed qualifiers are: checksum, download_url"
160+
}
161+
]
157162
},
158163
{
159164
"description": "Extra unknown qualifier",

tests/types/luarocks-test.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,12 @@
154154
"test_group": "base",
155155
"test_type": "validation",
156156
"input": "pkg:luarocks/username/packagename@0.1.0-1?channel=beta",
157-
"expected_output": []
157+
"expected_output": [
158+
{
159+
"level": "info",
160+
"message": "Invalid qualifiers found: channel. Allowed qualifiers are: repository_url"
161+
}
162+
]
158163
},
159164
{
160165
"description": "Advanced validation for name with uppercase letters",

tests/types/mlflow-test.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,12 @@
306306
"test_group": "base",
307307
"test_type": "validation",
308308
"input": "pkg:mlflow/creditfraud@3?foo=bar",
309-
"expected_output": []
309+
"expected_output": [
310+
{
311+
"severity": "info",
312+
"message": "Invalid qualifiers found: foo. Allowed qualifiers are: model_uuid, repository_url, run_id"
313+
}
314+
]
310315
}
311316
]
312317
}

tests/types/rpm-test.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,10 @@
176176
{
177177
"severity": "error",
178178
"message": "Namespace is required for purl type: 'rpm'"
179+
},
180+
{
181+
"severity": "info",
182+
"message": "Invalid qualifiers found: distro. Allowed qualifiers are: arch, epoch, repository_url"
179183
}
180184
]
181185
},

0 commit comments

Comments
 (0)