[Tempest] Running Trunk test with advanced image only

1)Adding 'image_is_advanced' option to tempest config, so you can
run specific tests with images that are not cirros.
2)Adding decorator to run 'subport_connectivity' test with such
image for VLAN aware VM feature.
3)Configuring gate to run trunk test with ubuntu image only
4) Updating release notes and TESTING.rst with the change

Change-Id: Ie15b0e79c6ea320322b2815fb8afbc8ec95f853a
This commit is contained in:
Genadi Chereshnya 2017-07-16 09:51:58 +03:00 committed by Ihar Hrachyshka
parent 8326a65a5e
commit 314277286d
5 changed files with 38 additions and 0 deletions

View File

@ -386,6 +386,20 @@ http://docs.openstack.org/developer/tempest/field_guide/scenario.html
Scenario tests, like API tests, are split between the Tempest and Neutron
repositories according to the Neutron API the test is targeting.
Some scenario tests require advanced ``Glance`` images (for example, ``Ubuntu``
or ``CentOS``) in order to pass. Those tests are skipped by default. To enable
them, make sure ``tempest.conf`` is configured to use an advanced image, and
then set the following in ``tempest`` configuration file::
.. code-block:: ini
[neutron_plugin_options]
image_is_advanced = True
Specific test requirements for advanced images are:
#. ``test_trunk`` requires ``802.11q`` kernel module loaded.
Rally Tests
~~~~~~~~~~~

View File

@ -3,3 +3,8 @@ IMAGE_URLS="http://cloud-images.ubuntu.com/releases/16.04/release-20170113/ubunt
DEFAULT_INSTANCE_TYPE=ds512M
DEFAULT_INSTANCE_USER=ubuntu
BUILD_TIMEOUT=392
[[test-config|$TEMPEST_CONFIG]]
[neutron_plugin_options]
image_is_advanced=True

View File

@ -30,6 +30,10 @@ NeutronPluginOptions = [
default=[],
help='List of network types available to neutron, '
'e.g. vxlan,vlan,gre.'),
cfg.BoolOpt('image_is_advanced',
default=False,
help='Image that supports features that cirros does not, like'
' Ubuntu or CentOS supporting advanced features'),
]
# TODO(amuller): Redo configuration options registration as part of the planned

View File

@ -18,6 +18,7 @@ from tempest.common import waiters
from tempest.lib.common.utils import data_utils
from tempest.lib import decorators
from tempest import test
import testtools
from neutron.common import utils
from neutron.tests.tempest.common import ssh
@ -221,6 +222,9 @@ class TrunkTest(base.BaseTempestTestCase):
CONF.validation.image_ssh_user,
self.keypair['private_key'])
@testtools.skipUnless(
CONF.neutron_plugin_options.image_is_advanced,
"Advanced image is required to run this test.")
@decorators.idempotent_id('a8a02c9b-b453-49b5-89a2-cce7da66aafb')
def test_subport_connectivity(self):
vlan_tag = 10

View File

@ -0,0 +1,11 @@
---
features:
- |
Some scenario tests require advanced ``Glance`` images (for example,
``Ubuntu`` or ``CentOS``) in order to pass. They are now skipped by
default. If you need to execute those tests, please configure
``tempest.conf`` to use an advanced image, and set ``image_is_advanced`` in
``neutron_plugin_options`` section of ``tempest.conf`` file to ``True``.
The first scenario test case that requires the new option set to execute is
``test_trunk``.