From 4954d5232958890c36eb97ba114d74105fa25ca5 Mon Sep 17 00:00:00 2001 From: Amit Miran <47772523+amitmiran137@users.noreply.github.com> Date: Fri, 31 Dec 2021 07:17:54 +0200 Subject: [PATCH] ci: make presto hive tests to cover only chartData and sqljson (#17782) * chore: make presto hive tests to cover only chartData and sqljson * fix: single quote * fix: add eval for arguments * fix: add double quotes on args * chore: add @pytest.mark.sql_json_flow * fix: pre-commit --- .github/workflows/superset-python-presto-hive.yml | 4 ++-- scripts/python_tests.sh | 3 ++- tests/integration_tests/sqllab_tests.py | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/superset-python-presto-hive.yml b/.github/workflows/superset-python-presto-hive.yml index 31043ea399378..3a4022d893eef 100644 --- a/.github/workflows/superset-python-presto-hive.yml +++ b/.github/workflows/superset-python-presto-hive.yml @@ -80,7 +80,7 @@ jobs: - name: Python unit tests (PostgreSQL) if: steps.check.outcome == 'failure' run: | - ./scripts/python_tests.sh + ./scripts/python_tests.sh -m 'chart_data_flow or sql_json_flow' - name: Upload code coverage if: steps.check.outcome == 'failure' run: | @@ -158,7 +158,7 @@ jobs: - name: Python unit tests (PostgreSQL) if: steps.check.outcome == 'failure' run: | - ./scripts/python_tests.sh + ./scripts/python_tests.sh -m 'chart_data_flow or sql_json_flow' - name: Upload code coverage if: steps.check.outcome == 'failure' run: | diff --git a/scripts/python_tests.sh b/scripts/python_tests.sh index 9bf4ac035f138..36b2b808025c4 100755 --- a/scripts/python_tests.sh +++ b/scripts/python_tests.sh @@ -31,4 +31,5 @@ superset db upgrade superset init echo "Running tests" -pytest --durations=0 --maxfail=1 --cov=superset $@ + +pytest --durations=0 --maxfail=1 --cov=superset "$@" diff --git a/tests/integration_tests/sqllab_tests.py b/tests/integration_tests/sqllab_tests.py index 2dce2c11f3799..3c899d7d314cd 100644 --- a/tests/integration_tests/sqllab_tests.py +++ b/tests/integration_tests/sqllab_tests.py @@ -66,6 +66,7 @@ QUERY_3 = "SELECT * FROM birth_names LIMIT 10" +@pytest.mark.sql_json_flow class TestSqlLab(SupersetTestCase): """Testings for Sql Lab"""