From e6e4c485bc0b8185c9352d9748ef745da60c73da Mon Sep 17 00:00:00 2001 From: alesapin Date: Thu, 25 Nov 2021 16:41:38 +0300 Subject: [PATCH] More simple --- tests/ci/fast_test_check.py | 6 ++---- tests/ci/functional_test_check.py | 7 ++----- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/tests/ci/fast_test_check.py b/tests/ci/fast_test_check.py index 2ae105001fc..4b1e5b64d08 100644 --- a/tests/ci/fast_test_check.py +++ b/tests/ci/fast_test_check.py @@ -146,7 +146,5 @@ if __name__ == "__main__": ch_helper.insert_events_into(db="gh-data", table="checks", events=prepared_events) # Refuse other checks to run if fast test failed - for test_result in test_results: - status = test_result[1] - if status != "OK": - sys.exit(1) + if state != 'success': + sys.exit(1) diff --git a/tests/ci/functional_test_check.py b/tests/ci/functional_test_check.py index 1e4a34c97c5..a2f42914f64 100644 --- a/tests/ci/functional_test_check.py +++ b/tests/ci/functional_test_check.py @@ -172,8 +172,5 @@ if __name__ == "__main__": prepared_events = prepare_tests_results_for_clickhouse(pr_info, test_results, state, stopwatch.duration_seconds, stopwatch.start_time_str, report_url, check_name) ch_helper.insert_events_into(db="gh-data", table="checks", events=prepared_events) - # If some tests failed set red status to check - for test_result in test_results: - status = test_result[1] - if status != "OK": - sys.exit(1) + if state != 'success': + sys.exit(1)