summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xsrc/software/test/test_software_identity_file_check.py6
-rw-r--r--src/software/test/util.py2
2 files changed, 6 insertions, 2 deletions
diff --git a/src/software/test/test_software_identity_file_check.py b/src/software/test/test_software_identity_file_check.py
index 49cd97d..3242113 100755
--- a/src/software/test/test_software_identity_file_check.py
+++ b/src/software/test/test_software_identity_file_check.py
@@ -31,6 +31,7 @@ import unittest
import base
import rpmcache
+import util
RE_CHECKSUM = re.compile(r'^([0-9a-fA-F]+)\s+.*')
@@ -396,8 +397,11 @@ class TestSoftwareIdentityFileCheck(
Tests Invoke method invocation.
"""
for pkg in self.dangerous_pkgs:
+ if ( rpmcache.is_pkg_installed(pkg.name)
+ and not util.verify_pkg(pkg.name)):
+ rpmcache.remove_pkg(pkg.name)
if not rpmcache.is_pkg_installed(pkg.name):
- rpmcache.install_pkg(pkg.name)
+ rpmcache.install_pkg(pkg)
for filepath in self.pkgdb_files[pkg.name]:
objpath = self.make_op(pkg, filepath)
diff --git a/src/software/test/util.py b/src/software/test/util.py
index e72add1..6de8169 100644
--- a/src/software/test/util.py
+++ b/src/software/test/util.py
@@ -24,7 +24,7 @@ Common test utilities.
"""
import re
-from subprocess import check_output
+from subprocess import call, check_output
RE_NEVRA = re.compile(
r'^(?P<name>.+)-(?P<evra>(?P<epoch>\d+):(?P<ver>[^-]+)'