Skip to content

Commit

Permalink
add more WH, tweak vars
Browse files Browse the repository at this point in the history
  • Loading branch information
emmyoop committed Jun 14, 2024
1 parent cafa1a9 commit 3715dec
Show file tree
Hide file tree
Showing 8 changed files with 78 additions and 82 deletions.
6 changes: 3 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:
environment:
POSTGRES_TEST_HOST: localhost
POSTGRES_TEST_USER: root
DBT_ENV_SECRET_POSTGRES_TEST_PASS: ''
POSTGRES_TEST_PASS: ''
POSTGRES_TEST_PORT: 5432
POSTGRES_TEST_DATABASE: circle_test
POSTGRES_TEST_SCHEMA: dbt_utils_integration_tests_postgres
POSTGRES_TEST_DBNAME: circle_test
POSTGRES_SCHEMA: dbt_utils_integration_tests_postgres

steps:
- checkout
Expand Down
6 changes: 3 additions & 3 deletions integration_tests/.env/bigquery.env
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
DBT_ENV_SECRET_BIGQUERY_SERVICE_KEY_PATH=
BIGQUERY_TEST_DATABASE=
BIGQUERY_TEST_SCHEMA=dbt_utils_integration_tests_bigquery
DBT_ENV_SECRET_BIGQUERY_KEYFILE_JSON=
BIGQUERY_PROJECTs=
BIGQUERY_SCHEMA=dbt_utils_integration_tests_bigquery
12 changes: 6 additions & 6 deletions integration_tests/.env/postgres.env
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
POSTGRES_TEST_HOST=localhost
POSTGRES_TEST_USER=root
DBT_ENV_SECRET_POSTGRES_TEST_PASS=''
POSTGRES_TEST_PORT=5432
POSTGRES_TEST_DATABASE=circle_test
POSTGRES_TEST_SCHEMA=dbt_utils_integration_tests_postgres
POSTGRES_HOST=localhost
POSTGRES_USER=root
DBT_ENV_SECRET_POSTGRES_PASS=''
POSTGRES_PORT=5432
POSTGRES_DATABASE=circle_test
POSTGRES_SCHEMA=dbt_utils_integration_tests_postgres
12 changes: 6 additions & 6 deletions integration_tests/.env/redshift.env
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
REDSHIFT_TEST_HOST=
REDSHIFT_TEST_USER=
DBT_ENV_SECRET_REDSHIFT_TEST_PASS=
REDSHIFT_TEST_DATABASE=
REDSHIFT_TEST_PORT=
REDSHIFT_TEST_SCHEMA=dbt_utils_integration_tests_redshift
REDSHIFT_HOST=
REDSHIFT_USER=
DBT_ENV_SECRET_REDSHIFT_PASS=
REDSHIFT_DATABASE=
REDSHIFT_PORT=
REDSHIFT_SCHEMA=dbt_utils_integration_tests_redshift
14 changes: 7 additions & 7 deletions integration_tests/.env/snowflake.env
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
SNOWFLAKE_TEST_ACCOUNT=
SNOWFLAKE_TEST_USER=
DBT_ENV_SECRET_SNOWFLAKE_TEST_PASSWORD=
SNOWFLAKE_TEST_ROLE=
SNOWFLAKE_TEST_DATABASE=
SNOWFLAKE_TEST_WAREHOUSE=
SNOWFLAKE_TEST_SCHEMA=dbt_utils_integration_tests_snowflake
SNOWFLAKE_ACCOUNT=
SNOWFLAKE_USER=
DBT_ENV_SECRET_SNOWFLAKE_PASSWORD=
SNOWFLAKE_ROLE=
SNOWFLAKE_DATABASE=
SNOWFLAKE_WAREHOUSE=
SNOWFLAKE_SCHEMA=dbt_utils_integration_tests_snowflake
24 changes: 10 additions & 14 deletions integration_tests/ci/sample.profiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,48 +2,44 @@
# HEY! This file is used in the dbt-utils integrations tests with CircleCI.
# You should __NEVER__ check credentials into version control. Thanks for reading :)

config:
send_anonymous_usage_stats: False
use_colors: True

