XenAPI: Fix ValueError in test_slave_asks_master_to_add_slave_to_pool
Change If9e8dd5cc2634168910d5f9f8d9302aeefa16097 in oslo.serialization will raise a ValueError when it can't convert something to a primitive, which in this case is the Aggregate object used in this test. Given the add_to_aggregate method doesn't even serialize the Aggregate object passed in, I'm not sure how this was working before, but the fix is to just not try and expect add_aggregate_host RPC API is called with a serialized Aggregate object. Change-Id: I139533dfd94a1aa7a00a6220a4411bebe1c9e88b Related-Bug: #1593641
This commit is contained in:
parent
81a153f382
commit
0d2daa262a
|
@ -3401,7 +3401,7 @@ class HypervisorPoolTestCase(test.NoDBTestCase):
|
|||
|
||||
self.assertIn(
|
||||
(slave.compute_rpcapi.add_aggregate_host,
|
||||
"CONTEXT", "slave", jsonutils.to_primitive(self.fake_aggregate),
|
||||
"CONTEXT", "slave", self.fake_aggregate,
|
||||
"master", "SLAVE_INFO"),
|
||||
slave.compute_rpcapi._mock_calls)
|
||||
|
||||
|
|
Loading…
Reference in New Issue