Testcases for services failover
- keepalived restart # 4756965
- keepalived stop # 3385682
Changes:
- RallyManager refactored to use updated rally container with tempest
- Added 'rally.create_rally_task' and 'rally.run_task' methods to
generate load on the OpenStack cluster with the specified task config
- new mark for test cases that configure 'rally' fixture:
@pytest.mark.with_rally(rally_node=<str>,
prepare_openstack=<bool>,
prepare_tempest=<bool>)
- a new method common_services_deployed.check_keepalived_pillar()
to check the keepalived pillar settings consistency
- a new fixture 'func_name' returns the current test function name
- a new method 'underlay.get_target_node_names(target='ctl')' to get
a list of all nodes which name starts with the specified target string
- a new method underlay.delayed_call() which can postpone the specified
shell command to run in several minutes later in the background
on the specified node
- fixture 'grab_versions' now works also for failed tests
Change-Id: Icede63163ae0b3569e8463563cb548e2d314899d
diff --git a/tcp_tests/fixtures/rally_fixtures.py b/tcp_tests/fixtures/rally_fixtures.py
index 18fa179..335ab88 100644
--- a/tcp_tests/fixtures/rally_fixtures.py
+++ b/tcp_tests/fixtures/rally_fixtures.py
@@ -18,13 +18,19 @@
@pytest.fixture(scope='function')
-def rally(config, underlay):
+def rally(request, config, underlay):
"""Fixture that provides various actions for TCP
+ :param request: fixture provides pytest data
:param config: fixture provides oslo.config
:param underlay: fixture provides underlay manager
:rtype: RallyManager
For use in tests or fixtures to deploy a custom TCP
"""
- return rallymanager.RallyManager(underlay, config.salt.salt_master_host)
+ with_rally = request.keywords.get('with_rally', None)
+ rally_node = "gtw01."
+ if with_rally:
+ rally_node = with_rally.kwargs.get("rally_node", "gtw01.")
+
+ return rallymanager.RallyManager(underlay, rally_node)