nova/db/* almost only tested indirectly

Bug #828631 reported by Soren Hansen
26
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Invalid
Low
Unassigned

Bug Description

On the surface, it looks like nova/db/* has reasonably good test coverage, but almost all the code exercised is from other parts of the code that consumes the db api.

It would be great to have direct unit tests for all the stuff in here.

Example:
The method to pull an instance_ref out of the database gets exercised a lot, because other parts of Nova end up calling it when they're being tested. Instead, we should have a test that e.g.:
 * creates an instance
 * reads the instance back
 * deletes it
 * tries to read it back as an average user (which should raise an exception)
 * tries to read it back as an adming (which should work, but the instance should have ['deleted'] = True)

Tags: db unittests
aeva black (tenbrae)
tags: added: db
Revision history for this message
Russell Bryant (russellb) wrote :
Changed in nova:
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.