@unittest.expectedFailure def test07_MPP_15789(self): """ This test covers the case of obsolete dependencies. When we update a gppkg and the new gppkg has different dependencies from the original gppkg, the dependencies of the original gppkg will get left behind. When we remove the gppkg, only the newer dependencies will be removed and the old ones will still remain on the system. """ update_gppkg_spec = GppkgSpec("alpha", "1.1") A_spec = RPMSpec("A", "2", "1", ["B = 1-1"]) B_spec = self.B_spec self.build(update_gppkg_spec, A_spec, [B_spec]) self.install(self.alpha_spec.get_filename()) self.update(update_gppkg_spec.get_filename()) self.remove(update_gppkg_spec.get_filename()) results = run_command("rpm -qa --dbpath %s" % RPM_DATABASE) self.assertEqual(results, "") if __name__ == "__main__": unittest.main()
self.install(gppkg_file) @unittest.expectedFailure def test05_install_rpm_on_standby_and_uninstall(self): gppkg_file = self.alpha_spec.get_filename() standby = get_host_list()[0] #Install the rpm with closing(tarfile.open(self.alpha_spec.get_filename())) as tf: tf.extract(self.A_spec.get_filename()) Scp(name="copy rpm to standby", srcFile=self.A_spec.get_filename(), dstFile=self.A_spec.get_filename(), srcHost=None, dstHost=standby).run(validateAfter=True) self.install_rpm_remotely(self.A_spec.get_filename(), standby) try: self.remove(gppkg_file) except ExecutionError as e: self.uninstall_rpm_remotely(self.A_spec.get_filename(), standby) os.remove(self.A_spec.get_filename()) RemoveRemoteFile(self.A_spec.get_filename(), standby).run() self.fail("ExecutionError %s" % e) if __name__ == "__main__": unittest.main()