Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integration tests: use warehouse and role env vars #1059

Merged
merged 2 commits into from
May 13, 2024

Conversation

sfc-gh-gbloom
Copy link
Contributor

Pre-review checklist

  • I've confirmed that instructions included in README.md are still correct after my changes in the codebase.
  • I've added or updated automated unit tests to verify correctness of my new code.
  • I've added or updated integration tests to verify correctness of my new code.
  • I've confirmed that my changes are working by executing CLI's commands manually.
  • I've confirmed that my changes are up-to-date with the target branch.
  • I've described my changes in the release notes.
  • I've described my changes in the section below.

Changes description

When we use the snowflake_session fixture in our integration tests, the config values are read from env variables prefixed with SNOWFLAKE_CONNECTIONS_INTEGRATION_.

This PR adds WAREHOUSE and ROLE to the list.
I also added .env to .gitignore as it's a common convention to put there local/test configuration that you don't want to check in.

Test

I noticed the problem when I tried to run the integration tests locally. I verified the values are correctly picked up after the change:

eval $(cat .env) python -m pytest -m integration

# .env content
SNOWFLAKE_CONNECTIONS_INTEGRATION_ACCOUNT="..."
SNOWFLAKE_CONNECTIONS_INTEGRATION_USER="..."
SNOWFLAKE_CONNECTIONS_INTEGRATION_PASSWORD="..."
SNOWFLAKE_CONNECTIONS_INTEGRATION_ROLE="..."
SNOWFLAKE_CONNECTIONS_INTEGRATION_WAREHOUSE="..."
...

@sfc-gh-gbloom sfc-gh-gbloom requested a review from a team as a code owner May 10, 2024 17:48
@sfc-gh-gbloom sfc-gh-gbloom requested a review from a team May 10, 2024 17:49
@sfc-gh-gbloom sfc-gh-gbloom enabled auto-merge (squash) May 10, 2024 18:07
@sfc-gh-gbloom sfc-gh-gbloom merged commit 532d1f1 into main May 13, 2024
23 checks passed
@sfc-gh-gbloom sfc-gh-gbloom deleted the intg-tests-read-warehouse-role-env-vars branch May 13, 2024 13:13
sfc-gh-sichen pushed a commit that referenced this pull request Oct 17, 2024
read warehouse and role env vars in integration tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants