Skip to content

Commit

Permalink
Base 207/add test (#1266)
Browse files Browse the repository at this point in the history
* Add test for upstream change.
* Change database message.
* Adjust test case to reflect new syntax scheme.

---------

Co-authored-by: Mila Page <[email protected]>
Co-authored-by: Mike Alfare <[email protected]>
  • Loading branch information
3 people authored Jul 8, 2024
1 parent 0627aa2 commit 2c77893
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions tests/functional/adapter/dbt_show/test_dbt_show.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import pytest
from dbt.tests.adapter.dbt_show.test_dbt_show import BaseShowSqlHeader, BaseShowLimit
from dbt.tests.adapter.dbt_show.test_dbt_show import (
BaseShowSqlHeader,
BaseShowLimit,
BaseShowDoesNotHandleDoubleLimit,
)

from dbt.tests.util import run_dbt

Expand All @@ -20,8 +24,7 @@
]
)
as v
) as model_limit_subq
limit 5
)
"""

model_with_null_json_struct = """
Expand All @@ -48,7 +51,11 @@ def models(self):
}

def test_sql_header(self, project):
run_dbt(["show", "--select", "json_struct_model"])
run_dbt(["show", "--select", "json_struct_model", "-d"])

def test_show_with_null_json_struct(self, project):
run_dbt(["show", "--select", "null_json_struct_model"])


class TestBigQueryShowDoesNotHandleDoubleLimit(BaseShowDoesNotHandleDoubleLimit):
DATABASE_ERROR_MESSAGE = "Syntax error: Expected end of input but got keyword LIMIT"

0 comments on commit 2c77893

Please sign in to comment.