Unit test tree does not match the structure of the code tree

Bug #1440834 reported by Maru Newby
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
networking-brocade
Fix Released
Critical
Shiv Haris
networking-cisco
Fix Released
Critical
Henry Gessau
neutron
Fix Released
Critical
Maru Newby
Kilo
Fix Released
Undecided
Unassigned

Bug Description

The structure of the unit test tree does not currently correspond to the structure of the code under test. This makes it difficult for a developer to find the unit tests for a given module and complicates non-mechanical evaluation of coverage.

Maru Newby (maru)
Changed in neutron:
importance: Undecided → Critical
status: New → In Progress
milestone: none → kilo-rc1
Changed in neutron:
assignee: nobody → Maru Newby (maru)
Revision history for this message
Maru Newby (maru) wrote :

The intention is to land this as close to RC as possible to limit the merge conflicts that it is likely to cause for in-flight changes.

Revision history for this message
Armando Migliaccio (armando-migliaccio) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron-lbaas (master)

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

Changed in neutron:
assignee: Maru Newby (maru) → Brandon Logan (brandon-logan)
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/171004

Changed in neutron:
assignee: Brandon Logan (brandon-logan) → Maru Newby (maru)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

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

commit 1105782e3914f601b8f4be64939816b1afe8fb54
Author: Maru Newby <email address hidden>
Date: Sat Apr 4 00:22:05 2015 +0000

    Reorganize unit test tree

    This change ensures that the structure of the unit test tree matches
    that of the code tree to make it obvious where to find tests for a
    given module. A check is added to the pep8 job to protect against
    regressions.

    The plugin test paths are relocated to neutron/tests/unit/plugins
    but are otherwise ignored for now.

    Change-Id: If307593259139171be21a71c58e3a34bf148cc7f
    Partial-Bug: #1440834

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

commit 5bdcacad62ba468de1bd339cad44428c2374d973
Author: Maru Newby <email address hidden>
Date: Mon Apr 6 21:51:23 2015 +0000

    Merge open source plugin test code modules

    The unit test reorg is about moving files around so a test module is
    clearly associated with the code module it targets, but the test
    modules in this change needed to be manually merged because they both
    targeted the same module.

    Change-Id: I80f4b97fadd318896e7fa4e7e7e939f924127b2a
    Partial-Bug: #1440834

Henry Gessau (gessau)
Changed in networking-cisco:
importance: Undecided → Critical
assignee: nobody → Henry Gessau (gessau)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

commit 21bef562c23d96fe41daeedeb43c0bb2d1c53ed0
Author: Maru Newby <email address hidden>
Date: Mon Apr 6 21:53:39 2015 +0000

    Reorganize plugin test modules

    This change moves plugin test modules to conform to the new rules on
    unit test tree structure (see TESTING.rst).

    Vendor plugin paths continue to be ignored, and unit test modules that
    test features instead of modules are also ignored pending their
    removal to the functional test tree.

    Change-Id: I482c377ca72ffd58692ad84bd9692356513e4c98
    Closes-Bug: #1440834

Changed in neutron:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to networking-cisco (master)

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

Changed in networking-cisco:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to networking-cisco (master)

Reviewed: https://review.openstack.org/171033
Committed: https://git.openstack.org/cgit/stackforge/networking-cisco/commit/?id=ff2c52c1aa1dc4875799162dce689ca5fff89e03
Submitter: Jenkins
Branch: master

commit ff2c52c1aa1dc4875799162dce689ca5fff89e03
Author: Henry Gessau <email address hidden>
Date: Mon Apr 6 22:56:09 2015 -0400

    Adjust imports for re-organized neutron unit test tree

    Closes-bug: #1440834

    Change-Id: Ic756efb825827b47d02f559a027977bd9d0bda06

Changed in networking-cisco:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron-vpnaas (master)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron-vpnaas (master)

Reviewed: https://review.openstack.org/171256
Committed: https://git.openstack.org/cgit/openstack/neutron-vpnaas/commit/?id=bc2a1d775408a630e483794437acb90bd4a3c3c9
Submitter: Jenkins
Branch: master

commit bc2a1d775408a630e483794437acb90bd4a3c3c9
Author: Paul Michali <email address hidden>
Date: Tue Apr 7 11:57:50 2015 +0000

    VPNaaS: Reorganize test tree

    Similar to what is happening in Neutron, this commit renames and moves unit
    test files so that they match the directory structure of the code tree.
    Since the VPN repo's test files have imports from Neutron, there are import
    changes as well, to the imports to match the Neutron test file organization.

    A check script is added to monitor the test file naming and locations (to
    ensure consistency).

    Change-Id: I875285230127ed660137d271f7e98d82eb57ffab
    Partial-Bug: #1440834

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to neutron-lbaas (master)

