AFAICT this isn't an issue with swap_volume itself. The fixture is causing the TypeError on purpose here to exercise the notification code path when dealing with errors during a swap volume call:
You missed the trace showing the issue with the notification path itself from your initial comment:
Traceback (most recent call last):
File "/home/zuul/src/git.openstack.org/openstack/nova/nova/tests/functional/notification_sample_tests/test_instance.py", line 1609, in test_volume_swap_server_with_error
tb2 = fake_notifier.VERSIONED_NOTIFICATIONS[7]['payload'][
IndexError: list index out of range
AFAICT this isn't an issue with swap_volume itself. The fixture is causing the TypeError on purpose here to exercise the notification code path when dealing with errors during a swap volume call:
https:/ /github. com/openstack/ nova/blob/ d2a87a44468f91d 5a468e1262e7e2f d8c7add35c/ nova/tests/ functional/ notification_ sample_ tests/test_ instance. py#L1564- L1565
https:/ /github. com/openstack/ nova/blob/ d2a87a44468f91d 5a468e1262e7e2f d8c7add35c/ nova/tests/ fixtures. py#L1597- L1601
You missed the trace showing the issue with the notification path itself from your initial comment:
Traceback (most recent call last): zuul/src/ git.openstack. org/openstack/ nova/nova/ tests/functiona l/notification_ sample_ tests/test_ instance. py", line 1609, in test_volume_ swap_server_ with_error VERSIONED_ NOTIFICATIONS[ 7]['payload' ][
File "/home/
tb2 = fake_notifier.
IndexError: list index out of range