Reviewed:  https://review.openstack.org/262879
Committed: 
https://git.openstack.org/cgit/openstack/rally/commit/?id=dfd736309208d6d8bd15c235eb7b2cc528c33760
Submitter: Jenkins
Branch:    master

commit dfd736309208d6d8bd15c235eb7b2cc528c33760
Author: LiuNanke <nanke....@easystack.cn>
Date:   Sat Jan 2 03:05:13 2016 +0800

    test: make enforce_type=True in CONF.set_override
    
    Each config option has limitation for type and value.
    In production code, oslo.conf can ensure user's input
    is valid, but in unit test, test methods can pass if
    we use method CONF.set_override without parameter
    enforce_type=True even we pass wrong type or wrong
    value to config option. This commit makes sure calling
    method CONF.set_override with enforce_type=True,
    
    Change-Id: Ib22685902103d2a2b9f032a25de19e92b40e8154
    Closes-Bug: #1517839


** Changed in: rally
       Status: Triaged => Fix Released

-- 
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/1517839

Title:
  Make CONF.set_override with paramter enforce_type=True by default

Status in OpenStack Identity (keystone):
  Fix Released
Status in oslo.config:
  New
Status in Rally:
  Fix Released

Bug description:
  1. Problems :
     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.
     There is nova POC result when I enable "enforce_type=true" [2],  and I 
must fix them in [3]

     [1] 
https://github.com/openstack/oslo.config/blob/master/oslo_config/cfg.py#L2173
     [2] 
http://logs.openstack.org/16/242416/1/check/gate-nova-python27/97b5eff/testr_results.html.gz
     [3]  https://review.openstack.org/#/c/242416/  
https://review.openstack.org/#/c/242717/  
https://review.openstack.org/#/c/243061/

  2. Proposal 
     1) Make  method CONF.set_override with  enforce_type=True  in consuming 
projects. and  fix violations when  enforce_type=True in each project.

    2) Make  method CONF.set_override with  enforce_type=True by default
  in oslo_config

     Hope some one from consuming projects can help make
  enforce_type=True in consuming projects and fix violations,

     You can find more details and comments  in
  https://etherpad.openstack.org/p/enforce_type_true_by_default

To manage notifications about this bug go to:
https://bugs.launchpad.net/keystone/+bug/1517839/+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

Reply via email to