def copy_postupgrade_files(self): """ Function copies postupgrade scripts and creates hash postupgrade file. """ # Copy postupgrade.d special files PostupgradeHelper.special_postupgrade_scripts(self.conf.assessment_results_dir) PostupgradeHelper.hash_postupgrade_file(self.conf.verbose, self.get_postupgrade_dir())
def test_hashes(self): text_to_hash=""" This is preupgrade assistant test has string" """ self.dir_name = "tests/hashes" os.mkdir(self.dir_name) FileHelper.write_to_file(os.path.join(self.dir_name, "post_script"), 'wb', text_to_hash) PostupgradeHelper.hash_postupgrade_file(False, self.dir_name) return_value = PostupgradeHelper.hash_postupgrade_file(False, self.dir_name, check=True) self.assertTrue(return_value)
def finalize_xml_files(self): """ Function copies postupgrade scripts and creates hash postupgrade file. It finds solution files and update XML file. """ # Copy postupgrade.d special files PostupgradeHelper.special_postupgrade_scripts(self.conf.assessment_results_dir) PostupgradeHelper.hash_postupgrade_file(self.conf.verbose, self.get_postupgrade_dir()) solution_files = self.report_parser.get_solution_files() for report in self._get_reports(): self.xml_mgr.find_solution_files(report.split('.')[0], solution_files)
def finalize_xml_files(self): """ Function copies postupgrade scripts and creates hash postupgrade file. It finds solution files and update XML file. """ # Copy postupgrade.d special files PostupgradeHelper.special_postupgrade_scripts( self.conf.assessment_results_dir) PostupgradeHelper.hash_postupgrade_file(self.conf.verbose, self.get_postupgrade_dir()) solution_files = self.report_parser.get_solution_files() for report in self._get_reports(): self.xml_mgr.find_solution_files( report.split('.')[0], solution_files)