test_db_plugin does not test other plugins

Bug #1031716 reported by Salvatore Orlando
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Undecided
Salvatore Orlando

Bug Description

In Quantum v1, we used to have a set of unit tests which could be executed against several plugins by changing the PLUGIN_DIR environment variable. (note: this is still unit testing, with the only difference that the test does not cover the code 'base' or 'fake' plugin, but some other plugin).

With Quantum v2, we have now test_api_v2, which is meant to do api-layer testing, and indeed mocks the plugin, and test_db_plugin, which is meant to verify the behaviour of the plugin. Howerver, test_db_plugin_v2 only tests QuantumDbPluginV2, regardless of the PLUGIN_DIR setting.

It might be argued that this is intended behaviour, but since most if not all plugins extend the DB plugin, the same tests could be reused. It would be a shame to ask plugin providers to reimplement the same unit tests. It might then be worth finding a way for making the plugin configurable.

Please note: as we probably did not notice this (I was personally assuming PLUGIN_DIR still worked with v2), the Ryu plugin seems to be broken - as it appears to be at least a syntax error for a missing import.

Changed in quantum:
assignee: nobody → Salvatore Orlando (salvatore-orlando)
milestone: none → folsom-3
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to quantum (master)

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

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

Reviewed: https://review.openstack.org/10643
Committed: http://github.com/openstack/quantum/commit/d4a7eabec0efc22c568d476b2237367d51a5025f
Submitter: Jenkins
Branch: master

commit d4a7eabec0efc22c568d476b2237367d51a5025f
Author: Salvatore Orlando <email address hidden>
Date: Wed Aug 1 04:05:17 2012 -0700

    Make the plugin for test_db_plugin configurable

    Bug 1031716

    Change-Id: I8dc492eb90d4160a23b3b4ba51feeedba6f852e2

Changed in quantum:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in quantum:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in quantum:
milestone: folsom-3 → 2012.2
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.