Public bug reported: We enforce config option type check in oslo.config [1][2]. This leads some unit tests of Keystone failed [3]. There are many types of failure, so use this bug record each type and fix. Should list failure details in order.
[1] https://review.openstack.org/328692 [2] https://review.openstack.org/#/c/455522/ [3] http://logs.openstack.org/periodic/periodic-keystone-py27-with-oslo-master/0868d74/testr_results.html.gz 1. keystone.tests.unit.test_v3_oauth1.MaliciousOAuth1Tests Traceback (most recent call last): File "keystone/tests/unit/test_v3_oauth1.py", line 866, in test_expired_creating_keystone_token self.config_fixture.config(group='oauth1', access_token_duration=-1) File "/home/jenkins/workspace/periodic-keystone-py27-with-oslo-master/.tox/py27-oslo-master/src/oslo.config/oslo_config/fixture.py", line 73, in config self.conf.set_override(k, v, group, enforce_type=enforce_type) File "/home/jenkins/workspace/periodic-keystone-py27-with-oslo-master/.tox/py27-oslo-master/src/debtcollector/debtcollector/removals.py", line 261, in wrapper return f(*args, **kwargs) File "/home/jenkins/workspace/periodic-keystone-py27-with-oslo-master/.tox/py27-oslo-master/src/oslo.config/oslo_config/cfg.py", line 2314, in __inner result = f(self, *args, **kwargs) File "/home/jenkins/workspace/periodic-keystone-py27-with-oslo-master/.tox/py27-oslo-master/src/oslo.config/oslo_config/cfg.py", line 2638, in set_override opt_info['opt'], override, enforce_type) File "/home/jenkins/workspace/periodic-keystone-py27-with-oslo-master/.tox/py27-oslo-master/src/oslo.config/oslo_config/cfg.py", line 2667, in _get_enforced_type_value converted = self._convert_value(value, opt) File "/home/jenkins/workspace/periodic-keystone-py27-with-oslo-master/.tox/py27-oslo-master/src/oslo.config/oslo_config/cfg.py", line 2945, in _convert_value return opt.type(value) File "/home/jenkins/workspace/periodic-keystone-py27-with-oslo-master/.tox/py27-oslo-master/src/oslo.config/oslo_config/types.py", line 287, in __call__ self.min) ValueError: Should be greater than or equal to 0 Traceback (most recent call last): File "keystone/tests/unit/test_v3_oauth1.py", line 842, in test_expired_authorizing_request_token self.config_fixture.config(group='oauth1', request_token_duration=-1) File "/home/jenkins/workspace/periodic-keystone-py27-with-oslo-master/.tox/py27-oslo-master/src/oslo.config/oslo_config/fixture.py", line 73, in config self.conf.set_override(k, v, group, enforce_type=enforce_type) File "/home/jenkins/workspace/periodic-keystone-py27-with-oslo-master/.tox/py27-oslo-master/src/debtcollector/debtcollector/removals.py", line 261, in wrapper return f(*args, **kwargs) File "/home/jenkins/workspace/periodic-keystone-py27-with-oslo-master/.tox/py27-oslo-master/src/oslo.config/oslo_config/cfg.py", line 2314, in __inner result = f(self, *args, **kwargs) File "/home/jenkins/workspace/periodic-keystone-py27-with-oslo-master/.tox/py27-oslo-master/src/oslo.config/oslo_config/cfg.py", line 2638, in set_override opt_info['opt'], override, enforce_type) File "/home/jenkins/workspace/periodic-keystone-py27-with-oslo-master/.tox/py27-oslo-master/src/oslo.config/oslo_config/cfg.py", line 2667, in _get_enforced_type_value converted = self._convert_value(value, opt) File "/home/jenkins/workspace/periodic-keystone-py27-with-oslo-master/.tox/py27-oslo-master/src/oslo.config/oslo_config/cfg.py", line 2945, in _convert_value return opt.type(value) File "/home/jenkins/workspace/periodic-keystone-py27-with-oslo-master/.tox/py27-oslo-master/src/oslo.config/oslo_config/types.py", line 287, in __call__ self.min) ValueError: Should be greater than or equal to 0 ** Affects: keystone Importance: Undecided Status: New -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to OpenStack Identity (keystone). https://bugs.launchpad.net/bugs/1686921 Title: There are wrong unit tests about config option usage Status in OpenStack Identity (keystone): New Bug description: We enforce config option type check in oslo.config [1][2]. This leads some unit tests of Keystone failed [3]. There are many types of failure, so use this bug record each type and fix. Should list failure details in order. [1] https://review.openstack.org/328692 [2] https://review.openstack.org/#/c/455522/ [3] http://logs.openstack.org/periodic/periodic-keystone-py27-with-oslo-master/0868d74/testr_results.html.gz 1. keystone.tests.unit.test_v3_oauth1.MaliciousOAuth1Tests Traceback (most recent call last): File "keystone/tests/unit/test_v3_oauth1.py", line 866, in test_expired_creating_keystone_token self.config_fixture.config(group='oauth1', access_token_duration=-1) File "/home/jenkins/workspace/periodic-keystone-py27-with-oslo-master/.tox/py27-oslo-master/src/oslo.config/oslo_config/fixture.py", line 73, in config self.conf.set_override(k, v, group, enforce_type=enforce_type) File "/home/jenkins/workspace/periodic-keystone-py27-with-oslo-master/.tox/py27-oslo-master/src/debtcollector/debtcollector/removals.py", line 261, in wrapper return f(*args, **kwargs) File "/home/jenkins/workspace/periodic-keystone-py27-with-oslo-master/.tox/py27-oslo-master/src/oslo.config/oslo_config/cfg.py", line 2314, in __inner result = f(self, *args, **kwargs) File "/home/jenkins/workspace/periodic-keystone-py27-with-oslo-master/.tox/py27-oslo-master/src/oslo.config/oslo_config/cfg.py", line 2638, in set_override opt_info['opt'], override, enforce_type) File "/home/jenkins/workspace/periodic-keystone-py27-with-oslo-master/.tox/py27-oslo-master/src/oslo.config/oslo_config/cfg.py", line 2667, in _get_enforced_type_value converted = self._convert_value(value, opt) File "/home/jenkins/workspace/periodic-keystone-py27-with-oslo-master/.tox/py27-oslo-master/src/oslo.config/oslo_config/cfg.py", line 2945, in _convert_value return opt.type(value) File "/home/jenkins/workspace/periodic-keystone-py27-with-oslo-master/.tox/py27-oslo-master/src/oslo.config/oslo_config/types.py", line 287, in __call__ self.min) ValueError: Should be greater than or equal to 0 Traceback (most recent call last): File "keystone/tests/unit/test_v3_oauth1.py", line 842, in test_expired_authorizing_request_token self.config_fixture.config(group='oauth1', request_token_duration=-1) File "/home/jenkins/workspace/periodic-keystone-py27-with-oslo-master/.tox/py27-oslo-master/src/oslo.config/oslo_config/fixture.py", line 73, in config self.conf.set_override(k, v, group, enforce_type=enforce_type) File "/home/jenkins/workspace/periodic-keystone-py27-with-oslo-master/.tox/py27-oslo-master/src/debtcollector/debtcollector/removals.py", line 261, in wrapper return f(*args, **kwargs) File "/home/jenkins/workspace/periodic-keystone-py27-with-oslo-master/.tox/py27-oslo-master/src/oslo.config/oslo_config/cfg.py", line 2314, in __inner result = f(self, *args, **kwargs) File "/home/jenkins/workspace/periodic-keystone-py27-with-oslo-master/.tox/py27-oslo-master/src/oslo.config/oslo_config/cfg.py", line 2638, in set_override opt_info['opt'], override, enforce_type) File "/home/jenkins/workspace/periodic-keystone-py27-with-oslo-master/.tox/py27-oslo-master/src/oslo.config/oslo_config/cfg.py", line 2667, in _get_enforced_type_value converted = self._convert_value(value, opt) File "/home/jenkins/workspace/periodic-keystone-py27-with-oslo-master/.tox/py27-oslo-master/src/oslo.config/oslo_config/cfg.py", line 2945, in _convert_value return opt.type(value) File "/home/jenkins/workspace/periodic-keystone-py27-with-oslo-master/.tox/py27-oslo-master/src/oslo.config/oslo_config/types.py", line 287, in __call__ self.min) ValueError: Should be greater than or equal to 0 To manage notifications about this bug go to: https://bugs.launchpad.net/keystone/+bug/1686921/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : yahoo-eng-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp