test_bash_completion fails due to deprecation warning generated by neutronclient

Bug #1533638 reported by Ihar Hrachyshka
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
High
Akihiro Motoki

Bug Description

neutron.tests.unit.debug.test_shell.ShellTest.test_bash_completion
------------------------------------------------------------------

Captured traceback:
~~~~~~~~~~~~~~~~~~~
    Traceback (most recent call last):
      File "neutron/tests/unit/debug/test_shell.py", line 62, in test_bash_completion
        self.assertFalse(stderr)
      File "/home/vagrant/git/neutron/.tox/py27-constraints/lib/python2.7/site-packages/unittest2/case.py", line 696, in assertFalse
        raise self.failureException(msg)
    AssertionError: "/home/vagrant/git/neutron/.tox/py27-constraints/lib/python2.7/site-packages/neutronclient/neutron/v2_0/availability_zone.py:21: DeprecationWarning: Function 'neutronclient.i18n._()' has moved to 'oslo_i18n._factory.f()': moved to neutronclient._i18n; please migrate to local oslo_i18n usage, as defined at http://docs.openstack.org/developer/oslo.i18n/usage.html\n help=_('Availability Zone for the %s '\n" is not false

We see the warning because we enable them in base test class.

Revision history for this message
Ihar Hrachyshka (ihar-hrachyshka) wrote :
Revision history for this message
Ihar Hrachyshka (ihar-hrachyshka) wrote :

Note the client fix would require a new release.

Changed in neutron:
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

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

Changed in neutron:
assignee: nobody → Ihar Hrachyshka (ihar-hrachyshka)
status: New → In Progress
Changed in neutron:
assignee: Ihar Hrachyshka (ihar-hrachyshka) → Armando Migliaccio (armando-migliaccio)
Changed in neutron:
assignee: Armando Migliaccio (armando-migliaccio) → Akihiro Motoki (amotoki)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/266885
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=feced76488ea99355c605e0bc719723931621693
Submitter: Jenkins
Branch: master

commit feced76488ea99355c605e0bc719723931621693
Author: Ihar Hrachyshka <email address hidden>
Date: Wed Jan 13 13:32:15 2016 +0100

    tests: stop validating neutronclient in neutron-debug tests

    In neutronclient 4.0.0, any command executed triggers DeprecationWarning
    on stderr (to be fixed by I77f168af92ae51ce16bed4988bbcaf7c18557727 and
    a new client release including it).

    The test cases assumed that if command is successful, it never writes to
    stderr though. Making the test failing when using the latest client.

    Instead of fixing the test class not to assume there is no output on
    stderr, remove it because we are not meant to validate neutronclient in
    neutron gate at all and should rely on the library as shipped. Client
    should already have reasonable coverage for its CLI.

    Change-Id: I6440445b80637a5a9f4de052cf5ea1fbd8dcf7d1
    Closes-Bug: #1533638

Changed in neutron:
status: In Progress → Fix Released
Revision history for this message
Thierry Carrez (ttx) wrote : Fix included in openstack/neutron 8.0.0.0b2

This issue was fixed in the openstack/neutron 8.0.0.0b2 development milestone.

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

Other bug subscribers