Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional tests to ensure 1.7.0 compatibility #487

Merged
merged 2 commits into from
Oct 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading