Fix bash cmd used in scenario trunk tests
In scenario trunk test test_subport_connectivity there
is bash command used to check name of base interface on
spawned vm (e.g. ens3 or eth0), configure vlan interface
with vlan_id used on trunk port (e.g. ens3.10),
make this vlan device up and run dhclient on this interface
if it's not running yet.
This command was broken and that cause failure of this test.
Change-Id: I4c0207f79cd6df2594f976b9509697209011edf2
Closes-Bug: #1766701
diff --git a/neutron_tempest_plugin/scenario/test_trunk.py b/neutron_tempest_plugin/scenario/test_trunk.py
index 2ff7e5d..f7568c5 100644
--- a/neutron_tempest_plugin/scenario/test_trunk.py
+++ b/neutron_tempest_plugin/scenario/test_trunk.py
@@ -29,13 +29,11 @@
CONF = config.CONF
CONFIGURE_VLAN_INTERFACE_COMMANDS = (
- 'IFACE=$(PATH=$PATH:/usr/sbin ip l | grep "^[0-9]*: e" |'
- 'cut -d \: -f 2) && '
- 'sudo su -c '
- '"ip l a link $IFACE name $IFACE.%(tag)d type vlan id %(tag)d &&'
- 'ip l s up dev $IFACE.%(tag)d && '
- '{ ps -ef | grep -q "dhclient .*$IFACE.%(tag)d" || '
- 'dhclient $IFACE.%(tag)d"; }')
+ 'IFACE=$(PATH=$PATH:/usr/sbin ip l | grep "^[0-9]*: e"|cut -d \: -f 2) &&'
+ 'sudo ip l a link $IFACE name $IFACE.%(tag)d type vlan id %(tag)d &&'
+ 'sudo ip l s up dev $IFACE.%(tag)d && '
+ 'ps -ef | grep -q "[d]hclient .*$IFACE.%(tag)d" || '
+ 'sudo dhclient $IFACE.%(tag)d;')
class TrunkTest(base.BaseTempestTestCase):
@@ -141,7 +139,6 @@
CONF.validation.image_ssh_user,
self.keypair['private_key'])
- @utils.unstable_test("bug 1766701")
@decorators.idempotent_id('bb13fe28-f152-4000-8131-37890a40c79e')
def test_trunk_subport_lifecycle(self):
"""Test trunk creation and subport transition to ACTIVE status.
@@ -222,7 +219,6 @@
CONF.validation.image_ssh_user,
self.keypair['private_key'])
- @utils.unstable_test('bug 1766701')
@testtools.skipUnless(
CONF.neutron_plugin_options.image_is_advanced,
"Advanced image is required to run this test.")