-
Notifications
You must be signed in to change notification settings - Fork 6
Imporove credentials file handling #204
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
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #204 +/- ##
==========================================
+ Coverage 75.73% 75.88% +0.14%
==========================================
Files 21 21
Lines 647 651 +4
==========================================
+ Hits 490 494 +4
Misses 157 157 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Moving away from hardcoding a path to find the DB credentials file and use environment variables instead. This now support two ways - one is setting the path to the file and the other is setting the database URL directly. This should make it easier to deploy the library and not relying on the file being in the correct location.
aaarendt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jomey we will still need to add env: entries in the workflow files so test work in CI?
Only for the snowex_db suite once this is merged. This one uses the one set via conftest. |
OK, so the logic is if you don't have env variables set, and don't supply your own file, then this must be a test suite? I agree those can be hard coded since they are arbitrary and don't need to be secretized. |
That was my thinking. Less wrangling of credentials if its a test run. Open to changes if you see any other easier way or logic. |
Ibrahim-Ola
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love env variables!
Use a different variable when a user wants to use different credentials than the default. This only lets the user change the db host and database. The credentials remain the same to reduce the possibility to run the test against a production DB that would wipe out all data.
From the commit message:
This also adds a credentials file to the test database that matches the user and password from the CI. Should make it easier to test snowex_db and still gives the user the ability to overwrite to his own.
Closes #203