There are wrong unit tests about config option usage

Bug #1686921 reported by ChangBo Guo(gcb)
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
Medium
ChangBo Guo(gcb)
description: updated
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to keystone (master)

Fix proposed to branch: master
Review: https://review.openstack.org/460873

Changed in keystone:
assignee: nobody → ChangBo Guo(gcb) (glongwave)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/460879

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/461271

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/461273

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/461275

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/461279

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/461819

Changed in keystone:
assignee: ChangBo Guo(gcb) (glongwave) → Lance Bragstad (lbragstad)
Changed in keystone:
assignee: Lance Bragstad (lbragstad) → ChangBo Guo(gcb) (glongwave)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/462001

Changed in keystone:
assignee: ChangBo Guo(gcb) (glongwave) → Lance Bragstad (lbragstad)
Changed in keystone:
assignee: Lance Bragstad (lbragstad) → ChangBo Guo(gcb) (glongwave)
Revision history for this message
Lance Bragstad (lbragstad) wrote :

Setting the priority here to medium since the a fix is required in order to move to a new version of oslo.config.

Changed in keystone:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to keystone (master)

Reviewed: https://review.openstack.org/461275
Committed: https://git.openstack.org/cgit/openstack/keystone/commit/?id=def28347e99c26caad90659e9882f859ef98d516
Submitter: Jenkins
Branch: master

commit def28347e99c26caad90659e9882f859ef98d516
Author: ChangBo Guo(gcb) <email address hidden>
Date: Sun Apr 30 21:08:25 2017 +0800

    Fix test keystone.tests.unit.test_token_bind.BindTest

    [token] enforce_token_bind option was deprecated for removal, and
    the 'bind' option doesn't enforce a set of choices. I think the better
    option here would be to remove the choices field and let the backend
    enforce correctness.

    Partial-Bug: #1686921
    Change-Id: If0a537237a477303c0ce84945d83ce440f4d7812

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/460873
Committed: https://git.openstack.org/cgit/openstack/keystone/commit/?id=5da589a8f68a0edee5a41b377b59d5f8c987ed0f
Submitter: Jenkins
Branch: master

commit 5da589a8f68a0edee5a41b377b59d5f8c987ed0f
Author: ChangBo Guo(gcb) <email address hidden>
Date: Fri Apr 28 16:22:10 2017 +0800

    Remove test_metadata_invalid_contact_type

    oslo.config will ensure option [saml]/idp_contact_type with parameter
    choices only allow values in ('technical', 'support', 'administrative',
    'billing', 'other') in runtime, so don't need test in KeyStone.
    This commit also remove check code for the option.

    Partial-Bug: #1686921
    Related-Bug: #1517839

    Change-Id: I0c78a25a353d04dbe46e9679771c51b22b677a27

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/461273
Committed: https://git.openstack.org/cgit/openstack/keystone/commit/?id=929c743da044e51fe698dd777c32e86aa3282555
Submitter: Jenkins
Branch: master

commit 929c743da044e51fe698dd777c32e86aa3282555
Author: ChangBo Guo(gcb) <email address hidden>
Date: Sun Apr 30 20:38:55 2017 +0800

    Fix keystone.tests.unit.test_backend_ldap.LDAPIdentity

    * Config option [ldap]/alias_dereferencing only allows value in
      [never, searching, always, finding, default], oslo.config will
      ensure that, so don't need test the case.

    * Config option [ldap]/query_scope only allows value in [one, sub],
      oslo.config will ensure that, so don't need test the case.

    Partial-Bug: #1686921

    Change-Id: Ie262acd0386318ff5f818f8688bdbb40f4939360

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/461271
Committed: https://git.openstack.org/cgit/openstack/keystone/commit/?id=3032925585bb507567156d70ce889ba675d0f362
Submitter: Jenkins
Branch: master

