Improve artifact availability UX
This commit is contained in:
@@ -58,6 +58,27 @@ class URLPolicyTests(unittest.TestCase):
|
||||
with self.assertRaises(StoreClientError):
|
||||
plugin.select_release("4.6.9")
|
||||
|
||||
def test_only_verified_supported_artifacts_are_installable(self):
|
||||
payload, _ = plugin_payload()
|
||||
payload["releases"].append(
|
||||
{
|
||||
"version": "1.3.0",
|
||||
"download_url": "https://store.example/source.tar.gz",
|
||||
"sha256": "b" * 64,
|
||||
"approved": False,
|
||||
"immutable": True,
|
||||
"artifact_kind": "source_archive",
|
||||
"min_netbox_version": "4.6.5",
|
||||
"max_netbox_version": "4.6.8",
|
||||
}
|
||||
)
|
||||
plugin = CatalogPlugin.from_mapping(payload)
|
||||
|
||||
self.assertEqual(
|
||||
tuple(release.version for release in plugin.installable_releases("4.6.8")),
|
||||
("1.2.0",),
|
||||
)
|
||||
|
||||
|
||||
class _Response(io.BytesIO):
|
||||
def __init__(self, body):
|
||||
|
||||
Reference in New Issue
Block a user