wrong unittest modules position in tests tree

Bug #1348633 reported by Valeriy Ponomaryov
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Shared File Systems Service (Manila)
Fix Released
Medium
Valeriy Ponomaryov

Bug Description

It is expected, that unittests cover project modules in relation 1:1 and placed in appropriate tree as main modules do.

Template: manila/[tests/]foo/bar/[test_]modulename.py

Example1:

module to be tested:
manila/share/manager.py

expected test module:
manila/tests/manila/share/test_manager.py

Example2:
module to be tested:
manila/share/drivers/generic.py

current position:
manila/tests/test_share_generic.py

expected position:
manila/tests/share/drivers/test_generic.py

----------------------
Part 2 - fake modules:

Template for fake modules is following:
manila[/tests/fakes/]/moduledir/[fake_]modulename.py

All fake modules "fake driver", "fake namager", etc should be properly placed in module tree according to above template.

Changed in manila:
importance: Undecided → Medium
description: updated
Changed in manila:
assignee: nobody → Valeriy Ponomaryov (vponomaryov)
status: New → In Progress
description: updated
Revision history for this message
Xing Yang (xing-yang) wrote :

This needs a juno-rc1 tag for associated patches to be merged in Juno.

Changed in manila:
milestone: none → juno-rc1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to manila (master)

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

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

Reviewed: https://review.openstack.org/118294
Committed: https://git.openstack.org/cgit/stackforge/manila/commit/?id=599efefbcd7e532befb64d58f2bc209f9c9e8789
Submitter: Jenkins
Branch: master

commit 599efefbcd7e532befb64d58f2bc209f9c9e8789
Author: Valeriy Ponomaryov <email address hidden>
Date: Tue Sep 2 06:21:05 2014 -0400

    Move driver unittest modules to proper place

    It is expected, that unittests cover project modules in relation 1:1 and
    placed in appropriate tree as main modules do.

    It should be like in example:
    manila/[tests/]foo/bar/[test_]modulename.py

    Also fixed stub of service_instance in generic driver test suite, it was
    overwriting service instance manager class for whole test run. Problem
    appears only with this commit because order of tests is changed here.

    Change-Id: I26136b21f55fb2563f15a9a44ca0b6613f75165c
    Partial-Bug: #1348633

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

Reviewed: https://review.openstack.org/118285
Committed: https://git.openstack.org/cgit/stackforge/manila/commit/?id=f5d87925530abf2d0fbba0879eaa39a66dcf64a4
Submitter: Jenkins
Branch: master

commit f5d87925530abf2d0fbba0879eaa39a66dcf64a4
Author: Valeriy Ponomaryov <email address hidden>
Date: Tue Sep 2 04:46:22 2014 -0400

    Merge two unittest modules that test same module

    For module 'manila.share.manager' exist two test suites located in
    manila.tests.test_share and manila.tests.share.test_manager
    This commit merges two mentioned test modules to second one, because it is
    located properly.

    Changes:
    - updated Fake driver in 'manila.tests.fake_driver' module to satisfy
      proper driver interface.
    - used updated fake driver in result test suite instead of own implementation.
    - moved unittests to another module.
    - deleted one overlapping test.

    This commit does not add new tests, there are still uncovered functionality
    exist.

    Change-Id: I7c102e1331f267ac43bcb09c4d9fe9426a0d8853
    Partial-Bug: #1348633

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

Reviewed: https://review.openstack.org/119792
Committed: https://git.openstack.org/cgit/stackforge/manila/commit/?id=113ddb42ba0bb660ce1ad5630f6872c16ca17c6f
Submitter: Jenkins
Branch: master

commit 113ddb42ba0bb660ce1ad5630f6872c16ca17c6f
Author: vponomaryov <email address hidden>
Date: Mon Sep 8 18:21:31 2014 +0300

    Move db related unittests to proper places

    It is expected, that unittests cover project modules in relation 1:1 and
    placed in appropriate tree as main modules do.

    It should be like in example:
    manila/[tests/]foo/bar/[test_]modulename.py

    Change-Id: I890deaeb41b87a6ae82868905144fd7477272058
    Partial-Bug: #1348633

Changed in manila:
milestone: juno-rc1 → kilo-1
Changed in manila:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in manila:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in manila:
milestone: kilo-1 → 2015.1.0
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.