integration_tests:
target: postgres
outputs:
postgres:
type: postgres
host: "{{ env_var('POSTGRES_TEST_HOST') }}"
user: "{{ env_var('POSTGRES_TEST_USER') }}"
pass: "{{ env_var('DBT_ENV_SECRET_POSTGRES_TEST_PASS') }}"
pass: "{{ env_var('POSTGRES_TEST_PASS') }}"
port: "{{ env_var('POSTGRES_TEST_PORT') | as_number }}"
dbname: "{{ env_var('POSTGRES_TEST_DATABASE') }}"
schema: "{{ env_var('POSTGRES_TEST_SCHEMA') }}"
dbname: "{{ env_var('POSTGRES_TEST_DBNAME') }}"
schema: "dbt_utils_integration_tests_postgres"
threads: 5

redshift:
type: redshift
host: "{{ env_var('REDSHIFT_TEST_HOST') }}"
user: "{{ env_var('REDSHIFT_TEST_USER') }}"
pass: "{{ env_var('DBT_ENV_SECRET_REDSHIFT_TEST_PASS') }}"
dbname: "{{ env_var('REDSHIFT_TEST_DATABASE') }}"
pass: "{{ env_var('REDSHIFT_TEST_PASS') }}"
dbname: "{{ env_var('REDSHIFT_TEST_DBNAME') }}"
port: "{{ env_var('REDSHIFT_TEST_PORT') | as_number }}"
schema: "{{ env_var('REDSHIFT_TEST_SCHEMA') }}"
schema: "dbt_utils_integration_tests_redshift"
threads: 5

bigquery:
type: bigquery
method: service-account
keyfile: "{{ env_var('DBT_ENV_SECRET_BIGQUERY_SERVICE_KEY_PATH') }}"
keyfile: "{{ env_var('BIGQUERY_SERVICE_KEY_PATH') }}"
project: "{{ env_var('BIGQUERY_TEST_DATABASE') }}"
schema: "{{ env_var('BIGQUERY_TEST_SCHEMA') }}"
schema: "dbt_utils_integration_tests_bigquery"
threads: 10

snowflake:
type: snowflake
account: "{{ env_var('SNOWFLAKE_TEST_ACCOUNT') }}"
user: "{{ env_var('SNOWFLAKE_TEST_USER') }}"
password: "{{ env_var('DBT_ENV_SECRET_SNOWFLAKE_TEST_PASSWORD') }}"
password: "{{ env_var('SNOWFLAKE_TEST_PASSWORD') }}"
role: "{{ env_var('SNOWFLAKE_TEST_ROLE') }}"
database: "{{ env_var('SNOWFLAKE_TEST_DATABASE') }}"
warehouse: "{{ env_var('SNOWFLAKE_TEST_WAREHOUSE') }}"
schema: "{{ env_var('SNOWFLAKE_TEST_SCHEMA') }}"
schema: "dbt_utils_integration_tests_snowflake"
threads: 10
46 changes: 23 additions & 23 deletions integration_tests/profiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,39 +8,39 @@ integration_tests:
outputs:
postgres:
type: postgres
host: "{{ env_var('POSTGRES_TEST_HOST') }}"
user: "{{ env_var('POSTGRES_TEST_USER') }}"
pass: "{{ env_var('DBT_ENV_SECRET_POSTGRES_TEST_PASS') }}"
port: "{{ env_var('POSTGRES_TEST_PORT') | as_number }}"
dbname: "{{ env_var('POSTGRES_TEST_DATABASE') }}"
schema: "{{ env_var('POSTGRES_TEST_SCHEMA') }}"
host: "{{ env_var('POSTGRES_HOST') }}"
user: "{{ env_var('POSTGRES_USER') }}"
pass: "{{ env_var('DBT_ENV_SECRET_POSTGRES_PASS') }}"
port: "{{ env_var('POSTGRES_PORT') | as_number }}"
dbname: "{{ env_var('POSTGRES_DATABASE') }}"
schema: "{{ env_var('POSTGRES_SCHEMA') }}"
threads: 5

redshift:
type: redshift
host: "{{ env_var('REDSHIFT_TEST_HOST') }}"
user: "{{ env_var('REDSHIFT_TEST_USER') }}"
pass: "{{ env_var('DBT_ENV_SECRET_REDSHIFT_TEST_PASS') }}"
dbname: "{{ env_var('REDSHIFT_TEST_DATABASE') }}"
port: "{{ env_var('REDSHIFT_TEST_PORT') | as_number }}"
schema: "{{ env_var('REDSHIFT_TEST_SCHEMA') }}"
host: "{{ env_var('REDSHIFT_HOST') }}"
user: "{{ env_var('REDSHIFT_USER') }}"
pass: "{{ env_var('DBT_ENV_SECRET_REDSHIFT_PASS') }}"
dbname: "{{ env_var('REDSHIFT_DATABASE') }}"
port: "{{ env_var('REDSHIFT_PORT') | as_number }}"
schema: "{{ env_var('REDSHIFT_SCHEMA') }}"
threads: 5

