Gusto / it-cpe-opensource

Tools used by the CPE team at Gusto to manage our endpoints and software deployment systems.
Other
59 stars 29 forks source link

Added support for name-version denial #52

Closed rorymurdock closed 3 years ago

rorymurdock commented 3 years ago

adding a package name-version into the denylist will stop it from being autopromoted #51

"denylist": ["Zoom-5.5.12513.0205"]

Test specific version deny

>>> name = "Zoom"
>>> fullname = "Zoom"
>>> version = "5.5.12513.0205"
>>> allowlist = ["Spotify"]
>>> denylist = ["Zoom-5.5.12513.0205"]
>>> test_matching()
Skipping Zoom-5.5.12513.0205: excluded by denylist
(False, {'plist': {}, 'from': None, 'to': None, 'fullname': 'fullname'})

Test allowlist different package

>>> name = "Spotify"
>>> version = "1.0.0"
>>> allowlist = ["Spotify"]
>>> denylist = ["Zoom-5.5.12513.0205"]
>>> test_matching()
No skip

Test same package new version

>>> name = "Zoom"
>>> version = "5.5.12513.99999"
>>> denylist = ["Zoom-5.5.12513.0205"]
>>> test_matching()
No skip

~Also fixes the bug where a non empty allowlist skips all promotions~