Add logging for salt-api requests/responses
Change-Id: I0dd73c60cc4364ce5962ddb2520390ad3ee32f06
Closes-Task:#PROD-29994(PROD:29994)
diff --git a/test_set/cvp-sanity/conftest.py b/test_set/cvp-sanity/conftest.py
index 7c85d62..72e0359 100644
--- a/test_set/cvp-sanity/conftest.py
+++ b/test_set/cvp-sanity/conftest.py
@@ -1,4 +1,5 @@
from fixtures.base import *
+import logging
@pytest.hookimpl(tryfirst=True, hookwrapper=True)
@@ -20,10 +21,10 @@
return
try:
if request.node.rep_setup.failed:
- print("setup failed. The following steps were attempted: \n {steps}".format(steps=request.node.description))
+ logging.warning("setup failed. The following steps were attempted: \n {steps}".format(steps=request.node.description))
elif request.node.rep_setup.passed:
if request.node.rep_call.failed:
- print("test execution failed! The following steps were attempted: \n {steps}".format(steps=request.node.description))
+ logging.warning("test execution failed! The following steps were attempted: \n {steps}".format(steps=request.node.description))
except BaseException as e:
- print("Error in show_test_steps fixture: {}".format(e))
+ logging.info("Error in show_test_steps fixture: {}".format(e))
pass