test_new_websocket_client_token_invalid uses improper header

Bug #1434696 reported by Jeremy Hanmer
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Invalid
Low
Jeremy Hanmer
Juno
Fix Released
Low
Jeremy Hanmer

Bug Description

Line 126:
self.wh.headers.getheader = self._fake_getheader
should read:
self.wh.headers.getheader = self._fake_getheader_bad_token

 Traceback (most recent call last):
      File "/home/jenkins/jobs/nova-juno-os-package/workspace/.tox/py27/local/lib/python2.7/site-packages/mock.py", line 1201, in patched
        return func(*args, **keywargs)
      File "/home/jenkins/jobs/nova-juno-os-package/workspace/nova/tests/console/test_websocketproxy.py", line 129, in test_new_websocket_client_token_invalid
        check_token.assert_called_with(mock.ANY, token="XXX")
      File "/home/jenkins/jobs/nova-juno-os-package/workspace/.tox/py27/local/lib/python2.7/site-packages/mock.py", line 835, in assert_called_with
        raise AssertionError(msg)
    AssertionError: Expected call: check_token(<ANY>, token='XXX')
    Actual call: check_token(<nova.context.RequestContext object at 0x7a8dad0>, token='123-456-789')
    Traceback (most recent call last):
    _StringException: Empty attachments:
      pythonlogging:''
      stderr
      stdout

Jeremy Hanmer (fzylogic)
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/juno)

Fix proposed to branch: stable/juno
Review: https://review.openstack.org/166368

Changed in nova:
status: New → Confirmed
importance: Undecided → Low
assignee: nobody → Jeremy Hanmer (jeremy-hanmer)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/juno)

Reviewed: https://review.openstack.org/166368
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=85d335ddc8d4937eb84e05313af69ddeb6960c82
Submitter: Jenkins
Branch: stable/juno

commit 85d335ddc8d4937eb84e05313af69ddeb6960c82
Author: Jeremy Hanmer <email address hidden>
Date: Fri Mar 20 13:16:55 2015 -0700

    fix the websocket_bad_token test

    _fake_getheader should read _fake_getheader_bad_token for this
    test

    This commit doesn't affect master, as this issue doesn't exist in
    master. This bug occured during the backport of the commit [1], which
    was altered from the original commit.

            [1] https://review.openstack.org/#/c/163034/3

    Closes-Bug: 1434696

    Change-Id: I40c0ec6b1728ff3a3195e7fbc4525c8a4220ddc0

tags: added: in-stable-juno
Changed in nova:
status: Confirmed → Invalid
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.