def test_03_update_osg_release(self): core.state['install.release-updated'] = False if not core.options.updaterelease: return self.skip_bad_unless(core.state['install.success'], 'Install did not succeed') command = ['rpm', '-e', 'osg-release'] core.check_system(command, 'Erase osg-release') self.assert_(re.match('\d+\.\d+', core.options.updaterelease), "Unrecognized updaterelease format") rpm_url = 'https://repo.opensciencegrid.org/osg/' + core.options.updaterelease + '/osg-' + \ core.options.updaterelease + '-el' + str(core.el_release()) + '-release-latest.rpm' command = ['rpm', '-Uvh', rpm_url] core.check_system(command, 'Update osg-release') core.config['yum.clean_repos'] = ['osg'] + core.options.updaterepos yum.clean(*core.config['yum.clean_repos']) # If update repos weren't specified, just use osg-release if not core.options.updaterepos: core.options.updaterepos = ['osg'] core.state['install.release-updated'] = True core.osg_release(update_state=True)
def test_01_downgrade_osg_release(self): if not core.options.updaterelease: return self.skip_bad_unless(core.state['install.release-updated'], 'release not updated') command = ['rpm', '-e', 'osg-release'] core.check_system(command, 'Erase osg-release') rpm_url = 'https://repo.opensciencegrid.org/osg/' + core.config['install.original-release-ver']+ '/osg-' + \ core.config['install.original-release-ver'] + '-el' + str(core.el_release()) + '-release-latest.rpm' command = ['rpm', '-Uvh', rpm_url] core.check_system(command, 'Downgrade osg-release') yum.clean(*core.config['yum.clean_repos'])