mirror of
https://github.com/apache/superset.git
synced 2026-04-20 00:24:38 +00:00
fix: pass in slack error messages properly (#22727)
This commit is contained in:
committed by
GitHub
parent
08078753b7
commit
c58dbf8b9c
@@ -1208,8 +1208,21 @@ def test_slack_chart_report_schedule_with_errors(
|
||||
).run()
|
||||
|
||||
db.session.commit()
|
||||
# Assert errors are being logged)
|
||||
assert get_error_logs_query(create_report_slack_chart).count() == (idx + 1) * 2
|
||||
|
||||
# Assert errors are being logged
|
||||
|
||||
# Only one notification log is sent because it's in grace period
|
||||
# for the rest of the reports
|
||||
notification_logs_count = get_notification_error_sent_count(
|
||||
create_report_slack_chart
|
||||
)
|
||||
error_logs = get_error_logs_query(create_report_slack_chart)
|
||||
|
||||
# check that we have two logs for each error
|
||||
assert error_logs.count() == (len(slack_errors) + notification_logs_count) * 2
|
||||
|
||||
# check that each error has a message
|
||||
assert len([log.error_message for log in error_logs]) == error_logs.count()
|
||||
|
||||
|
||||
@pytest.mark.usefixtures(
|
||||
|
||||
Reference in New Issue
Block a user