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

Use postgresql for tests #450

Merged
merged 12 commits into from
Jun 20, 2024
Merged

Use postgresql for tests #450

merged 12 commits into from
Jun 20, 2024

Conversation

armanddidierjean
Copy link
Member

@armanddidierjean armanddidierjean commented May 23, 2024

Description

Fix #403

Add Postgresql databse support for tests. Use a TestAppClient per test file, to prevent tests from a module to impact other modules

Configure a Postgresql database for the test workflow.
Run tests with Postgresql. Run migration tests with SQLite and Postgresql.

Checklist

  • Created tests which fail without the change (if possible)
  • All tests passing
  • Extended the documentation, if necessary

Copy link

gitguardian bot commented May 23, 2024

⚠️ GitGuardian has uncovered 2 secrets following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secrets in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
7298668 Triggered Generic High Entropy Secret 73698d9 .env.test View secret
7298668 Triggered Generic High Entropy Secret 6dbd020 .env.test View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secrets safely. Learn here the best practices.
  3. Revoke and rotate these secrets.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

@julien4215 julien4215 marked this pull request as draft May 23, 2024 21:17
Copy link

codecov bot commented May 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.67%. Comparing base (9e2b6d7) to head (6861a16).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #450      +/-   ##
==========================================
- Coverage   82.70%   82.67%   -0.04%     
==========================================
  Files          98       98              
  Lines        6142     6142              
==========================================
- Hits         5080     5078       -2     
- Misses       1062     1064       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@armanddidierjean armanddidierjean added enhancement New feature or request core labels May 26, 2024
@armanddidierjean armanddidierjean marked this pull request as ready for review May 26, 2024 15:46
@julien4215 julien4215 merged commit 0af7649 into main Jun 20, 2024
7 checks passed
@julien4215 julien4215 deleted the postgresql-workflow branch June 20, 2024 19:51
Malem38 pushed a commit that referenced this pull request Jun 26, 2024
### Description

Fix #403 

Add Postgresql databse support for tests. Use a TestAppClient per test
file, to prevent tests from a module to impact other modules

Configure a Postgresql database for the test workflow.
Run tests with Postgresql. Run migration tests with SQLite and
Postgresql.

### Checklist

- [x] Created tests which fail without the change (if possible)
- [x] All tests passing
- [x] Extended the documentation, if necessary

---------

Co-authored-by: julien4215 <120588494+julien4215@users.noreply.github.com>
Rotheem pushed a commit that referenced this pull request Aug 21, 2024
### Description

If we don't drop the test database before migration tests, missing
columns won't be detected

This was broken since #450
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Alembic: Enum changes are not detected by autogenerate
3 participants