Skip to content

Add Testcontainers for database integration tests#86

Merged
marcieltorres merged 4 commits intomainfrom
feature/testcontainers-database-tests
Feb 18, 2026
Merged

Add Testcontainers for database integration tests#86
marcieltorres merged 4 commits intomainfrom
feature/testcontainers-database-tests

Conversation

@marcieltorres
Copy link
Owner

Summary

  • Add testcontainers[postgres] and sqlalchemy dev dependencies
  • Create pytest fixtures for PostgreSQL container and database session
  • Add database integration tests with session isolation
  • Add unit tests for BaseModel.to_dict method
  • Fix UUID isinstance check in BaseModel (was using SQLAlchemy type instead of Python UUID)
  • Update CI/CD workflow with Testcontainers environment variables
  • Mount Docker socket in docker-compose for local testing
  • Update README and CONTRIBUTING with Testcontainers documentation

Closes #81

Test plan

  • Run make docker/test locally
  • Verify all tests pass in CI
  • Verify 100% test coverage is maintained

- Add testcontainers[postgres] and sqlalchemy dev dependencies
- Create pytest fixtures for PostgreSQL container and db session
- Add database integration tests with session isolation
- Add unit tests for BaseModel.to_dict method
- Fix UUID isinstance check in BaseModel (was using SQLAlchemy type)
- Update CI/CD workflow with Testcontainers environment variables
- Mount Docker socket in docker-compose for local testing
- Update README and CONTRIBUTING with Testcontainers documentation

Closes #81
@marcieltorres marcieltorres merged commit 5d3d401 into main Feb 18, 2026
4 checks passed
@marcieltorres marcieltorres deleted the feature/testcontainers-database-tests branch February 18, 2026 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement Testcontainers for Database Tests in CI/CD Pipeline

1 participant