Fix for migration tests
Fixture for migration tests should have "function" type.
There is no "rep_call" attribute for test call
in case of preparation failed. Test results order check
changed accordingly.
Change-Id: I7e58a111501ad41701ebfaa703fb12e7a9670fed
Partial-Bug: 1647483
(cherry picked from commit df210476ed
)
This commit is contained in:
parent
2032de9dde
commit
99e4415d0e
|
@ -71,12 +71,7 @@ def snapshot(request):
|
|||
fail_snapshot = request.keywords.get('fail_snapshot', None)
|
||||
|
||||
def test_fin():
|
||||
if request.node.rep_call.passed:
|
||||
if get_logs:
|
||||
request.instance.manager.make_diagnostic_snapshot(
|
||||
status="test_pass",
|
||||
name=request.node.function.__name__)
|
||||
elif request.node.rep_setup.failed:
|
||||
if request.node.rep_setup.failed:
|
||||
if get_logs:
|
||||
request.instance.manager.make_diagnostic_snapshot(
|
||||
status="prepare_failed",
|
||||
|
@ -84,6 +79,11 @@ def snapshot(request):
|
|||
if fail_snapshot:
|
||||
request.instance.manager.save_env_snapshot(
|
||||
name="prep_fail_{}".format(request.node.function.__name__))
|
||||
elif request.node.rep_call.passed:
|
||||
if get_logs:
|
||||
request.instance.manager.make_diagnostic_snapshot(
|
||||
status="test_pass",
|
||||
name=request.node.function.__name__)
|
||||
elif request.node.rep_call.failed:
|
||||
if get_logs:
|
||||
request.instance.manager.make_diagnostic_snapshot(
|
||||
|
|
|
@ -25,11 +25,11 @@ from fuelweb_test import settings
|
|||
# pylint: disable=no-member
|
||||
|
||||
|
||||
@pytest.fixture(scope='session')
|
||||
@pytest.fixture(scope='function')
|
||||
def fuel_master_migration(request):
|
||||
"""Fixture which migrate Fuel Master to a compute"""
|
||||
|
||||
instance = request.node.items[-1].instance
|
||||
instance = request.node.instance
|
||||
cluster_id = instance._storage['cluster_id']
|
||||
instance.start_fuel_migration()
|
||||
instance.check_migration_status()
|
||||
|
|
Loading…
Reference in New Issue