bigquery:
type: bigquery
method: service-account
keyfile: "{{ env_var('DBT_ENV_SECRET_BIGQUERY_SERVICE_KEY_PATH') }}"
project: "{{ env_var('BIGQUERY_TEST_DATABASE') }}"
schema: "{{ env_var('BIGQUERY_TEST_SCHEMA') }}"
method: service-account-json
project: "{{ env_var('BIGQUERY_PROJECT') }}"
keyfile: "{{ env_var('DBT_ENV_SECRET_BIGQUERY_KEYFILE_JSON') | as_native }}"
schema: "{{ env_var('BIGQUERY_SCHEMA') }}"
threads: 10

snowflake:
type: snowflake
account: "{{ env_var('SNOWFLAKE_TEST_ACCOUNT') }}"
user: "{{ env_var('SNOWFLAKE_TEST_USER') }}"
password: "{{ env_var('DBT_ENV_SECRET_SNOWFLAKE_TEST_PASS') }}"
role: "{{ env_var('SNOWFLAKE_TEST_ROLE') }}"
database: "{{ env_var('SNOWFLAKE_TEST_DATABASE') }}"
warehouse: "{{ env_var('SNOWFLAKE_TEST_WAREHOUSE') }}"
schema: "{{ env_var('SNOWFLAKE_TEST_SCHEMA') }}"
account: "{{ env_var('SNOWFLAKE_ACCOUNT') }}"
user: "{{ env_var('SNOWFLAKE_USER') }}"
password: "{{ env_var('DBT_ENV_SECRET_SNOWFLAKE_PASS') }}"
role: "{{ env_var('SNOWFLAKE_ROLE') }}"
database: "{{ env_var('SNOWFLAKE_DATABASE') }}"
warehouse: "{{ env_var('SNOWFLAKE_WAREHOUSE') }}"
schema: "{{ env_var('SNOWFLAKE_SCHEMA') }}"
threads: 10
40 changes: 20 additions & 20 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,31 @@ supported_adapters = postgres, snowflake, redshift, bigquery
[testenv]
passenv =
# postgres env vars
POSTGRES_TEST_HOST
POSTGRES_TEST_USER
DBT_ENV_SECRET_POSTGRES_TEST_PASS
POSTGRES_TEST_PORT
POSTGRES_TEST_DATABASE
POSTGRES_TEST_SCHEMA
POSTGRES_HOST
POSTGRES_USER
DBT_ENV_SECRET_POSTGRES_PASS
POSTGRES_PORT
POSTGRES_DATABASE
POSTGRES_SCHEMA
# snowflake env vars
SNOWFLAKE_TEST_ACCOUNT
SNOWFLAKE_TEST_USER
DBT_ENV_SECRET_SNOWFLAKE_TEST_PASS
SNOWFLAKE_TEST_ROLE
SNOWFLAKE_TEST_DATABASE
SNOWFLAKE_TEST_WAREHOUSE
SNOWFLAKE_TEST_SCHEMA
SNOWFLAKE_ACCOUNT
SNOWFLAKE_USER
DBT_ENV_SECRET_SNOWFLAKE_PASS
SNOWFLAKE_ROLE
SNOWFLAKE_DATABASE
SNOWFLAKE_WAREHOUSE
SNOWFLAKE_SCHEMA
# redshift
REDSHIFT_TEST_HOST
REDSHIFT_TEST_USER
DBT_ENV_SECRET_REDSHIFT_TEST_PASS
REDSHIFT_TEST_DATABASE
REDSHIFT_TEST_SCHEMA
REDSHIFT_TEST_PORT
REDSHIFT_HOST
REDSHIFT_USER
DBT_ENV_SECRET_REDSHIFT_PASS
REDSHIFT_DATABASE
REDSHIFT_SCHEMA
REDSHIFT_PORT
# bigquery
BIGQUERY_PROJECT
DBT_ENV_SECRET_BIGQUERY_KEYFILE_JSON
BIGQUERY_TEST_SCHEMA
BIGQUERY_SCHEMA

# This is required to ensure that the correct adapters are tested
[testenv:list_supported_adapters]
Expand Down

0 comments on commit 3715dec

Please sign in to comment.