tests: better handle templates with no 'createrepo' installed
This commit is contained in:
parent
44c340c046
commit
31ad72aa70
@ -179,8 +179,12 @@ Test package
|
|||||||
p.stdin.close()
|
p.stdin.close()
|
||||||
p.wait()
|
p.wait()
|
||||||
retcode = self.updatevm.run('cd /tmp/repo; createrepo .', wait=True)
|
retcode = self.updatevm.run('cd /tmp/repo; createrepo .', wait=True)
|
||||||
if retcode != 0:
|
if retcode == 127:
|
||||||
raise RuntimeError("createrepo failed, cannot perform test")
|
self.skipTest("createrepo not installed in template {}".format(
|
||||||
|
self.template))
|
||||||
|
elif retcode != 0:
|
||||||
|
self.skipTest("createrepo failed with code {}, cannot perform the "
|
||||||
|
"test".format(retcode))
|
||||||
|
|
||||||
def test_000_update(self):
|
def test_000_update(self):
|
||||||
filename = self.create_pkg(self.tmpdir, self.pkg_name, '1.0')
|
filename = self.create_pkg(self.tmpdir, self.pkg_name, '1.0')
|
||||||
|
Loading…
Reference in New Issue
Block a user