Skip to content

feat(backend): tests v2#488

Draft
KaliszS wants to merge 1 commit intomainfrom
test
Draft

feat(backend): tests v2#488
KaliszS wants to merge 1 commit intomainfrom
test

Conversation

@KaliszS
Copy link
Collaborator

@KaliszS KaliszS commented Feb 18, 2026

Closes #581

  • tests will use testcontainers now instead of manual creating testing database
  • factory-boy has been replaced with more modern factory library -> polyfactory
  • more parametrizing to reduce code redundancy

@KaliszS KaliszS self-assigned this Feb 18, 2026
@KaliszS KaliszS requested a review from czajkub as a code owner February 18, 2026 20:59
@KaliszS
Copy link
Collaborator Author

KaliszS commented Feb 18, 2026

Old tests directory (_tests) will be removed after the PR will be ready. Now they've stayed for a reference.

@KaliszS KaliszS marked this pull request as draft February 18, 2026 21:03
@bartmichalak
Copy link
Contributor

@KaliszS is there any ongoing work here? Or are we good to review and merge after resolving the linter issues?

@KaliszS
Copy link
Collaborator Author

KaliszS commented Feb 24, 2026

I will remove draft label as soon as it will be ready for review.

@bartmichalak
Copy link
Contributor

tests will use testcontainers now instead of manual creating testing database

What will be the outcome?

@KaliszS
Copy link
Collaborator Author

KaliszS commented Mar 10, 2026

tests will use testcontainers now instead of manual creating testing database

What will be the outcome?

Besides cleaner architecture, we won't need to create test database everytime we drop local postgres container. Right now, when I need to drop local db (for example because of migrations that neeed to be corrected), I have to enter pg container, run psql -U open-wearables and then create database open_wearables_test;. Using testcontainers will make it unnecessary.

We also have to structure tests differently to have a full control. Right now there is too much vibe coded code within that directory (we all have done that in the scope of many different pull requests).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Backend tests v2

2 participants