[ostf] Improve logging in OSTF tests
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Fuel for OpenStack |
Fix Released
|
Medium
|
Tatyanka |
Bug Description
Currently, traceback of failed OSTF tests is lost because of incorrect raising of exceptions and use of logging.
We need to use traceback python module in all logging cases and also pass exception information to wrapper methods, e.g. 'fail' method, which sends fail message:
def fail(self, msg=None):
"""Fail immediately, with the given message."""
raise self.failureExc
This one should also receive traceback from upper exception and log this information. Otherwise, we only have information that an error happened and no traceback.
E.g.:
except Exception as exc:
...
except Exception as exc:
except Exception as e:
exc_type, exc_value, exc_tb = sys.exc_info()
exc_
self.
....
def fail(self, msg=None, exc_info=None):
"""Fail immediately, with the given message."""
raise self.failureExc
Changed in fuel: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
Changed in fuel: | |
milestone: | none → 4.0 |
Changed in fuel: | |
status: | Confirmed → In Progress |
add traceback. fornat_ exc() in logging. As about self.fail - do not agree to change it, according we show on UI all data that we push in fail() method