diff options
author | xuhaigang <haigang.xu@easystack.cn> | 2017-05-25 14:30:37 +0800 |
---|---|---|
committer | Samuel de Medeiros Queiroz <samueldmq@gmail.com> | 2017-06-04 00:05:32 +0000 |
commit | ba78db0b4b559dcc3b22c37834e430d8b27c45ae (patch) | |
tree | 838ba26aa30482281d86d0d155c8d534b760865e /keystonemiddleware/tests/unit/auth_token | |
parent | e1cd9a47e1db354668319dd4258b031e6577c6dc (diff) | |
download | keystonemiddleware-ba78db0b4b559dcc3b22c37834e430d8b27c45ae.tar.gz |
add a log when the option in conf can't be identitied
When the option is unknown to auth_token and it's value can't be
converted, this patch adds a warning log.
Change-Id: I818708cc19488030b80daa2b01b9f8622632f7eb
Diffstat (limited to 'keystonemiddleware/tests/unit/auth_token')
-rw-r--r-- | keystonemiddleware/tests/unit/auth_token/test_auth_token_middleware.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/keystonemiddleware/tests/unit/auth_token/test_auth_token_middleware.py b/keystonemiddleware/tests/unit/auth_token/test_auth_token_middleware.py index 2165660..1899cb0 100644 --- a/keystonemiddleware/tests/unit/auth_token/test_auth_token_middleware.py +++ b/keystonemiddleware/tests/unit/auth_token/test_auth_token_middleware.py @@ -491,6 +491,14 @@ class GeneralAuthTokenMiddlewareTest(BaseAuthTokenMiddlewareTest, middleware = auth_token.AuthProtocol(self.fake_app, conf) self.assertEqual([servers], middleware._conf.get('memcached_servers')) + def test_conf_values_type_convert_with_wrong_key(self): + conf = { + 'wrong_key': '123' + } + log = 'The option "wrong_key" in conf is not known to auth_token' + auth_token.AuthProtocol(self.fake_app, conf) + self.assertThat(self.logger.output, matchers.Contains(log)) + def test_conf_values_type_convert_with_wrong_value(self): conf = { 'include_service_catalog': '123', |