Add a runner for contrail-test Juniper tests
- add steps in tcp_tests/templates/opencontrail to prepare tests
- add a fixture and a test runner 'test_opencontrail' that gets
the two variables from environment to pass them to test runner:
export OPENCONTRAIL_TAGS=smoke
export OPENCONTRAIL_FEATURES=neutron
- fix docstrings for fixtures
- add print of the environment variables that can be used in tests
and current defaults (taking into account the exported variables)
diff --git a/tcp_tests/fixtures/openstack_fixtures.py b/tcp_tests/fixtures/openstack_fixtures.py
index 48e9125..c7e648e 100644
--- a/tcp_tests/fixtures/openstack_fixtures.py
+++ b/tcp_tests/fixtures/openstack_fixtures.py
@@ -42,27 +42,29 @@
def openstack_deployed(revert_snapshot, request, config,
hardware, underlay, common_services_deployed,
openstack_actions):
- """Fixture to get or install TCP on environment
+ """Fixture to get or install OpenStack services on environment
+ :param revert_snapshot: fixture that reverts snapshot that is specified
+ in test with @pytest.mark.revert_snapshot(<name>)
:param request: fixture provides pytest data
:param config: fixture provides oslo.config
:param hardware: fixture provides enviromnet manager
:param underlay: fixture provides underlay manager
- :param tcp_actions: fixture provides TCPManager instance
- :rtype: TCPManager
+ :param tcp_actions: fixture provides OpenstackManager instance
+ :rtype: OpenstackManager
- If config.tcp.tcp_host is not set, this fixture assumes that
- the tcp cluster was not deployed, and do the following:
- - deploy tcp cluster
- - make snapshot with name 'tcp_deployed'
- - return TCPCluster instance
+ If config.openstack.openstack_installed is not set, this fixture assumes
+ that the openstack services were not installed, and do the following:
+ - install openstack services
+ - make snapshot with name 'openstack_deployed'
+ - return OpenstackManager instance
- If config.tcp.tcp_host was set, this fixture assumes that the tcp
- cluster was already deployed, and do the following:
- - return TCPCluster instance
+ If config.openstack.openstack_installed was set, this fixture assumes that
+ the openstack services were already installed, and do the following:
+ - return OpenstackManager instance
- If you want to revert 'tcp_deployed' snapshot, please use mark:
- @pytest.mark.revert_snapshot("tcp_deployed")
+ If you want to revert 'openstack_deployed' snapshot, please use mark:
+ @pytest.mark.revert_snapshot("openstack_deployed")
"""
# If no snapshot was reverted, then try to revert the snapshot
# that belongs to the fixture.
@@ -73,7 +75,7 @@
hardware.revert_snapshot(ext.SNAPSHOT.openstack_deployed)
# Create Salt cluster
- if not config.openstack.installed:
+ if not config.openstack.openstack_installed:
steps_path = config.openstack_deploy.openstack_steps_path
with underlay.yaml_editor(steps_path) as commands:
openstack_actions.install(commands.content)