def test07_delete_package_from_archive_on_segment_and_uninstall(self):
        """
        Delete a package from the archive on the segment
        and try to uninstall the gppkg.
        """
        gppkg_file = self.alpha_spec.get_filename()
        archive_file = os.path.join(ARCHIVE_PATH, gppkg_file)
        self.install(gppkg_file)

        #Remove package from archive
        segment_host_list = get_host_list()[1]
        self.assertTrue(len(segment_host_list) > 0)
        host = segment_host_list[0]
        RemoveRemoteFile(archive_file, host).run()

        try:
            self.remove(gppkg_file)
        except ExecutionError as e:
            GpScp(source_path=gppkg_file,
                  target_path=archive_file,
                  host_list=segment_host_list).run()
            self.fail("ExecutionError %s" % str(e))
    def test01_delete_package_from_archive_on_standby_and_uninstall(self):
        """
            Known issue: MPP-15737
        """
        gppkg_file = self.alpha_spec.get_filename()
        archive_file = os.path.join(ARCHIVE_PATH, gppkg_file)
        self.install(gppkg_file)

        #Remove package from standby
        standby = get_host_list()[0]
        RemoveRemoteFile(os.path.join(ARCHIVE_PATH, gppkg_file), standby).run()

        try:
            self.remove(gppkg_file)
        except ExecutionError as e:
            GpScp(source_path=gppkg_file,
                  target_path=archive_file,
                  host_list=get_host_list()[1]).run()
            Scp(name="copy gppkg to standby",
                srcFile=gppkg_file,
                dstFile=archive_file,
                srcHost=None,
                dstHost=standby).run(validateAfter=True)
            self.fail("ExecutionError %s" % e)