only send alert on failure

This commit is contained in:
jacksan 2025-04-04 11:33:08 -06:00
parent a8d6af10c3
commit 76141feb72

View File

@ -124,4 +124,8 @@ def send_alert(webhook_url):
if __name__ == '__main__':
webhook_url = os.environ.get("SLACK_WEBHOOK_URL")
data = log_test_result()
# Only send an alert if there are failures
if data['fail_count'] > 0:
send_alert(webhook_url)