Migrate some test cases from scenario to sanity test suite

Change-Id: I346dfc66c2f40076bf681112dad76933434f675a
This commit is contained in:
Federico Ressi 2022-02-09 11:10:07 +01:00
parent 93c5de485d
commit b35fba7ed4
18 changed files with 59 additions and 4 deletions

View File

@ -1,17 +1,35 @@
--- ---
test_workflow_steps: test_workflow_steps:
- tox_description: 'run sanity test cases before creating resources'
tox_envlist: neutron_sanity
tox_step_name: before
tox_environment:
TOBIKO_PREVENT_CREATE: no
- tox_description: 'create Neutron resources' - tox_description: 'create Neutron resources'
tox_envlist: neutron tox_envlist: neutron
tox_step_name: create_neutron_resources tox_step_name: create_neutron_resources
tox_environment: tox_environment:
TOBIKO_PREVENT_CREATE: no TOBIKO_PREVENT_CREATE: no
- tox_description: 'run sanity test cases before disruptive tests'
tox_envlist: neutron_sanity
tox_step_name: between
tox_environment:
TOBIKO_PREVENT_CREATE: no
- tox_description: 'run disruptive test cases' - tox_description: 'run disruptive test cases'
tox_envlist: neutron_faults tox_envlist: neutron_faults
tox_step_name: neutron_faults tox_step_name: neutron_faults
pytest_maxfail: 1 pytest_maxfail: 1
- tox_description: 'run sanity test cases after disruptive tests'
tox_envlist: neutron_sanity
tox_step_name: after
tox_environment:
TOBIKO_PREVENT_CREATE: no
- tox_description: 'verify Neutron resources' - tox_description: 'verify Neutron resources'
tox_envlist: neutron tox_envlist: neutron
tox_step_name: verify_neutron_resources tox_step_name: verify_neutron_resources

View File

@ -1,15 +1,21 @@
--- ---
test_workflow_steps: test_workflow_steps:
- tox_description: 'run sanity test cases before creating resources'
tox_envlist: sanity
tox_step_name: before
tox_environment:
TOBIKO_PREVENT_CREATE: no
- tox_description: 'create workload resources' - tox_description: 'create workload resources'
tox_envlist: scenario tox_envlist: scenario
tox_step_name: create_resources tox_step_name: create_resources
tox_environment: tox_environment:
TOBIKO_PREVENT_CREATE: no TOBIKO_PREVENT_CREATE: no
- tox_description: 'run sanity test cases before disruptive test cases' - tox_description: 'run sanity test cases before disruptive tests'
tox_envlist: sanity tox_envlist: sanity
tox_step_name: before_faults tox_step_name: between
tox_environment: tox_environment:
TOBIKO_PREVENT_CREATE: no TOBIKO_PREVENT_CREATE: no
@ -20,9 +26,9 @@ test_workflow_steps:
TOBIKO_PREVENT_CREATE: no TOBIKO_PREVENT_CREATE: no
pytest_maxfail: 1 pytest_maxfail: 1
- tox_description: 'run sanity test cases after disruptive test cases' - tox_description: 'run sanity test cases after disruptive tests'
tox_envlist: sanity tox_envlist: sanity
tox_step_name: after_faults tox_step_name: after
tox_environment: tox_environment:
TOBIKO_PREVENT_CREATE: no TOBIKO_PREVENT_CREATE: no

View File

@ -0,0 +1,14 @@
---
test_workflow_steps:
- tox_description: 'run sanity test cases before creating resources'
tox_envlist: sanity
tox_step_name: before
tox_environment:
TOBIKO_PREVENT_CREATE: no
- tox_description: 'create workload resources'
tox_envlist: scenario
tox_step_name: create_resources
tox_environment:
TOBIKO_PREVENT_CREATE: no

View File

View File

View File

@ -17,6 +17,7 @@ from __future__ import absolute_import
import typing import typing
from oslo_log import log from oslo_log import log
import pytest
import testtools import testtools
import tobiko import tobiko
@ -33,6 +34,7 @@ CONF = config.CONF
LOG = log.getLogger(__name__) LOG = log.getLogger(__name__)
@pytest.mark.minimal
class FloatingIPTest(testtools.TestCase): class FloatingIPTest(testtools.TestCase):
"""Tests connectivity via floating IPs""" """Tests connectivity via floating IPs"""

View File

@ -25,6 +25,7 @@ from tobiko.shell import ping
from tobiko.shell import sh from tobiko.shell import sh
@pytest.mark.minimal
class NetworkTest(testtools.TestCase): class NetworkTest(testtools.TestCase):
#: Resources stack with Nova server to send messages to #: Resources stack with Nova server to send messages to

View File

@ -39,6 +39,7 @@ IPV4 = constants.IP_VERSION_4
IPV6 = constants.IP_VERSION_6 IPV6 = constants.IP_VERSION_6
@pytest.mark.minimal
class PortTest(testtools.TestCase): class PortTest(testtools.TestCase):
"""Test Neutron ports""" """Test Neutron ports"""

View File

@ -31,6 +31,7 @@ LOG = log.getLogger(__name__)
CONF = config.CONF CONF = config.CONF
@pytest.mark.minimal
class RouterTest(testtools.TestCase): class RouterTest(testtools.TestCase):
"""Test Neutron routers""" """Test Neutron routers"""

View File

@ -49,6 +49,7 @@ class CirrosServerStackFixture(stacks.CirrosServerStackFixture):
return stack return stack
@pytest.mark.minimal
@keystone.skip_unless_has_keystone_credentials() @keystone.skip_unless_has_keystone_credentials()
class CirrosServerTest(testtools.TestCase): class CirrosServerTest(testtools.TestCase):

10
tox.ini
View File

@ -232,6 +232,16 @@ setenv =
PYTEST_TIMEOUT = 1800 PYTEST_TIMEOUT = 1800
[testenv:neutron_sanity]
basepython = {[integration]basepython}
envdir = {[integration]envdir}
passenv = {[integration]passenv}
setenv =
{[testenv:sanity]setenv}
OS_TEST_PATH = {toxinidir}/tobiko/tests/sanity/neutron
[testenv:faults] [testenv:faults]
basepython = {[integration]basepython} basepython = {[integration]basepython}

View File

@ -13,6 +13,7 @@
- devstack-tobiko-neutron - devstack-tobiko-neutron
- devstack-tobiko-nova - devstack-tobiko-nova
- devstack-tobiko-ovs - devstack-tobiko-ovs
- devstack-tobiko-sanity
- devstack-tobiko-storage - devstack-tobiko-storage
- docs-on-readthedocs - docs-on-readthedocs
- openstack-cover-jobs - openstack-cover-jobs