From c62d7f22cf769cf7b293eea37813005575e24a7e Mon Sep 17 00:00:00 2001 From: Alberto Contreras Date: Wed, 18 Sep 2024 08:36:14 +0200 Subject: [PATCH] test(hotplug): reenable vpc test in focal (#5492) After the fix for LP: 2055397 is released, we can re-enable this tests. Add additional assertions to verify that every route has metrics configured. --- tests/integration_tests/modules/test_hotplug.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/integration_tests/modules/test_hotplug.py b/tests/integration_tests/modules/test_hotplug.py index a41b2313cde..be4613313d5 100644 --- a/tests/integration_tests/modules/test_hotplug.py +++ b/tests/integration_tests/modules/test_hotplug.py @@ -302,7 +302,6 @@ def test_multi_nic_hotplug(setup_image, session_cloud: IntegrationCloud): verify_clean_boot(client) -@pytest.mark.skipif(CURRENT_RELEASE <= FOCAL, reason="See LP: #2055397") @pytest.mark.skipif(PLATFORM != "ec2", reason="test is ec2 specific") @pytest.mark.skip(reason="IMDS race, see GH-5373. Unskip when fixed.") def test_multi_nic_hotplug_vpc(setup_image, session_cloud: IntegrationCloud): @@ -353,6 +352,12 @@ def test_multi_nic_hotplug_vpc(setup_image, session_cloud: IntegrationCloud): r = bastion.execute(f"ping -c1 {secondary_priv_ip6}") assert r.ok, r.stdout + # Check every route has metrics associated. See LP: #2055397 + ip_route_show = client.execute("ip route show") + assert ip_route_show.ok, ip_route_show.stderr + for route in ip_route_show.splitlines(): + assert "metric" in route, "Expected metric to be in the route" + # Remove new NIC client.instance.remove_network_interface(secondary_priv_ip4) _wait_till_hotplug_complete(client, expected_runs=2)