Skip to content

Commit

Permalink
Additional tests to ensure 1.7.0 compatibility (#487)
Browse files Browse the repository at this point in the history
  • Loading branch information
benc-db authored Oct 26, 2023
2 parents 5d53855 + 7e34c38 commit b199f38
Show file tree
Hide file tree
Showing 7 changed files with 85 additions and 1 deletion.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
## dbt-databricks 1.7.x (TBD)
## dbt-databricks 1.7.0 (TBD)

### Features

- Added support for getting info only on specified relations to improve performance of gathering metadata ([486](https://github.com/databricks/dbt-databricks/pull/486))
- Added support for getting freshness from metadata ([481](https://github.com/databricks/dbt-databricks/pull/481))

### Under the Hood

- Added required adapter tests to ensure compatibility with 1.7.0 ([487](https://github.com/databricks/dbt-databricks/pull/487))

## dbt-databricks 1.7.0rc1 (October 13, 2023)

### Fixes
Expand Down
5 changes: 5 additions & 0 deletions tests/functional/adapter/test_date_spine.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from dbt.tests.adapter.utils.test_date_spine import BaseDateSpine


class TestDatabricksDateSpine(BaseDateSpine):
pass
5 changes: 5 additions & 0 deletions tests/functional/adapter/test_generate_series.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from dbt.tests.adapter.utils.test_generate_series import BaseGenerateSeries


class TestDatabricksGenerateSeries(BaseGenerateSeries):
pass
22 changes: 22 additions & 0 deletions tests/functional/adapter/test_get_intervals_between.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
from dbt.tests.adapter.utils.test_get_intervals_between import BaseGetIntervalsBetween
from dbt.tests.adapter.utils.fixture_get_intervals_between import (
models__test_get_intervals_between_yml,
)
import pytest


class TestDatabricksGetIntervalBetween(BaseGetIntervalsBetween):
model_sql = """
SELECT
{{ get_intervals_between('"2023-09-01"', '"2023-09-12"', "day") }} as intervals,
11 as expected
"""

@pytest.fixture(scope="class")
def models(self):
return {
"test_get_intervals_between.yml": models__test_get_intervals_between_yml,
"test_get_intervals_between.sql": self.interpolate_macro_namespace(
self.model_sql, "get_intervals_between"
),
}
5 changes: 5 additions & 0 deletions tests/functional/adapter/test_get_powers_of_two.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from dbt.tests.adapter.utils.test_get_powers_of_two import BaseGetPowersOfTwo


class TestDatabricksGetPowersOfTwo(BaseGetPowersOfTwo):
pass
9 changes: 9 additions & 0 deletions tests/functional/adapter/test_show.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from dbt.tests.adapter.dbt_show.test_dbt_show import BaseShowLimit, BaseShowSqlHeader


class TestShowLimitDatabricks(BaseShowLimit):
pass


class TestShowSqlHeaderDatabricks(BaseShowSqlHeader):
pass
34 changes: 34 additions & 0 deletions tests/functional/adapter/test_store_failures_as.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
from dbt.tests.adapter.store_test_failures_tests.basic import (
StoreTestFailuresAsInteractions,
StoreTestFailuresAsProjectLevelOff,
StoreTestFailuresAsProjectLevelView,
StoreTestFailuresAsProjectLevelEphemeral,
StoreTestFailuresAsGeneric,
StoreTestFailuresAsExceptions,
)


class TestDatabricksStoreTestFailuresAsInteractions(StoreTestFailuresAsInteractions):
pass


class TestDatabricksStoreTestFailuresAsProjectLevelOff(StoreTestFailuresAsProjectLevelOff):
pass


class TestDatabricksStoreTestFailuresAsProjectLevelView(StoreTestFailuresAsProjectLevelView):
pass


class TestDatabricksStoreTestFailuresAsProjectLevelEphemeral(
StoreTestFailuresAsProjectLevelEphemeral
):
pass


class TestDatabricksStoreTestFailuresAsGeneric(StoreTestFailuresAsGeneric):
pass


class TestDatabricksStoreTestFailuresAsExceptions(StoreTestFailuresAsExceptions):
pass

0 comments on commit b199f38

Please sign in to comment.