-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev/marian-anderson' into kconvey-copy-job
- Loading branch information
Showing
15 changed files
with
201 additions
and
34 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
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
1 change: 1 addition & 0 deletions
1
test/integration/022_bigquery_test/adapter-specific-models/expiring_table.sql
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 @@ | ||
select 1 as id |
38 changes: 38 additions & 0 deletions
38
test/integration/022_bigquery_test/test_bigquery_adapter_specific.py
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,38 @@ | ||
""""Test adapter specific config options.""" | ||
from test.integration.base import DBTIntegrationTest, use_profile | ||
import textwrap | ||
import yaml | ||
|
||
|
||
class TestBigqueryAdapterSpecific(DBTIntegrationTest): | ||
|
||
@property | ||
def schema(self): | ||
return "bigquery_test_022" | ||
|
||
@property | ||
def models(self): | ||
return "adapter-specific-models" | ||
|
||
@property | ||
def profile_config(self): | ||
return self.bigquery_profile() | ||
|
||
@property | ||
def project_config(self): | ||
return yaml.safe_load(textwrap.dedent('''\ | ||
config-version: 2 | ||
models: | ||
test: | ||
materialized: table | ||
expiring_table: | ||
hours_to_expiration: 4 | ||
''')) | ||
|
||
@use_profile('bigquery') | ||
def test_bigquery_hours_to_expiration(self): | ||
_, stdout = self.run_dbt_and_capture(['--debug', 'run']) | ||
|
||
self.assertIn( | ||
'expiration_timestamp=TIMESTAMP_ADD(CURRENT_TIMESTAMP(), INTERVAL ' | ||
'4 hour)', stdout) |
1 change: 1 addition & 0 deletions
1
test/integration/061_use_colors_tests/models/do_nothing_then_fail.sql
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 @@ | ||
select 1, |
29 changes: 29 additions & 0 deletions
29
test/integration/061_use_colors_tests/test_no_use_colors.py
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,29 @@ | ||
|
||
from test.integration.base import DBTIntegrationTest, use_profile | ||
import logging | ||
import re | ||
import sys | ||
|
||
class TestNoUseColors(DBTIntegrationTest): | ||
|
||
@property | ||
def project_config(self): | ||
return {'config-version': 2} | ||
|
||
@property | ||
def schema(self): | ||
return "use_colors_tests_061" | ||
|
||
@property | ||
def models(self): | ||
return "models" | ||
|
||
@use_profile('postgres') | ||
def test_postgres_no_use_colors(self): | ||
# pattern to match formatted log output | ||
pattern = re.compile(r'\[31m.*|\[33m.*') | ||
|
||
results, stdout = self.run_dbt_and_capture(args=['--no-use-colors', 'run'], expect_pass=False) | ||
|
||
stdout_contains_formatting_characters = bool(pattern.search(stdout)) | ||
self.assertFalse(stdout_contains_formatting_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,29 @@ | ||
|
||
from test.integration.base import DBTIntegrationTest, use_profile | ||
import logging | ||
import re | ||
import sys | ||
|
||
class TestUseColors(DBTIntegrationTest): | ||
|
||
@property | ||
def project_config(self): | ||
return {'config-version': 2} | ||
|
||
@property | ||
def schema(self): | ||
return "use_colors_tests_061" | ||
|
||
@property | ||
def models(self): | ||
return "models" | ||
|
||
@use_profile('postgres') | ||
def test_postgres_use_colors(self): | ||
# pattern to match formatted log output | ||
pattern = re.compile(r'\[31m.*|\[33m.*') | ||
|
||
results, stdout = self.run_dbt_and_capture(args=['--use-colors', 'run'], expect_pass=False) | ||
|
||
stdout_contains_formatting_characters = bool(pattern.search(stdout)) | ||
self.assertTrue(stdout_contains_formatting_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
Oops, something went wrong.