Reviewed: https://review.openstack.org/170983
Committed: https://git.openstack.org/cgit/openstack/neutron-lbaas/commit/?id=f759bf0027fe6790a0069c691638033d773f7c0e
Submitter: Jenkins
Branch: master

commit f759bf0027fe6790a0069c691638033d773f7c0e
Author: Brandon Logan <email address hidden>
Date: Mon Apr 6 16:14:59 2015 -0500

    Rename imports based on neutron tests reorganization.

    Co-Authored-By: Doug Wiegley <email address hidden>
    Change-Id: Ieaacc08e27567afe3710a6836bc42810f184ce73
    Depends-On: If307593259139171be21a71c58e3a34bf148cc7f
    Related-Bug: #1440834

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron-fwaas (master)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to neutron (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/171874

Shiv Haris (shh)
Changed in networking-brocade:
importance: Undecided → Critical
assignee: nobody → Shiv Haris (shh)
status: New → Triaged
status: Triaged → Confirmed
Thierry Carrez (ttx)
Changed in neutron:
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to networking-brocade (master)

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

Changed in networking-brocade:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to networking-brocade (master)

Reviewed: https://review.openstack.org/172193
Committed: https://git.openstack.org/cgit/stackforge/networking-brocade/commit/?id=8b20d6f74c4850f15bede73aa753f5eebafb1a4b
Submitter: Jenkins
Branch: master

commit 8b20d6f74c4850f15bede73aa753f5eebafb1a4b
Author: Shiv Haris <email address hidden>
Date: Thu Apr 9 13:10:03 2015 -0700

    Adjust imports for re-organized neutron unit test tree

    Change-Id: I09f73f57dbd8cd36a7381960f122a3a812e551c7
    Closes-bug: #1440834

Changed in networking-brocade:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to neutron (master)

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

commit 4000b18275112a0c9e3aa055fbaea634ac89a382
Author: Maru Newby <email address hidden>
Date: Fri Apr 17 23:49:09 2015 +0000

    Fix test discovery for api and functional paths

    The use of the builtin unittest test loader was silently dropping tests
    that couldn't be imported.

    This change also drops the retargetable path from discovery in the api
    path due to a previously-masked configuration problem, and fixes an
    invalid import in a functional testing fixture module.

    Fullstack tests are also disabled temporarily pending a fix for #1446261.

    Change-Id: Ie44e45c117bd864538e7919dfcf499091fde7752
    Related-Bug: #1440834
    Related-Bug: #1443480
    Closes-Bug: #1446405

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to neutron (stable/kilo)

Related fix proposed to branch: stable/kilo
Review: https://review.openstack.org/178301

Thierry Carrez (ttx)
Changed in neutron:
milestone: kilo-rc1 → 2015.1.0
Shiv Haris (shh)
Changed in networking-brocade:
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to neutron (neutron-pecan)

Related fix proposed to branch: neutron-pecan
Review: https://review.openstack.org/185072

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to neutron (stable/kilo)

Reviewed: https://review.openstack.org/178301
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=ae5ffa3f9febea198be580c60fcd83e492c26547
Submitter: Jenkins
Branch: stable/kilo

commit ae5ffa3f9febea198be580c60fcd83e492c26547
Author: Maru Newby <email address hidden>
Date: Fri Apr 17 23:49:09 2015 +0000

    Fix test discovery for api and functional paths

    The use of the builtin unittest test loader was silently dropping tests
    that couldn't be imported.

    This change also drops the retargetable path from discovery in the api
    path due to a previously-masked configuration problem, and fixes an
    invalid import in a functional testing fixture module.

    Fullstack tests are also disabled temporarily pending a fix for #1446261.

    Note:
    - fullstack tests are not really working in Kilo, so it's fine to
      disable them for the branch.

    Change-Id: Ie44e45c117bd864538e7919dfcf499091fde7752
    Related-Bug: #1440834
    Related-Bug: #1443480
    Closes-Bug: #1446405
    (cherry picked from commit 4000b18275112a0c9e3aa055fbaea634ac89a382)

tags: added: in-stable-kilo
Sam Betts (sambetts)
Changed in networking-cisco:
milestone: none → 1.0.0
Deepak (dkukrety)
Changed in networking-cisco:
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.