[pkgset] Simplify finding RPM in koji buildroot
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
parent
0c8eb6c0fb
commit
d7012c442a
2 changed files with 35 additions and 19 deletions
|
|
@ -225,6 +225,32 @@ class TestKojiPkgset(PkgsetCompareMixin, helpers.PungiTestCase):
|
|||
{'x86_64': ['rpms/bash-debuginfo@4.3.42@4.fc24@x86_64',
|
||||
'signed/cafebabe/bash@4.3.42@4.fc24@x86_64']})
|
||||
|
||||
def test_can_not_find_signed_package(self):
|
||||
pkgset = pkgsets.KojiPackageSet(self.koji_wrapper, ['cafebabe'], arches=['x86_64'])
|
||||
|
||||
with self.assertRaises(RuntimeError) as ctx:
|
||||
pkgset.populate('f25')
|
||||
|
||||
self.assertEqual(
|
||||
self.koji_wrapper.koji_proxy.mock_calls,
|
||||
[mock.call.listTaggedRPMS('f25', event=None, inherit=True, latest=True)])
|
||||
|
||||
self.assertRegexpMatches(str(ctx.exception),
|
||||
r'^RPM .+ not found for sigs: .+ Paths checked: .+$')
|
||||
|
||||
def test_can_not_find_any_package(self):
|
||||
pkgset = pkgsets.KojiPackageSet(self.koji_wrapper, ['cafebabe', None], arches=['x86_64'])
|
||||
|
||||
with self.assertRaises(RuntimeError) as ctx:
|
||||
pkgset.populate('f25')
|
||||
|
||||
self.assertEqual(
|
||||
self.koji_wrapper.koji_proxy.mock_calls,
|
||||
[mock.call.listTaggedRPMS('f25', event=None, inherit=True, latest=True)])
|
||||
|
||||
self.assertRegexpMatches(str(ctx.exception),
|
||||
r'^RPM .+ not found for sigs: .+ Paths checked: .+$')
|
||||
|
||||
|
||||
@mock.patch('kobo.pkgset.FileCache', new=MockFileCache)
|
||||
class TestMergePackageSets(PkgsetCompareMixin, unittest.TestCase):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue