Hi ALL,

oslo_config provides method CONF.set_override[1] , developers usually use
it to change config option's value in tests. That's convenient . By
default  parameter enforce_type=False,  it doesn't check any type or value
of override. If set enforce_type=True , will check parameter override's
type and value.  In production code(running time code),  oslo_config
always checks  config option's value. In short, we test and run code in
different ways. so there's  gap:  config option with wrong type or invalid
value can pass tests when
parameter enforce_type = False in consuming projects.  that means some
invalid or wrong tests are in our code base.


We began to warn user about the change since Sep, 2016 in [2]. This change
will notify consuming project to write correct test cases with config
options.
We would make enforce_type = true by default in [3], that may break some
projects' tests, that's also raise wrong unit tests. The failure is easy to
fix, which
is recommended.


[1]
https://github.com/openstack/oslo.config/blob/efb287a94645b15b634e8c344352696ff85c219f/oslo_config/cfg.py#L2613
[2] https://review.openstack.org/#/c/365476/
[3] https://review.openstack.org/328692

-- 
ChangBo Guo(gcb)
__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

Reply via email to