summaryrefslogtreecommitdiffstats
path: root/tests/unit/test_cfg.py
diff options
context:
space:
mode:
authorMark McLoughlin <markmc@redhat.com>2012-11-23 08:09:12 +0000
committerMark McLoughlin <markmc@redhat.com>2012-11-26 07:01:36 +0000
commit21e1cd3c01675c2df38f2833ca1ca8edb6d399d1 (patch)
tree11e93ae6850f815274b0470ac3ee6268155adc32 /tests/unit/test_cfg.py
parentf30587718a79755c3b59d9a0b680dd7f971cfdcd (diff)
downloadoslo-21e1cd3c01675c2df38f2833ca1ca8edb6d399d1.tar.gz
oslo-21e1cd3c01675c2df38f2833ca1ca8edb6d399d1.tar.xz
oslo-21e1cd3c01675c2df38f2833ca1ca8edb6d399d1.zip
Fix regression with cfg CLI arguments
Fixes bug #1082279 Only options registered using register_cli_opt() should be available via the CLI, but since e42276a all options are added to the CLI. Also modify one of the existing unit tests to catch this problem. Change-Id: I742a4ae4e0fc17cd9ae5e4424c2edd38e2bc50a2
Diffstat (limited to 'tests/unit/test_cfg.py')
-rw-r--r--tests/unit/test_cfg.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/unit/test_cfg.py b/tests/unit/test_cfg.py
index bd9e914..bff7c2d 100644
--- a/tests/unit/test_cfg.py
+++ b/tests/unit/test_cfg.py
@@ -1357,6 +1357,8 @@ class SadPathTestCase(BaseTestCase):
self.conf.register_cli_opt, StrOpt('foo'))
def test_bad_cli_arg(self):
+ self.conf.register_opt(BoolOpt('foo'))
+
self.stubs.Set(sys, 'stderr', StringIO.StringIO())
self.assertRaises(SystemExit, self.conf, ['--foo'])