mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-10-14 09:57:16 +00:00
improve api tests and error output
show only relevant aptly logs if a test fails. for async tasks, show task output, as it contains the error message.
This commit is contained in:
1 parent
8029305d32
commit
440c3debdc
11 files changed
+278
-175
No files matched your search
@@ -128,6 +128,7 @@ class BaseTest(object):
|
||||
requiresGPG2 = False
|
||||
requiresDot = False
|
||||
sortOutput = False
|
||||
debugOutput = False
|
||||
|
||||
aptlyDir = ".aptly"
|
||||
aptlyConfigFile = ".aptly.conf"
|
||||
@@ -177,6 +178,10 @@ class BaseTest(object):
|
||||
try:
|
||||
self.run()
|
||||
self.check()
|
||||
except Exception as exc:
|
||||
if self.debugOutput:
|
||||
print(f"API log:\n{self.debug_output()}")
|
||||
raise exc
|
||||
finally:
|
||||
self.teardown()
|
||||
|
||||
|
||||
Reference in new issue
Block a user