test: don't silently fail reposts in tests (#31559)

This commit is contained in:
Ankush Menat 2022-07-08 19:28:03 +05:30 committed by GitHub
parent 8b69a3ec7a
commit 4ec85cb2f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -138,6 +138,11 @@ def repost(doc):
doc.set_status("Completed")
except Exception as e:
if frappe.flags.in_test:
# Don't silently fail in tests,
# there is no reason for reposts to fail in CI
raise
frappe.db.rollback()
traceback = frappe.get_traceback()
doc.log_error("Unable to repost item valuation")