Replace py-pglite with testcontainers for Postgres testing by phernandez · Pull Request #449 · basicmachines-co/basic-memory · GitHub
Skip to content

Replace py-pglite with testcontainers for Postgres testing - #449

Merged
phernandez merged 2 commits into
mainfrom
py-pglite
Dec 11, 2025
Merged

Replace py-pglite with testcontainers for Postgres testing#449
phernandez merged 2 commits into
mainfrom
py-pglite

Conversation

@phernandez

Copy link
Copy Markdown
Member

Summary

  • Switch from py-pglite to testcontainers-postgres for more reliable Postgres testing
  • Use environment variable approach (BASIC_MEMORY_TEST_POSTGRES=1) instead of parameterized fixtures
  • Add explicit justfile recipes: test-sqlite, test-postgres, test-unit-sqlite, test-unit-postgres, etc.
  • Update CI to run SQLite and Postgres tests in parallel jobs
  • Add isolated_home fixture for CLI tests to prevent reading user config
  • Split Postgres DDL statements for asyncpg compatibility (requires separate execute calls)
  • Add timeout workaround for FastMCP Client + asyncpg cleanup hang
  • Update README.md and CLAUDE.md with current testing documentation

Test plan

  • just test-sqlite passes locally
  • just test-postgres passes locally (with timeout workaround for cleanup hang)
  • CI runs SQLite tests on Ubuntu and Windows
  • CI runs Postgres tests on Ubuntu (via testcontainers)

🤖 Generated with Claude Code

phernandez and others added 2 commits December 8, 2025 22:29
Signed-off-by: phernandez <paul@basicmachines.co>
- Switch from py-pglite to testcontainers-postgres for more reliable Postgres testing
- Use environment variable approach (BASIC_MEMORY_TEST_POSTGRES=1) instead of parameterized fixtures
- Add explicit justfile recipes: test-sqlite, test-postgres, test-unit-sqlite, test-unit-postgres, etc.
- Update CI to run SQLite and Postgres tests in parallel jobs
- Add isolated_home fixture for CLI tests to prevent reading user config
- Split Postgres DDL statements for asyncpg compatibility (requires separate execute calls)
- Add timeout workaround for FastMCP Client + asyncpg cleanup hang
- Update README.md and CLAUDE.md with current testing documentation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Dec 11, 2025

Copy link
Copy Markdown
Contributor

@phernandez
phernandez merged commit c462faf into main Dec 11, 2025
12 of 20 checks passed
@phernandez
phernandez deleted the py-pglite branch December 11, 2025 04:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant