-
Notifications
You must be signed in to change notification settings - Fork 168
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement initial adapter tests on bigquery (#142)
- vv1.6.0b3
- v1.9.1
- v1.9.0
- v1.9.0rc1
- v1.9.0b1
- v1.8.3
- v1.8.2
- v1.8.1
- v1.8.0
- v1.8.0rc1
- v1.8.0b2
- v1.8.0b1
- v1.7.9
- v1.7.8
- v1.7.7
- v1.7.6
- v1.7.5
- v1.7.4
- v1.7.3
- v1.7.2
- v1.7.1
- v1.7.0
- v1.7.0rc1
- v1.7.0b2
- v1.7.0b1
- v1.6.13
- v1.6.12
- v1.6.11
- v1.6.10
- v1.6.9
- v1.6.8
- v1.6.7
- v1.6.6
- v1.6.5
- v1.6.4
- v1.6.3
- v1.6.2
- v1.6.1
- v1.6.0
- v1.6.0rc1
- v1.6.0b4
- v1.6.0b2
- v1.6.0b1
- v1.5.9
- v1.5.8
- v1.5.7
- v1.5.6
- v1.5.5
- v1.5.4
- v1.5.3
- v1.5.2
- v1.5.1
- v1.5.0
- v1.5.0rc1
- v1.5.0b4
- v1.5.0b3
- v1.5.0b2
- v1.5.0b1
- v1.4.5
- v1.4.4
- v1.4.3
- v1.4.2
- v1.4.1
- v1.4.0
- v1.4.0rc1
- v1.4.0b1
- v1.3.3
- v1.3.2
- v1.3.1
- v1.3.0
- v1.3.0rc3
- v1.3.0rc2
- v1.3.0rc1
- v1.3.0b2
- v1.3.0b1
- v1.2.1
- v1.2.0
- v1.2.0rc1
- v1.2.0b1
- v1.1.2
- v1.1.1
- v1.1.1rc1
- v1.1.0
- v1.1.0rc2
- v1.1.0rc1
Showing
7 changed files
with
106 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
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 json | ||
|
||
# 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(): | ||
credentials_json_str = os.getenv('BIGQUERY_TEST_SERVICE_ACCOUNT_JSON').replace("'", '') | ||
credentials = json.loads(credentials_json_str) | ||
project_id = credentials.get('project_id') | ||
return { | ||
'type': 'bigquery', | ||
'method': 'service-account-json', | ||
'threads': 1, | ||
'project': project_id, | ||
'keyfile_json': credentials, | ||
} |
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,52 @@ | ||
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 TestSimpleMaterializationsBigQuery(BaseSimpleMaterializations): | ||
# This test requires a full-refresh to replace a table with a view | ||
@pytest.fixture(scope="class") | ||
def test_config(self): | ||
return {"require_full_refresh": True} | ||
|
||
|
||
class TestSingularTestsBigQuery(BaseSingularTests): | ||
pass | ||
|
||
|
||
class TestSingularTestsEphemeralBigQuery(BaseSingularTestsEphemeral): | ||
pass | ||
|
||
|
||
class TestEmptyBigQuery(BaseEmpty): | ||
pass | ||
|
||
|
||
class TestEphemeralBigQuery(BaseEphemeral): | ||
pass | ||
|
||
|
||
class TestIncrementalBigQuery(BaseIncremental): | ||
pass | ||
|
||
|
||
class TestGenericTestsBigQuery(BaseGenericTests): | ||
pass | ||
|
||
|
||
class TestSnapshotCheckColsBigQuery(BaseSnapshotCheckCols): | ||
pass | ||
|
||
|
||
class TestSnapshotTimestampBigQuery(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