Inactive UT broken on Cisco VPNaaS

Bug #1326785 reported by Paul Michali
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Low
Paul Michali

Bug Description

As part of bug 1291032 to fix PEP8 H302 violations, some changes made to UT files in Cisco VPNaaS were not correctly modified (imports that were for modules already, were changed to import the directory above, instead of being left alone).

The mistake wasn't detected, because the UT is currently deactivated. To verify the fix these things are needed:

1) Symlink tests/unit/services/vpn/device_drivers/notest_cisco_csr_rest.py to a name w/o no prefix.
2) manually include httmock library or the source file.
3) Run tox to verify the fix.

Problem affects notest_cisco_csr_rest.py and cisco_csr_mock.py in that area.

Long term the goal is to resolve the issue with this UTs library usage, but in the interim, we'd like to keep the file operational until that time (even if tested manually).

Tags: vpnaas cisco
Changed in neutron:
importance: Undecided → Low
status: New → Confirmed
Paul Michali (pcm)
Changed in neutron:
assignee: nobody → Paul Michali (pcm)
Kyle Mestery (mestery)
Changed in neutron:
milestone: none → juno-2
Changed in neutron:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

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

commit 7f0a8f09ab7867100081a898347a5f901e5a442b
Author: Paul Michali <email address hidden>
Date: Mon Jun 30 18:31:42 2014 -0400

    VPNaaS REST Client UT Broken

    When the H302 work was done, it broke two modules used for UT of
    Cisco CSR VPNaaS REST client. Since the UT is currently disabled
    (because the httmock library was not approved for test-requirements),
    the error was not detected.

    This fixes the files, so that they can still be used manually (by
    locally importing httmock or its source file, and renaming the
    module to remove the "_" prefix).

    In the long term, the UT needs to be reworked to use httpretty,
    which uses a register based mechanism, instead of a context
    manager based mechanism, so this will take some effort. In addition.
    there is discussion of switching to a new mock-request package,
    instead of httpretty.

    Change-Id: I8badc249ad021fdbdb2367b5416c72435ed58994
    Closes-Bug: 1335977
    Closes-Bug: 1326785

Changed in neutron:
status: In Progress → Fix Committed
Changed in neutron:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in neutron:
milestone: juno-2 → 2014.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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