Add tests for metapackages and package name globs
This makes sure that depsolving shim installs the shim-* package, and
that depsolving grub2-efi-*-cdboot installs a specific -cdboot package.
Cherry-picked from 47fd6e85b2
Related: rhbz#1791612
This commit is contained in:
parent
14d399fe0c
commit
96c65beb01
@ -179,6 +179,18 @@ class ProjectsTest(unittest.TestCase):
|
|||||||
with self.assertRaises(ProjectsError):
|
with self.assertRaises(ProjectsError):
|
||||||
projects_depsolve(self.dbo, [("nada-package", "*.*")], [])
|
projects_depsolve(self.dbo, [("nada-package", "*.*")], [])
|
||||||
|
|
||||||
|
def test_shim_depsolve(self):
|
||||||
|
"""Test that requesting shim pulls in shim-*"""
|
||||||
|
deps = projects_depsolve(self.dbo, [("shim", "*")], [])
|
||||||
|
self.assertTrue(len(deps) > 0)
|
||||||
|
self.assertTrue(any(True for dep in deps if "shim-" in dep["name"]))
|
||||||
|
|
||||||
|
def test_cdbootglob_depsolve(self):
|
||||||
|
"""Test that requesting grub2-efi-*-cdboot pulls in a cdboot package"""
|
||||||
|
deps = projects_depsolve(self.dbo, [("grub2-efi-*-cdboot", "*")], [])
|
||||||
|
self.assertTrue(len(deps) > 0)
|
||||||
|
self.assertTrue(any(True for dep in deps if "-cdboot" in dep["name"]))
|
||||||
|
|
||||||
def test_modules_list_all(self):
|
def test_modules_list_all(self):
|
||||||
modules = modules_list(self.dbo, None)
|
modules = modules_list(self.dbo, None)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user