Make check_no_duplicate_ips function more verbose

To help investigating when some tests fail, this patch prints within the
tobiko logs the list of ports before and after the controller reboot is
executed.

Change-Id: I7fa497558c0e42a386b0711344aee725ee3bd692
This commit is contained in:
Eduardo Olivares 2023-07-07 14:00:47 +02:00
parent caaa22f5f3
commit 5a44f04fba

View File

@ -380,6 +380,10 @@ def check_no_duplicate_ips(vms_detailed_info, ports_before_stack_creation):
test_case.assertEqual(len(ip6_list), len(ip4_list)) test_case.assertEqual(len(ip6_list), len(ip4_list))
ports_after_reboot = neutron.list_ports(device_owner="compute:nova") ports_after_reboot = neutron.list_ports(device_owner="compute:nova")
LOG.debug("list of ports obtained at the begining of this test: %r",
ports_before_stack_creation)
LOG.debug("list of ports obtained at the end of this test: %r",
ports_after_reboot)
test_case.assertEqual(len(ip6_list), len(ports_after_reboot) - len( test_case.assertEqual(len(ip6_list), len(ports_after_reboot) - len(
ports_before_stack_creation)) ports_before_stack_creation))