At run time there are decorators that behave in an unexpected manner.
For instance, in nova/compute/manager.py when ComputeManager's
resize_instance method is called, the "migration" positional argument
is somehow added to kwargs (paired with the "migration" key) and is
stripped out of the args parameters when the decorators are called.
However, when this same method is called in
nova/tests/compute/test_compute_mgr.py, the "migration" positional
argument remains in args when the decorators are called.  In other
words at run time the decorators see these arguments:

(self, context, [], {'migration': migration, 'image': image,
'instance': instance, 'reservations': reservations})

while when running a test case, they see these arguments:

(self, context, [instance, image, reservations, migration,
instance_type], {})


What is happening at run time to cause this behavior?  How can this
behavior be duplicated when executing test cases, so that the test
cases correctly mimic run-time behavior?
_______________________________________________
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

Reply via email to