Skip to content

Conversation

@nazq
Copy link
Contributor

@nazq nazq commented Dec 9, 2025

Summary

Adds testcontainers support for running integration tests without manual Docker setup. Tests automatically spin up a Qdrant container and clean up after completion.

Changes

New Files

  • tests/test_utils.rs - Qdrant container setup with tmpfs for fast in-memory testing
  • tests/integration.rs - Integration tests using containerized Qdrant

Modified Files

  • Cargo.toml - Added testcontainers 0.26 dev-dependency
  • src/lib.rs - Marked legacy integration test as #[ignore]
  • src/qdrant_client/collection.rs - Marked legacy integration test as #[ignore]
  • src/qdrant_client/query.rs - Marked legacy integration test as #[ignore]

Features

  • Shared container instance across tests for efficiency
  • tmpfs mounts for zero disk I/O during tests
  • Configurable Qdrant version via QDRANT_VERSION env var
  • HTTP health check wait strategy

Usage

# Run integration tests (container starts automatically)
cargo test --test integration

# Run with specific Qdrant version
QDRANT_VERSION=v1.15.0 cargo test --test integration

Test Plan

  • Integration tests pass with containerized Qdrant
  • Existing unit tests unaffected
  • Legacy integration tests properly ignored

- Add testcontainers 0.26 as dev dependency
- Create test_utils module with QdrantContainer setup
- Add integration.rs with containerized tests
- Mark legacy integration tests as #[ignore] with guidance
- Uses tmpfs for fast in-memory test execution
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