Add stable/stein branch support to fedora
Currently fedora only supports master release. Add stein support to retrieve https://trunk.rdoproject.org/fedora28-stein/. Change-Id: Ifbf0050b9899741c11faca22a6071de75fec97ee
This commit is contained in:
parent
a7bc8dc4ab
commit
d12fb5548d
@ -228,8 +228,9 @@ def _remove_existing(args):
|
|||||||
|
|
||||||
def _get_base_path(args):
|
def _get_base_path(args):
|
||||||
if args.branch != 'master':
|
if args.branch != 'master':
|
||||||
if args.distro not in ['centos7']:
|
if args.distro in ['fedora28'] and args.branch != 'stein':
|
||||||
raise InvalidArguments('Branches only suppported with centos7')
|
raise InvalidArguments('Only stable/stein branch is suppported '
|
||||||
|
'with fedora28.')
|
||||||
distro_branch = '%s-%s' % (args.distro, args.branch)
|
distro_branch = '%s-%s' % (args.distro, args.branch)
|
||||||
else:
|
else:
|
||||||
distro_branch = args.distro
|
distro_branch = args.distro
|
||||||
|
@ -130,12 +130,20 @@ class TestTripleORepos(testtools.TestCase):
|
|||||||
path = main._get_base_path(args)
|
path = main._get_base_path(args)
|
||||||
self.assertEqual('http://trunk.rdoproject.org/fedora/', path)
|
self.assertEqual('http://trunk.rdoproject.org/fedora/', path)
|
||||||
|
|
||||||
def test_get_base_path_fedora_branch(self):
|
def test_get_base_path_fedora_unsup_branch(self):
|
||||||
args = mock.Mock()
|
args = mock.Mock()
|
||||||
args.branch = 'rocky'
|
args.branch = 'rocky'
|
||||||
args.distro = 'fedora'
|
args.distro = 'fedora28'
|
||||||
self.assertRaises(main.InvalidArguments, main._get_base_path, args)
|
self.assertRaises(main.InvalidArguments, main._get_base_path, args)
|
||||||
|
|
||||||
|
def test_get_base_path_fedora_sup_branch(self):
|
||||||
|
args = mock.Mock()
|
||||||
|
args.branch = 'stein'
|
||||||
|
args.distro = 'fedora28'
|
||||||
|
args.rdo_mirror = 'http://trunk.rdoproject.org'
|
||||||
|
path = main._get_base_path(args)
|
||||||
|
self.assertEqual('http://trunk.rdoproject.org/fedora28-stein/', path)
|
||||||
|
|
||||||
@mock.patch('subprocess.check_call')
|
@mock.patch('subprocess.check_call')
|
||||||
def test_install_priorities(self, mock_check_call):
|
def test_install_priorities(self, mock_check_call):
|
||||||
main._install_priorities()
|
main._install_priorities()
|
||||||
|
Loading…
Reference in New Issue
Block a user