-
Notifications
You must be signed in to change notification settings - Fork 183
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial use of adapter test framework (#106)
- Loading branch information
Showing
6 changed files
with
85 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[pytest] | ||
filterwarnings = | ||
ignore:.*'soft_unicode' has been renamed to 'soft_str'*:DeprecationWarning | ||
ignore:unclosed file .*:ResourceWarning | ||
env_files = | ||
test.env | ||
testpaths = | ||
tests/unit | ||
tests/integration | ||
tests/functional |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import pytest | ||
import os | ||
|
||
# Import the fuctional fixtures as a plugin | ||
# Note: fixtures with session scope need to be local | ||
|
||
pytest_plugins = ["dbt.tests.fixtures.project"] | ||
|
||
# The profile dictionary, used to write out profiles.yml | ||
@pytest.fixture(scope="class") | ||
def dbt_profile_target(): | ||
return { | ||
'type': 'snowflake', | ||
'threads': 4, | ||
'account': os.getenv('SNOWFLAKE_TEST_ACCOUNT'), | ||
'user': os.getenv('SNOWFLAKE_TEST_USER'), | ||
'password': os.getenv('SNOWFLAKE_TEST_PASSWORD'), | ||
'database': os.getenv('SNOWFLAKE_TEST_DATABASE'), | ||
'warehouse': os.getenv('SNOWFLAKE_TEST_WAREHOUSE'), | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import pytest | ||
|
||
from dbt.tests.adapter.basic.test_base import BaseSimpleMaterializations | ||
from dbt.tests.adapter.basic.test_singular_tests import BaseSingularTests | ||
from dbt.tests.adapter.basic.test_singular_tests_ephemeral import ( | ||
BaseSingularTestsEphemeral, | ||
) | ||
from dbt.tests.adapter.basic.test_empty import BaseEmpty | ||
from dbt.tests.adapter.basic.test_ephemeral import BaseEphemeral | ||
from dbt.tests.adapter.basic.test_incremental import BaseIncremental | ||
from dbt.tests.adapter.basic.test_generic_tests import BaseGenericTests | ||
from dbt.tests.adapter.basic.test_snapshot_check_cols import BaseSnapshotCheckCols | ||
from dbt.tests.adapter.basic.test_snapshot_timestamp import BaseSnapshotTimestamp | ||
|
||
|
||
class TestSimpleMaterializationsSnowflake(BaseSimpleMaterializations): | ||
pass | ||
|
||
|
||
class TestSingularTestsSnowflake(BaseSingularTests): | ||
pass | ||
|
||
|
||
class TestSingularTestsEphemeralSnowflake(BaseSingularTestsEphemeral): | ||
pass | ||
|
||
|
||
class TestEmptySnowflake(BaseEmpty): | ||
pass | ||
|
||
|
||
class TestEphemeralSnowflake(BaseEphemeral): | ||
pass | ||
|
||
|
||
class TestIncrementalSnowflake(BaseIncremental): | ||
pass | ||
|
||
|
||
class TestGenericTestsSnowflake(BaseGenericTests): | ||
pass | ||
|
||
|
||
class TestSnapshotCheckColsSnowflake(BaseSnapshotCheckCols): | ||
pass | ||
|
||
|
||
class TestSnapshotTimestampSnowflake(BaseSnapshotTimestamp): | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters