[Openstack] [Quantum] Running plugin tests with tox

Maru Newby mnewby at internap.com
Fri Aug 24 15:35:18 UTC 2012


Hi Salvatore,

I see you're working on getting plugins testable with tox:

https://review.openstack.org/#/c/11922/

What about keeping the plugins isolated for testing purposes?  I have been unable to work on it yet, but I was thinking it might be a good idea to move the plugins out of the main tree (but still in the same repo) for ease of maintenance, testing and deployment.  The thought was:

- relocate all plugins outside of main quantum tree (plugins/ dir in the repo root)
- give each plugin 
  - its own python root-level package (e.g. quantum_ovs)
  - its own tox.ini
  - its own tools/*-requires

So the layout would be something like:

plugins/quantum_ovs/tox.ini
plugins/quantum_ovs/quantum_ovs/__init__.py
plugins/quantum_ovs/tests/__init__.py
plugins/quanum_ovs/tools/pip-requires
....
plugins/quantum_linuxbridge/tox.ini
...

The tests for each plugin could then be executed via an independent tox run.

Is there any merit to this, now or in the future?

Thanks,


Maru

On 2012-08-24, at 2:56 PM, Salvatore Orlando (Code Review) wrote:

> Salvatore Orlando has uploaded a new change for review.
> 
> Change subject: Enable tox to run OVS plugin unit tests
> ......................................................................
> 
> Enable tox to run OVS plugin unit tests
> 
> Fix bug 1029142
> 
> Unit tests have been moved into /quantum/tests/unit
> 
> Change-Id: I5d0fa84826f62a86e4ab04c3e1958869f24a1fcf
> ---
> D quantum/plugins/openvswitch/run_tests.py
> D quantum/plugins/openvswitch/tests/__init__.py
> D quantum/plugins/openvswitch/tests/unit/__init__.py
> R quantum/tests/unit/test_ovs_db.py
> R quantum/tests/unit/test_ovs_defaults.py
> R quantum/tests/unit/test_ovs_rpcapi.py
> R quantum/tests/unit/test_ovs_tunnel.py
> 7 files changed, 0 insertions(+), 72 deletions(-)
> 
> 
>  git pull ssh://review.openstack.org:29418/openstack/quantum refs/changes/22/11922/1
> --
> To view, visit https://review.openstack.org/11922
> To unsubscribe, visit https://review.openstack.org/settings
> 
> Gerrit-MessageType: newchange
> Gerrit-Change-Id: I5d0fa84826f62a86e4ab04c3e1958869f24a1fcf
> Gerrit-PatchSet: 1
> Gerrit-Project: openstack/quantum
> Gerrit-Branch: master
> Gerrit-Owner: Salvatore Orlando <salv.orlando at gmail.com>





More information about the Openstack mailing list