--adjust-repos and --no-adjust-repos were not in a mutex group.
Fix that.
Also --repo will always install a new repo file, regardless of
--[no]-adjust-repos, so it might as well be in the same mutex
group.
Signed-off-by: Travis Rhoden <trhoden@redhat.com>
help='install all ceph components (e.g. mon,osd,mds,rgw). This is the default',
)
- parser.add_argument(
+ repo = parser.add_mutually_exclusive_group()
+
+ repo.add_argument(
'--adjust-repos',
dest='adjust_repos',
action='store_true',
help='install packages modifying source repos',
)
- parser.add_argument(
+ repo.add_argument(
'--no-adjust-repos',
dest='adjust_repos',
action='store_false',
help='install packages without modifying source repos',
)
- parser.add_argument(
+ repo.add_argument(
'--repo',
action='store_true',
help='install repo files only (skips package installation)',
- )
+ )
+
+ repo.set_defaults(
+ adjust_repos=True,
+ )
parser.add_argument(
'host',
parser.set_defaults(
func=install,
- adjust_repos=True,
)
args = self.parser.parse_args(('install --%s host1' % comp).split())
assert getattr(args, 'install_%s' % comp) is True
- @pytest.mark.skipif(reason="http://tracker.ceph.com/issues/12147")
def test_install_multi_component(self):
args = self.parser.parse_args(('install --mon --rgw host1').split())
assert args.install_mon
args = self.parser.parse_args('install --no-adjust-repos host1'.split())
assert not args.adjust_repos
- @pytest.mark.skipif(reason="http://tracker.ceph.com/issues/12147")
def test_install_adjust_repos_false_with_custom_release(self):
args = self.parser.parse_args('install --release firefly --no-adjust-repos host1'.split())
assert args.release == "firefly"