From f06bfafcab0c37a91a4a1131e98418d7eead41b8 Mon Sep 17 00:00:00 2001 From: Emily Rockman Date: Fri, 23 Aug 2024 09:06:20 -0500 Subject: [PATCH] update testing to reflect new profiles --- .gitignore | 2 +- Makefile | 3 ++- dev-requirements.txt | 1 + integration_tests/.env/postgres.env | 4 ++-- integration_tests/.env/snowflake.env | 2 +- run_test.sh | 1 - 6 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 7435a3cc..de0fea7a 100644 --- a/.gitignore +++ b/.gitignore @@ -10,7 +10,7 @@ __pycache__ # Ignore all directories that start with 'env-' and can have any name after -env-*/ +env*/ # Do not ignore .env files in any directory and do not ignore .env directories !.env diff --git a/Makefile b/Makefile index ead2355b..7481cf6d 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,8 @@ .PHONY: test test: ## Run the integration tests. - @./run_test.sh $(target) + @\ + tox -e dbt_integration_$(target) .PHONY: dev dev: ## Installs dbt-* packages in develop mode along with development dependencies. diff --git a/dev-requirements.txt b/dev-requirements.txt index 6ddd9858..4fc278a6 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -7,3 +7,4 @@ dbt-redshift@git+https://github.com/dbt-labs/dbt-redshift.git dbt-snowflake@git+https://github.com/dbt-labs/dbt-snowflake.git dbt-bigquery@git+https://github.com/dbt-labs/dbt-bigquery.git pytest-xdist +tox>=3.13 diff --git a/integration_tests/.env/postgres.env b/integration_tests/.env/postgres.env index 1c13b6ca..a4af5473 100644 --- a/integration_tests/.env/postgres.env +++ b/integration_tests/.env/postgres.env @@ -1,6 +1,6 @@ POSTGRES_HOST=localhost POSTGRES_USER=root -DBT_ENV_SECRET_POSTGRES_PASS='' +DBT_ENV_SECRET_POSTGRES_PASS=password POSTGRES_PORT=5432 -POSTGRES_DATABASE=circle_test +POSTGRES_DATABASE=dbt_utils_test POSTGRES_SCHEMA=dbt_utils_integration_tests_postgres diff --git a/integration_tests/.env/snowflake.env b/integration_tests/.env/snowflake.env index 85ab65d5..85fd7bd2 100644 --- a/integration_tests/.env/snowflake.env +++ b/integration_tests/.env/snowflake.env @@ -1,6 +1,6 @@ SNOWFLAKE_ACCOUNT= SNOWFLAKE_USER= -DBT_ENV_SECRET_SNOWFLAKE_PASSWORD= +DBT_ENV_SECRET_SNOWFLAKE_PASS= SNOWFLAKE_ROLE= SNOWFLAKE_DATABASE= SNOWFLAKE_WAREHOUSE= diff --git a/run_test.sh b/run_test.sh index b6251b6d..95ef9a30 100755 --- a/run_test.sh +++ b/run_test.sh @@ -8,7 +8,6 @@ dbt --version # Set the profile cd integration_tests -cp ci/sample.profiles.yml profiles.yml export DBT_PROFILES_DIR=. # Show the location of the profiles directory and test the connection