Set grab_versions and snapshot fixtures as dependency for salt_deployed
Sometimes, order of the fixtures is built in such way that
pytest tries to complete 'salt_deployed' before 'grab_versions'.
This lead to missing logs after the test is completed or failed.
Explicit set grab_versions to run before the salt_deployed, instead
of relying on floating order with 'autouse'.
The same for the fixture 'snapshot'
Change-Id: I4098413e0c6a016442630334c04bce218cb7f479
diff --git a/tcp_tests/fixtures/salt_fixtures.py b/tcp_tests/fixtures/salt_fixtures.py
index aff28dc..58c8509 100644
--- a/tcp_tests/fixtures/salt_fixtures.py
+++ b/tcp_tests/fixtures/salt_fixtures.py
@@ -35,7 +35,7 @@
@pytest.mark.revert_snapshot(ext.SNAPSHOT.salt_deployed)
@pytest.fixture(scope='function')
def salt_deployed(revert_snapshot, request, config,
- hardware, underlay, salt_actions):
+ hardware, underlay, salt_actions, grab_versions, snapshot):
"""Fixture to get or install salt service on environment
:param revert_snapshot: fixture that reverts snapshot that is specified
diff --git a/tcp_tests/fixtures/underlay_fixtures.py b/tcp_tests/fixtures/underlay_fixtures.py
index eacbec9..7502df2 100644
--- a/tcp_tests/fixtures/underlay_fixtures.py
+++ b/tcp_tests/fixtures/underlay_fixtures.py
@@ -110,7 +110,7 @@
return None
-@pytest.fixture(scope='function', autouse=True)
+@pytest.fixture(scope='function')
def snapshot(request, hardware):
"""Fixture for creating snapshot at the end of test if it's needed
@@ -198,7 +198,7 @@
return underlay
-@pytest.fixture(scope='function', autouse=True)
+@pytest.fixture(scope='function')
def grab_versions(request, func_name, underlay):
"""Fixture for grab package versions at the end of test