From 0fe8afc105ed196bcd201c0c487f03e2f93aba8b Mon Sep 17 00:00:00 2001 From: Michelle Ark <MichelleArk@users.noreply.github.com> Date: Thu, 28 Sep 2023 19:32:25 +0100 Subject: [PATCH] Add dbt show tests (#927) * add dbt show tests * changelog entry * repoint to core main * reuse core fixture for dbt show sql header test --------- Co-authored-by: Matthew McKnight <91097623+McKnight-42@users.noreply.github.com> Co-authored-by: Matthew McKnight <matthew.mcknight@dbtlabs.com> --- .changes/unreleased/Under the Hood-20230925-143628.yaml | 6 ++++++ dev-requirements.txt | 4 ++-- tests/functional/adapter/dbt_show/test_dbt_show.py | 9 +++++++++ 3 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 .changes/unreleased/Under the Hood-20230925-143628.yaml create mode 100644 tests/functional/adapter/dbt_show/test_dbt_show.py diff --git a/.changes/unreleased/Under the Hood-20230925-143628.yaml b/.changes/unreleased/Under the Hood-20230925-143628.yaml new file mode 100644 index 000000000..fb925ae40 --- /dev/null +++ b/.changes/unreleased/Under the Hood-20230925-143628.yaml @@ -0,0 +1,6 @@ +kind: Under the Hood +body: Add tests for inlined limit + sql-header in dbt show query +time: 2023-09-25T14:36:28.335466+01:00 +custom: + Author: michelleark + Issue: "940" diff --git a/dev-requirements.txt b/dev-requirements.txt index 54ca40f26..fa5c37b49 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -1,7 +1,7 @@ # install latest changes in dbt-core # TODO: how to automate switching from develop to version branches? -git+https://github.com/dbt-labs/dbt-core.git#egg=dbt-core&subdirectory=core -git+https://github.com/dbt-labs/dbt-core.git#egg=dbt-tests-adapter&subdirectory=tests/adapter +git+https://github.com/dbt-labs/dbt-core.git@improve-show-fixture#egg=dbt-core&subdirectory=core +git+https://github.com/dbt-labs/dbt-core.git@improve-show-fixture#egg=dbt-tests-adapter&subdirectory=tests/adapter # if version 1.x or greater -> pin to major version # if version 0.x -> pin to minor diff --git a/tests/functional/adapter/dbt_show/test_dbt_show.py b/tests/functional/adapter/dbt_show/test_dbt_show.py new file mode 100644 index 000000000..c60a26aec --- /dev/null +++ b/tests/functional/adapter/dbt_show/test_dbt_show.py @@ -0,0 +1,9 @@ +from dbt.tests.adapter.dbt_show.test_dbt_show import BaseShowSqlHeader, BaseShowLimit + + +class TestBigQueryShowLimit(BaseShowLimit): + pass + + +class TestBigQueryShowSqlHeader(BaseShowSqlHeader): + pass