Fix exception type in test_boot_reschedule_fill_provider_mapping_raises

After Iecbee518444bd282ce5f6fd019db41a322f76a83 merged the
test_boot_reschedule_fill_provider_mapping_raises does not simulate a
possible scenario as ConsumerAllocationRetrievalFailed cannot be
raised from _fill_provider_mapping any more.

The fault this functional test reporduces still exists just with
different exception types. So this patch changes the exception type
to a valid one that is still raised by _fill_provider_mapping.

Change-Id: I79cf44aafccb1bc6b13a3109c5a98215811bd04d
Related-Bug: #1819460
changes/51/648651/1
Balazs Gibizer 4 years ago
parent 34a8e8ccf6
commit fd3b86d1c3
  1. 6
      nova/tests/functional/test_servers.py

@ -6738,8 +6738,8 @@ class PortResourceRequestReSchedulingTest(
'_fill_provider_mapping',
side_effect=[
fill,
exception.ConsumerAllocationRetrievalFailed(
consumer_uuid=uuids.inst1, error='testing')],
exception.ResourceProviderTraitRetrievalFailed(
uuid=uuids.rp1)],
autospec=True):
server = self._create_server(
flavor=self.flavor,
@ -6754,7 +6754,7 @@ class PortResourceRequestReSchedulingTest(
# NOTE(gibi): Due to bug 1819460 the server stuck in BUILD state and no
# error is presented to the user
# self.assertIn(
# 'Failed to retrieve allocations for consumer',
# 'Failed to get traits for resource provider',
# server['fault']['message'])
#
# NOTE(gibi): even after delete the allocation of such server is leaked

Loading…
Cancel
Save