wrong values are verified in oauth tests

Bug #1477247 reported by Boris Bobrov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-keystoneclient
Fix Released
Undecided
Boris Bobrov

Bug Description

test on https://review.openstack.org/gitweb?p=openstack/python-keystoneclient.git;a=blob;f=keystoneclient/tests/unit/v3/test_oauth1.py;h=48af836b98b30c215a9ba4ba17766bf37e1f84e7;hb=ae066a828fc6698ffe8336bbd0ad9712680823d2#l100 is supposed to compare values from http handler mock with values provided to the manager (and wrapped to oauth client for convenience).

But instead it compares values with themselves, but acquired using one of oauth client's method. Because of it it, the test always passes, regardless of what requests actual methods make.

Changed in python-keystoneclient:
assignee: nobody → Boris Bobrov (bbobrov)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-keystoneclient (master)

Reviewed: https://review.openstack.org/204678
Committed: https://git.openstack.org/cgit/openstack/python-keystoneclient/commit/?id=7d5d8b343232ee5faf4de3381024095619335929
Submitter: Jenkins
Branch: master

commit 7d5d8b343232ee5faf4de3381024095619335929
Author: Boris Bobrov <email address hidden>
Date: Wed Jul 22 18:52:49 2015 +0300

    Make OAuth testcase use actual request headers

    OAuth test verifies that access_token manager's methods make requests with
    certain parameters. It is supposed to use values from mocked http handler
    and compare them with referential values acquired from oauth client.

    But instead of using values from mocked handler, it used the values from
    oauth client and compared them with values from the client acquired using
    attributes, basically testing oauthlib and not access_token manager's
    methods.

    Make the test compare correct values and remove check of timestamp,
    which was useless because it is always mocked in tests and not provided in
    actual requests.

    As a consequence, use of get_oauth_params, which changed in oauthlib
    1.0 and blocked the gate, was removed.

    Closes-Bug: 1477177
    Closes-Bug: 1477247
    Change-Id: I5e049163f84fde5827104fd4a6441222eb08468f

Changed in python-keystoneclient:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-keystoneclient (feature/keystoneauth_integration)

Fix proposed to branch: feature/keystoneauth_integration
Review: https://review.openstack.org/207267

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-keystoneclient (stable/kilo)

Fix proposed to branch: stable/kilo
Review: https://review.openstack.org/207973

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-keystoneclient (stable/kilo)

Reviewed: https://review.openstack.org/207973
Committed: https://git.openstack.org/cgit/openstack/python-keystoneclient/commit/?id=65d3907d83c2a15babbf8e7063c658a5eda804ec
Submitter: Jenkins
Branch: stable/kilo

commit 65d3907d83c2a15babbf8e7063c658a5eda804ec
Author: Boris Bobrov <email address hidden>
Date: Wed Jul 22 18:52:49 2015 +0300

    Make OAuth testcase use actual request headers

    OAuth test verifies that access_token manager's methods make requests with
    certain parameters. It is supposed to use values from mocked http handler
    and compare them with referential values acquired from oauth client.

    But instead of using values from mocked handler, it used the values from
    oauth client and compared them with values from the client acquired using
    attributes, basically testing oauthlib and not access_token manager's
    methods.

    Make the test compare correct values and remove check of timestamp,
    which was useless because it is always mocked in tests and not provided in
    actual requests.

    As a consequence, use of get_oauth_params, which changed in oauthlib
    1.0 and blocked the gate, was removed.

    Closes-Bug: 1477177
    Closes-Bug: 1477247
    Change-Id: I5e049163f84fde5827104fd4a6441222eb08468f
    (cherry picked from commit 7d5d8b343232ee5faf4de3381024095619335929)

tags: added: in-stable-kilo
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-keystoneclient (feature/keystoneauth_integration)
Download full text (22.7 KiB)

Reviewed: https://review.openstack.org/207267
Committed: https://git.openstack.org/cgit/openstack/python-keystoneclient/commit/?id=4e498a54d0034b2ce5c87130f080ff580d241600
Submitter: Jenkins
Branch: feature/keystoneauth_integration

commit 51d9d123a8df79f6b84d196d41f1008f8d6033d4
Author: Brant Knudson <email address hidden>
Date: Wed Aug 5 12:28:30 2015 -0500

    Deprecate openstack.common.apiclient

    Deprecate the apiclient from oslo-incubator so we can get rid of
    it.

    bp deprecations

    Change-Id: I1c761933816da03b6c625f14d0aac43f206e88d7

commit 16e834dd4597314d79cf4fb0bb98449e6552f804
Author: Brant Knudson <email address hidden>
Date: Wed Aug 5 11:17:34 2015 -0500

    Move apiclient.base.Resource into keystoneclient

    keystoneclient is using apiclient.base and in order to properly
    deprecate and eventually get rid of apiclient we need to move the
    symbols that keystoneclient uses out of apiclient.

    This change moves apiclient.base.Resource into keystoneclient.base
    by merging apiclient.base.Resource into the existing
    keystoneclient.base.Resource. apiclient.base.Resource is now
    renaming keystoneclient.base.Resource for backwards-compatibility.

    Change-Id: Id479711b7c9437aaf171def6976aab8b303ec56d

commit 26534dadb1d0be00b87b632a038839ab1c18cfe4
Author: Brant Knudson <email address hidden>
Date: Tue Aug 4 19:57:26 2015 -0500

    oslo-incubator apiclient.exceptions to keystoneclient.exceptions

    Applications are using exceptions out of
    keystoneclient.openstack.common.apiclient.exceptions so it's part
    of the public interface. But since it's from oslo-incubator it's
    not considered stable. Since keystoneclient is all stable this
    creates bad situation.

    With this change, all the symbols out of apiclient.exceptions are
    moved into keystoneclient.exceptions rather than the other way
    around (keystoneclient.exceptions used to re-export all of
    apiclient.exceptions). Now we're in control of the
    apiclient.exceptions and keystoneclient.exceptions that
    applications are using.

    Closes-Bug: 1481806
    Change-Id: Ib3afa86b9d276f6a45d1ecd6f9157ee02ec8570d

commit eaa7ddd7443ca166f6646e808dcad959811d158b
Author: Brant Knudson <email address hidden>
Date: Sun Jul 26 06:53:58 2015 -0500

    Proper deprecation for HTTPClient session and adapter properties

    HTTPClient's forwarded session and adapter properties weren't
    properly deprecated since the deprecations was only mentioned in
    the docstring. Proper deprecation requires use of warnings/
    debtcollector and documentation.

    bp deprecations

    Change-Id: Iea76d7bbc3bdeb13f7fdb097f13e007b4dd85c8d

commit 0c2fef51d2b90df088d30e9b6c5079caae7c6578
Author: Brant Knudson <email address hidden>
Date: Fri Jul 24 15:52:57 2015 -0500

    Proper deprecation for HTTPClient.request methods

    HTTPClient.request and related methods weren't properly
    deprecated since they were only mentioned in the docstrings.
    Proper deprecation requires use of warnings/debtcollector and
    documentation.

    Also, fixed places where the deprecated request m...

Changed in python-keystoneclient:
milestone: none → 1.7.0
status: Fix Committed → Fix Released
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.