From b78dc19d9b47f3347a99394ee839c02f5127a986 Mon Sep 17 00:00:00 2001 From: Jamie Lennox Date: Fri, 31 Oct 2014 13:58:39 +0100 Subject: Take plugin params from ENV rather than default The way the argparse options were being structured, if there was a default value set on the option it would use this value as the default and not check the environment variables. This is wrong, we expect the environment variables to be used and the default value to be the final fallback. Change-Id: Ifbd68c9de329c2e0c70824ba873caa579e8e86d0 Closes-Bug: #1388076 --- keystoneclient/tests/auth/utils.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'keystoneclient/tests/auth/utils.py') diff --git a/keystoneclient/tests/auth/utils.py b/keystoneclient/tests/auth/utils.py index c3dae8f..cfca379 100644 --- a/keystoneclient/tests/auth/utils.py +++ b/keystoneclient/tests/auth/utils.py @@ -30,6 +30,8 @@ class MockPlugin(base.BaseAuthPlugin): INT_DESC = 'test int' FLOAT_DESC = 'test float' BOOL_DESC = 'test bool' + STR_DESC = 'test str' + STR_DEFAULT = uuid.uuid4().hex def __init__(self, **kwargs): self._data = kwargs @@ -49,6 +51,7 @@ class MockPlugin(base.BaseAuthPlugin): cfg.IntOpt('a-int', default='3', help=cls.INT_DESC), cfg.BoolOpt('a-bool', help=cls.BOOL_DESC), cfg.FloatOpt('a-float', help=cls.FLOAT_DESC), + cfg.StrOpt('a-str', help=cls.STR_DESC, default=cls.STR_DEFAULT), ] -- cgit v1.2.1