Units test failing when un-stubbing db.instance_create
Hi,
In one of my branches (lp:~citrix-openstack/nova/xenapi-netinject-prop), I tried to improve code coverage as well by un-stubbing several routines, among which db.instance_create (currently stubbed out in nova/test/
After merging with lp:nova rev #862 one unit test, test_finish_resize, was failing complaining that instance.local_gb was none.
I noticed that in stubbed-out method we were retrieving the value for local_gb from INSTANCE_TYPES as follows:
type_data = INSTANCE_
It seems that some recent merge instead is not using this anymore, taking just the value passed by the caller of the DB API method.
I was therefore wondering whether there is a chance that the resize feature for XenAPI in VMOps might be broken (although it is very highly unlikely that an instance will not have a null local_gb field!).
As a general note, we should probably avoid stubbing out db APIs.
Question information
- Language:
- English Edit question
- Status:
- Answered
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Salvatore Orlando for more information if necessary.