[SPD-48307]: add DB repo test infrastructure + PacketDBRepository filter - #3
Open
AdiDev0 wants to merge 1 commit into
Open
Conversation
Spec Reviewer Report✅ 2 met requirements: 1. Test database configured for microservice testingPytest fixtures now set up a dedicated async test database with derived URL, schema creation, and session rollback support.Evidence:
2. Basic database repositories provided for microservicePacketDBRepository.filter now encapsulates workspace-scoped querying, optional ID filtering, and soft-delete opt-in so the microservice has a functioning repository layer.Evidence:
Used resources: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
User description
What
Sets up the database repository testing infrastructure for tars and delivers
the first concrete example:
PacketDBRepository.filterwith full test coverage.This PR is intentionally narrow — it exists to give every developer on the team
a working reference for how DB repo code and tests should be structured in tars,
mirroring the pattern used in django-rest-api.
Changes
app/db/postgres.py—SoftDeleteMixinquery entry pointsAdded two classmethods to
SoftDeleteMixin, available on every model thatcomposes it (
Packet,Agreement,LegalHub, etc.):