-
Notifications
You must be signed in to change notification settings - Fork 157
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature/add quota project option (#1345)
* add ability to specify quota project in profile --------- Co-authored-by: Mike Alfare <[email protected]>
- Loading branch information
1 parent
a09a8fa
commit 4e3f86e
Showing
4 changed files
with
42 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
kind: Features | ||
body: Adds the ability to set optional `quota_project` in profile | ||
time: 2024-09-11T23:48:59.767649+01:00 | ||
custom: | ||
Author: jcarpenter12 | ||
Issue: 1343 1344 |
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,27 @@ | ||
import os | ||
|
||
import pytest | ||
|
||
from dbt.tests.util import run_dbt | ||
|
||
_QUOTA_PROJECT = os.getenv("BIGQUERY_TEST_ALT_DATABASE") | ||
|
||
|
||
class TestNoQuotaProject: | ||
def test_no_quota_project(self, project): | ||
results = run_dbt() | ||
for result in results: | ||
assert None == result.adapter_response["quota_project"] | ||
|
||
|
||
class TestQuotaProjectOption: | ||
@pytest.fixture(scope="class") | ||
def profiles_config_update(self, dbt_profile_target): | ||
outputs = {"default": dbt_profile_target} | ||
outputs["default"]["quota_project"] = _QUOTA_PROJECT | ||
yield | ||
|
||
def test_quota_project_option(self, project): | ||
results = run_dbt() | ||
for result in results: | ||
assert _QUOTA_PROJECT == result.adapter_response["quota_project"] |
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