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
(cherry picked from commit fd3b86d1c3)
This commit is contained in:
Balazs Gibizer 2019-03-29 10:03:48 +01:00
parent 07a1a8ff7d
commit c38a821902
1 changed files with 3 additions and 3 deletions

View File

@ -6805,8 +6805,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,
@ -6821,7 +6821,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