We need the ability to run database tests on mysql in addition to sqlite

Bug #978304 reported by Sean Dague
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Core Infrastructure
Fix Released
High
Sean Dague

Bug Description

Unit tests in projects such as nova which work on the database only work with sqlite databases. In most cases this isn't an issue, but items like migrations actually are different depending on the different databases used. We need the ability to have these tests work with mysql (and later postgresql and others) as well.

The proposed mechanism is to assume there will be a mysql database setup with a predefined name / user / password that should be unique to us, like 'openstack_novaunittests'. If we can successfully connect to that database we'll run mysql tests. If we run into any issue in connecting to the database, we'll skip the tests. There will also be a test to check that skipping works by passing bad credentials to it.

Monty Taylor (mordred)
Changed in openstack-ci:
status: New → Triaged
importance: Undecided → High
milestone: none → folsom
Revision history for this message
Monty Taylor (mordred) wrote :

The nova-specific bits of this have been done - now we need a build slave template that has mysql installed in a manner such that when the nova unittests are run, they exercise this code path. We probably want this to be a jclouds triggered build slave, so that we don't have to worry about cleaning out databases each time.

Changed in openstack-ci:
assignee: nobody → Devananda (devananda)
Revision history for this message
Sean Dague (sdague) wrote :

The unit tests automatically resets the database on both setup and teardown (to ensure cleanliness), so the only piece that needs to happen is a db user 'openstack_citest' with passwd 'openstack_citest' has all permissions granted for 'openstack_citest' database.

Monty Taylor (mordred)
Changed in openstack-ci:
status: Triaged → Fix Released
assignee: Devananda (devananda) → Sean Dague (sdague-b)
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.