From d1cc3e880ca842ac6497b0e97b7d178a5e2fa429 Mon Sep 17 00:00:00 2001 From: Pere Miquel Brull Date: Wed, 16 Nov 2022 17:43:48 +0100 Subject: [PATCH] Fix e2e test and add slack alert (#8817) * Fix mysql test * Run alarm on failed test * Force failure for testing --- .github/workflows/py-cli-e2e-tests.yml | 13 +++++++++++++ ingestion/tests/cli_e2e/test_cli_mysql.py | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/py-cli-e2e-tests.yml b/.github/workflows/py-cli-e2e-tests.yml index c632df9c9f3..b7f543a161a 100644 --- a/.github/workflows/py-cli-e2e-tests.yml +++ b/.github/workflows/py-cli-e2e-tests.yml @@ -62,8 +62,21 @@ jobs: timeout-minutes: 30 - name: Run Python Tests + id: e2e-test env: E2E_TEST: ${{ matrix.e2e-test }} run: | source env/bin/activate python -m pytest -c ingestion/setup.cfg ingestion/tests/cli_e2e/test_cli_$E2E_TEST.py + + - name: Slack on Failure + if: steps.e2e-test.outcome != 'success' + uses: slackapi/slack-github-action@v1.23.0 + with: + payload: | + { + "text": "🔥 Failed E2E Test for $E2E_TEST 🔥" + } + env: + SLACK_WEBHOOK_URL: ${{ secrets.E2E_SLACK_WEBHOOK }} + SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK diff --git a/ingestion/tests/cli_e2e/test_cli_mysql.py b/ingestion/tests/cli_e2e/test_cli_mysql.py index b098466b000..fae2aef631b 100644 --- a/ingestion/tests/cli_e2e/test_cli_mysql.py +++ b/ingestion/tests/cli_e2e/test_cli_mysql.py @@ -104,4 +104,4 @@ class MysqlCliTest(CliCommonDB.TestSuite): @staticmethod def expected_filtered_mix() -> int: - return 43 + return 44