-
Notifications
You must be signed in to change notification settings - Fork 144
/
Copy pathconftest.py
32 lines (29 loc) · 988 Bytes
/
conftest.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import pytest
import os
# Import the standard functional fixtures as a plugin
pytest_plugins = ["dbt.tests.fixtures.project"]
# The profile dictionary, used to write out profiles.yml
@pytest.fixture(scope="class")
def dbt_profile_target():
# Set project and keyfile for github automated tests
if os.environ.get('GITHUB_ACTIONS') is not None:
return {
'type': 'bigquery',
'method': 'service-account',
'keyfile': os.environ.get("GITHUB_WORKSPACE") + "/unit_tests/dbt-service-account.json",
'threads': 4,
'timeout_seconds': 300,
'project': os.environ.get("BIGQUERY_PROJECT")
}
return {
'type': 'bigquery',
'method': 'oauth',
'threads': 4,
'project': os.environ.get("BIGQUERY_PROJECT")
}
@pytest.fixture(scope="class")
def project_config_update():
return {
'name': 'ga4'
, 'vars':{'static_incremental_days':3}
}