Browse Source

Merge "Don't fail integration tests if browser log couldn't be retrieved"

changes/19/782019/2
Zuul 4 months ago
committed by Gerrit Code Review
parent
commit
9ee7099927
  1. 10
      openstack_dashboard/test/integration_tests/helpers.py

10
openstack_dashboard/test/integration_tests/helpers.py

@ -254,10 +254,12 @@ class BaseTestCase(testtools.TestCase):
def _attach_browser_log(self, exc_info=None):
browser_log_path = os.path.join(self._test_report_dir, 'browser.log')
with self.log_exception("Attach browser log"):
with open(browser_log_path, 'w') as f:
f.write(
self._unwrap_browser_log(self.driver.get_log('browser')))
try:
log = self._unwrap_browser_log(self.driver.get_log('browser'))
except Exception:
log = traceback.format_exc()
with open(browser_log_path, 'w') as f:
f.write(log)
def _attach_test_log(self, exc_info=None):
test_log_path = os.path.join(self._test_report_dir, 'test.log')

Loading…
Cancel
Save