commit 3032925585bb507567156d70ce889ba675d0f362
Author: ChangBo Guo(gcb) <email address hidden>
Date: Sun Apr 30 20:33:01 2017 +0800

    override config option notification_opt_out with list

    Config option 'notification_opt_out' is MultiStrOpt, which expects
    a list type of value, this commit ensures we use list type in tests.

    Partial-Bug: #1686921
    Change-Id: I7c69bf6390218f46c131b0f3f0f04c2976852840

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/460879
Committed: https://git.openstack.org/cgit/openstack/keystone/commit/?id=d0a6511819e3f62ec1cb5e37fd7f0af658645f68
Submitter: Jenkins
Branch: master

commit d0a6511819e3f62ec1cb5e37fd7f0af658645f68
Author: ChangBo Guo(gcb) <email address hidden>
Date: Wed May 3 09:56:37 2017 +0800

    Fix test_minimum_password_age_and_password_expires_days_deactivated

    The [security_compliance]password_expires_days option allows minimum
    value 1, it's default value None means the feature is disabled,
    so don't need override its value in test.

    Partial-Bug: #1686921
    Change-Id: I288f1a2437f26d8cc06803482d03cbb9042df189

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/461279
Committed: https://git.openstack.org/cgit/openstack/keystone/commit/?id=f348895f8e8183575e2dea851d5dce5b863da11b
Submitter: Jenkins
Branch: master

commit f348895f8e8183575e2dea851d5dce5b863da11b
Author: ChangBo Guo(gcb) <email address hidden>
Date: Sun Apr 30 21:53:51 2017 +0800

    Fix keystone.tests.unit.test_v3_oauth1.MaliciousOAuth1Tests

    Config options 'access_token_duration' and 'request_token_duration' only
    allow value >= 0, so override with value 1 and use freezegun to wait
    token to be expired. This commit also enhance condition check for these
    two options.

    Partial-Bug: #1686921
    Change-Id: I65306b9fc5eec6b8146ba5130f7d6e6cb229810e

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/462001
Committed: https://git.openstack.org/cgit/openstack/keystone/commit/?id=4f19147c5aa7112e5e3a840f0b91f1b378f79378
Submitter: Jenkins
Branch: master

commit 4f19147c5aa7112e5e3a840f0b91f1b378f79378
Author: ChangBo Guo(gcb) <email address hidden>
Date: Wed May 3 14:05:21 2017 +0800

    Test config option 'user_enabled_default' with string type value

    The [ldap] user_enabled_default option is StrOpt, that means
    CONF.ldap.user_enabled_default always returns string, oslo.config
    will ensure that. There are 3 kinds of values: string a which can
    be converted to integer, string b which b.lower() equals 'true' and
    string c which c.lower() doesn't equal 'true'. So we just test
    string in unit tests.

    Partial-Bug: #1686921

    Change-Id: I81781bc15ba985b0017f5b160b4cd38062b7e30f

Revision history for this message
Lance Bragstad (lbragstad) wrote :

It appears that all the patches listed in the etherpad [0] have been merged. I'm not seeing any issues with the keystone gate currently.

I want to make sure we've addressed everything before closing this bug.

[0] https://etherpad.openstack.org/p/keystone_enforce_type_issues

Revision history for this message
ChangBo Guo(gcb) (glongwave) wrote :

I think we can close this bug now

Changed in keystone:
status: In Progress → Fix Committed
Revision history for this message
Lance Bragstad (lbragstad) wrote :
Changed in keystone:
milestone: none → pike-2
status: Fix Committed → Fix Released
Revision history for this message
Lance Bragstad (lbragstad) wrote :

I don't think the tooling changed the status of this since there wasn't a patch that used 'Closes-Bug'. Doing it manually for this one.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on keystone (master)

Change abandoned by Lance Bragstad (<email address hidden>) on branch: master
Review: https://review.openstack.org/461819
Reason: I don't think this is required anymore since the issue reported has been fixed by other patch. This was only a wording suggestion and I'm not sure it's worth the patch anymore. Abandoning for now.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.