From 7aa02077ac12c05950eac6094f330d4082cf8881 Mon Sep 17 00:00:00 2001 From: Fiorella Yanac Date: Thu, 7 Sep 2023 13:32:00 +0100 Subject: [PATCH] Add username in resource_setup There is a condition when rhel is used as default image in tempest, so default_image_is_advanced set as true and validation.image_ssh_user is set but advanced_image_ssh_user is not set. test_fragmented_traffic_is_accepted was failing because advanced_image_ssh_user was empty. Change-Id: I7fa5b167ba27cc78e017765eca927a1dfb24825e --- neutron_tempest_plugin/scenario/test_security_groups.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/neutron_tempest_plugin/scenario/test_security_groups.py b/neutron_tempest_plugin/scenario/test_security_groups.py index e2d25ee1..3d075b4e 100644 --- a/neutron_tempest_plugin/scenario/test_security_groups.py +++ b/neutron_tempest_plugin/scenario/test_security_groups.py @@ -1116,12 +1116,16 @@ class StatelessNetworkSecGroupIPv4Test(BaseNetworkSecGroupTest): def test_fragmented_traffic_is_accepted(self): ssh_clients, fips, servers, security_groups = ( self._create_client_and_server_vms(use_advanced_image=True)) + if CONF.neutron_plugin_options.default_image_is_advanced: + username = CONF.validation.image_ssh_user + else: + username = CONF.neutron_plugin_options.advanced_image_ssh_user # make sure tcp connectivity to vms works fine for fip in fips.values(): self.check_connectivity( fip['floating_ip_address'], - CONF.neutron_plugin_options.advanced_image_ssh_user, + username, self.keypair['private_key']) # Check that ICMP packets bigger than MTU aren't working without