def setUp(self): self.rpm_path = "/usr/bin/rpm" self.dbpath = "/var/lib/rpm" self.recover_path = "/usr/bin/db_recover" self.verify_path = "/usr/bin/db_verify" self.stat_path = "/usr/bin/db_stat" self.yum_complete_transaction_path = "/usr/bin/yum-complete-transaction" self.blacklist = ["table1", "table2"] self.forensic = (False, ) self.rpmutil = rpmutil.RPMUtil( dbpath=self.dbpath, rpm_path=self.rpm_path, recover_path=self.recover_path, verify_path=self.verify_path, stat_path=self.stat_path, yum_complete_transaction_path=self.yum_complete_transaction_path, blacklist=self.blacklist, forensic=self.forensic, ) self.rpmutil.tables = [ "/var/lib/rpm/table0", "/var/lib/rpm/table1", "/var/lib/rpm/table2", "/var/lib/rpm/table3", ]
def setUp(self): # type: () -> None super(TestRPMUtil, self).setUp() self.rpm_path = "/usr/bin/rpm" # type: str self.dbpath = "/var/lib/rpm" # type: str self.recover_path = "/usr/bin/db_recover" # type: str self.verify_path = "/usr/bin/db_verify" # type: str self.stat_path = "/usr/bin/db_stat" # type: str self.yum_complete_transaction_path = ( "/usr/bin/yum-complete-transaction") # type: str self.blacklist = ["table1", "table2"] # type: t.List[str] self.forensic = False # type: bool self.rpmutil = rpmutil.RPMUtil( dbpath=self.dbpath, rpm_path=self.rpm_path, recover_path=self.recover_path, verify_path=self.verify_path, stat_path=self.stat_path, yum_complete_transaction_path=self.yum_complete_transaction_path, blacklist=self.blacklist, forensic=self.forensic, ) # type: rpmutil.RPMUtil self.rpmutil.tables = [ "/var/lib/rpm/table0", "/var/lib/rpm/table1", "/var/lib/rpm/table2", "/var/lib/rpm/table3", ]
def setUp(self): # type: () -> None super(TestDcRPM, self).setUp() self.rpm_path = util.which("rpm") # type: str self.dbpath = "/var/lib/rpm" # type: str self.recover_path = util.which("db_recover") # type: str self.verify_path = util.which("db_verify") # type: str self.stat_path = util.which("db_stat") # type: str self.yum_complete_transaction_path = ( "/usr/bin/yum-complete-transaction" ) # type: str self.blacklist = ["table1", "table2"] # type: t.List[str] self.rpmutil = rpmutil.RPMUtil( dbpath=self.dbpath, rpm_path=self.rpm_path, recover_path=self.recover_path, verify_path=self.verify_path, stat_path=self.stat_path, yum_complete_transaction_path=self.yum_complete_transaction_path, blacklist=self.blacklist, forensic=False, ) # type: rpmutil.RPMUtil self.rpmutil.tables = ["table0", "table1", "table2", "table3"] # Args self.args = argparse.Namespace( dry_run=False, check_stuck_yum=True, rpm_path=self.rpm_path, recover_path=self.recover_path, verify_path=self.verify_path, stat_path=self.stat_path, clean_yum_transactions=False, yum_complete_transaction_path=self.yum_complete_transaction_path, dbpath=self.dbpath, run_yum_clean=False, run_yum_check=False, max_passes=5, minspace=150 * 1048576, verbose=False, logfile="/var/log/blah.log", blacklist=["table2", "table3"], forensic=False, ) # type: argparse.Namespace # DcRPM self.dcrpm = dcrpm.DcRPM(self.rpmutil, self.args) # type: dcrpm.DcRPM
def setUp(self): self.rpmpath = rpmutil.RPM_PATH self.dbpath = '/var/lib/rpm' self.recover_path = '/opt/yum/bin/db48_recover' self.verify_path = '/opt/yum/bin/db48_verify' self.yum_complete_transaction_path = \ '/opt/yum/bin/yum-complete-transaction' self.blacklist = [ 'table1', 'table2', ] self.rpmutil = rpmutil.RPMUtil( dbpath=self.dbpath, recover_path=self.recover_path, verify_path=self.verify_path, yum_complete_transaction_path=self.yum_complete_transaction_path, blacklist=self.blacklist, ) self.rpmutil.tables = [ '/var/lib/rpm/table0', '/var/lib/rpm/table1', '/var/lib/rpm/table2', '/var/lib/rpm/table3', ]