summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--TESTING.rst14
-rw-r--r--neutron/tests/contrib/hooks/ubuntu_image5
-rw-r--r--neutron/tests/tempest/config.py4
-rw-r--r--neutron/tests/tempest/scenario/test_trunk.py4
-rw-r--r--releasenotes/notes/advanced_image-8abff2ca91de7f6c.yaml11
5 files changed, 38 insertions, 0 deletions
diff --git a/TESTING.rst b/TESTING.rst
index faed0d4c7f..4744463f7f 100644
--- a/TESTING.rst
+++ b/TESTING.rst
@@ -386,6 +386,20 @@ https://docs.openstack.org/tempest/latest/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
~~~~~~~~~~~
diff --git a/neutron/tests/contrib/hooks/ubuntu_image b/neutron/tests/contrib/hooks/ubuntu_image
index ad710b8b83..0e14303fa5 100644
--- a/neutron/tests/contrib/hooks/ubuntu_image
+++ b/neutron/tests/contrib/hooks/ubuntu_image
@@ -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
diff --git a/neutron/tests/tempest/config.py b/neutron/tests/tempest/config.py
index 5a9ac77c5c..6830b184f1 100644
--- a/neutron/tests/tempest/config.py
+++ b/neutron/tests/tempest/config.py
@@ -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
diff --git a/neutron/tests/tempest/scenario/test_trunk.py b/neutron/tests/tempest/scenario/test_trunk.py
index 5d775ef351..1412b11f22 100644
--- a/neutron/tests/tempest/scenario/test_trunk.py
+++ b/neutron/tests/tempest/scenario/test_trunk.py
@@ -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
diff --git a/releasenotes/notes/advanced_image-8abff2ca91de7f6c.yaml b/releasenotes/notes/advanced_image-8abff2ca91de7f6c.yaml
new file mode 100644
index 0000000000..3f08a32aa5
--- /dev/null
+++ b/releasenotes/notes/advanced_image-8abff2ca91de7f6c.yaml
@@ -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``.
+