Add context argument a lot more places and make unit tests work
This commit is contained in:
		| @@ -365,7 +365,7 @@ class LibvirtConnTestCase(test.TestCase): | ||||
|         self.mox.ReplayAll() | ||||
|  | ||||
|         conn = connection.LibvirtConnection(False) | ||||
|         conn.snapshot(instance_ref, recv_meta['id']) | ||||
|         conn.snapshot(self.context, instance_ref, recv_meta['id']) | ||||
|  | ||||
|         snapshot = image_service.show(context, recv_meta['id']) | ||||
|         self.assertEquals(snapshot['properties']['image_state'], 'available') | ||||
| @@ -405,7 +405,7 @@ class LibvirtConnTestCase(test.TestCase): | ||||
|         self.mox.ReplayAll() | ||||
|  | ||||
|         conn = connection.LibvirtConnection(False) | ||||
|         conn.snapshot(instance_ref, recv_meta['id']) | ||||
|         conn.snapshot(self.context, instance_ref, recv_meta['id']) | ||||
|  | ||||
|         snapshot = image_service.show(context, recv_meta['id']) | ||||
|         self.assertEquals(snapshot['properties']['image_state'], 'available') | ||||
| @@ -775,7 +775,7 @@ class LibvirtConnTestCase(test.TestCase): | ||||
|         network_info = [(network, mapping)] | ||||
|  | ||||
|         try: | ||||
|             conn.spawn(instance, network_info) | ||||
|             conn.spawn(context.get_admin_context(), instance, network_info) | ||||
|         except Exception, e: | ||||
|             count = (0 <= str(e.message).find('Unexpected method call')) | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Kevin L. Mitchell
					Kevin L. Mitchell