Merge "Fix paths to updates and security repositories According to a new scheme of repos"

This commit is contained in:
Jenkins 2015-08-13 16:06:01 +00:00 committed by Gerrit Code Review
commit 0089f1ba17
3 changed files with 17 additions and 14 deletions

View File

@ -604,15 +604,17 @@ def config(update_path, admin_password):
master_node_repos = [
{
'name': 'mos{0}-updates'.format(new_version),
'baseurl': 'http://mirror.fuel-infra.org/mos/centos-6/'
'mos{0}/updates/'.format(new_version),
'baseurl': 'http://mirror.fuel-infra.org/mos-repos/'
'centos/mos{0}-centos6-fuel/updates/'
'x86_64/'.format(new_version),
'gpgcheck': 0,
'skip_if_unavailable': 1,
},
{
'name': 'mos{0}-security'.format(new_version),
'baseurl': 'http://mirror.fuel-infra.org/mos/centos-6/'
'mos{0}/security/'.format(new_version),
'baseurl': 'http://mirror.fuel-infra.org/mos-repos/'
'centos/mos{0}-centos6-fuel/security/'
'x86_64/'.format(new_version),
'gpgcheck': 0,
'skip_if_unavailable': 1,
}

View File

@ -191,8 +191,8 @@ class TestUpgradeManager(BaseTestCase):
'/etc/yum.repos.d/mos9999-updates.repo',
{
'name': 'mos9999-updates',
'baseurl': 'http://mirror.fuel-infra.org/mos/centos-6/'
'mos9999/updates/',
'baseurl': 'http://mirror.fuel-infra.org/mos-repos/'
'centos/mos9999-centos6-fuel/updates/x86_64/',
'gpgcheck': 0,
'skip_if_unavailable': 1,
}),
@ -201,8 +201,8 @@ class TestUpgradeManager(BaseTestCase):
'/etc/yum.repos.d/mos9999-security.repo',
{
'name': 'mos9999-security',
'baseurl': 'http://mirror.fuel-infra.org/mos/centos-6/'
'mos9999/security/',
'baseurl': 'http://mirror.fuel-infra.org/mos-repos/'
'centos/mos9999-centos6-fuel/security/x86_64/',
'gpgcheck': 0,
'skip_if_unavailable': 1,
}),

View File

@ -577,17 +577,18 @@ class TestUtils(BaseTestCase):
mopen = mock.mock_open(read_data=template)
with mock.patch('__builtin__.open', mopen, create=True):
utils.render_template_to_file('mocked', 'mocked', {
'name': 'mos6.1-updates',
'baseurl': 'http://mirror.fuel-infra.org/mos/centos-6/'
'mos6.1/updates/',
'name': 'mos7.0-updates',
'baseurl': 'http://mirror.fuel-infra.org/mos-repos/centos/'
'mos7.0-centos6-fuel/updates/x86_64/',
'gpgcheck': 0,
'skip_if_unavailable': 1,
})
mopen().write.assert_called_once(textwrap.dedent('''\
[mos6.1-updates]
name=mos6.1-updates
baseurl=http://mirror.fuel-infra.org/mos/centos-6/mos6.1/updates/
[mos7.0-updates]
name=mos7.0-updates
baseurl=http://mirror.fuel-infra.org/mos-repos\
/centos/mos7.0-centos6-fuel/updates/x86_64/
gpgcheck=0
skip_if_unavailable=1
'''))