From a5b709edca5ca88f6711da6ad7cb574e7d052c7c Mon Sep 17 00:00:00 2001 From: Tim Rozet Date: Wed, 14 Nov 2018 16:42:34 -0500 Subject: [PATCH] Removes checks for branch and current-tripleo/dev In Rocky and Queens current-tripleo and current branches exist, so there is no reason not to allow installing those repos. Change-Id: I9dd7dc0408005c0c9f3df73a7fb57754620096ff Signed-off-by: Tim Rozet --- tripleo_repos/main.py | 14 -------------- tripleo_repos/tests/test_main.py | 12 ------------ 2 files changed, 26 deletions(-) diff --git a/tripleo_repos/main.py b/tripleo_repos/main.py index f9c0213..9fcdcb9 100755 --- a/tripleo_repos/main.py +++ b/tripleo_repos/main.py @@ -150,22 +150,8 @@ def _validate_current_tripleo(repos): return True -def _validate_branch_repos(branch, repos): - """Validate branch and repo combinations - - current-tripleo-dev and current-tripleo are master only - """ - if branch == 'master': - return True - if 'current-tripleo-dev' in repos or 'current-tripleo' in repos: - raise InvalidArguments('Cannot use current-tripleo on any branch ' - 'except master') - return True - - def _validate_args(args): _validate_current_tripleo(args.repos) - _validate_branch_repos(args.branch, args.repos) if args.distro not in ['centos7', 'fedora']: raise InvalidArguments('centos7 or fedora is the only supported ' 'distros at this time') diff --git a/tripleo_repos/tests/test_main.py b/tripleo_repos/tests/test_main.py index 069ea95..259a0c7 100644 --- a/tripleo_repos/tests/test_main.py +++ b/tripleo_repos/tests/test_main.py @@ -457,12 +457,6 @@ class TestValidate(testtools.TestCase): self.assertRaises(main.InvalidArguments, main._validate_args, self.args) - def test_branch_and_tripleo_dev(self): - self.args.repos = ['current-tripleo-dev'] - self.args.branch = 'liberty' - self.assertRaises(main.InvalidArguments, main._validate_args, - self.args) - def test_current_and_tripleo(self): self.args.repos = ['current', 'current-tripleo'] self.assertRaises(main.InvalidArguments, main._validate_args, @@ -472,12 +466,6 @@ class TestValidate(testtools.TestCase): self.args.repos = ['deps', 'current-tripleo'] main._validate_args(self.args) - def test_branch_and_tripleo(self): - self.args.repos = ['current-tripleo'] - self.args.branch = 'liberty' - self.assertRaises(main.InvalidArguments, main._validate_args, - self.args) - def test_invalid_distro(self): self.args.distro = 'Jigawatts 1.21' self.assertRaises(main.InvalidArguments, main._validate_args,