test_auth_middleware_factory fails with new keystonemiddleware 5.1.0

Bug #1770718 reported by melanie witt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Chris Dent

Bug Description

As seen in the review to update the constraint for keystoneauthmiddleware [1], the test_auth_middleware_factory unit test fails with:

Traceback (most recent call last):
  File "nova/tests/unit/api/openstack/placement/test_deploy.py", line 43, in test_auth_middleware_factory
    response.headers['www-authenticate'])
  File "/home/zuul/src/git.openstack.org/openstack/nova/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 411, in assertEqual
    self.assertThat(observed, matcher, message)
  File "/home/zuul/src/git.openstack.org/openstack/nova/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 498, in assertThat
    raise mismatch_error
testtools.matchers._impl.MismatchError: !=:
reference = "Keystone uri='http://example.com/identity'"
actual = 'Keystone uri="http://example.com/identity"'

cdent found this is the result of a fairly recent change [2] that updated the format of the uri string.

[1] https://review.openstack.org/567449
[2] https://review.openstack.org/559925

Tags: testing
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

Changed in nova:
status: New → In Progress
melanie witt (melwitt)
Changed in nova:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/567923
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=46d919c11ba3ad3324b175aae78f3535b231dc27
Submitter: Zuul
Branch: master

commit 46d919c11ba3ad3324b175aae78f3535b231dc27
Author: Chris Dent <email address hidden>
Date: Fri May 11 19:12:40 2018 +0100

    Flexibly test keystonmiddleware in placement stack

    In change I524c93d30607ea6ab70de92ceea207ee77f34c25 keystonemiddleware
    adjusted how the value of the Keystone uri is quoted when sending a
    www-authenticate header. It went from using a single quote to double.
    Double is more correct.

    The existing version of the test changed in this commit relied on the
    single quote to verify that a URL set in config would be used by the
    middleware appropriately. Now, instead of one exact match test, two
    in-string tests are used.

    Change-Id: Ie9d1df419f2bdfa1d658f5f64ea9b7285de7b9b7
    Closes-Bug: #1770718

Changed in nova:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 18.0.0.0b2

This issue was fixed in the openstack/nova 18.0.0.0b2 development milestone.

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.