Skip to content

Add pgvector integration tests for embeddings similarity search #246

@anchapin

Description

@anchapin

Summary

Missing integration tests for vector similarity search functionality with PostgreSQL pgvector extension.

Location

backend/src/tests/unit/test_crud_embeddings.py:193

Context

# TODO: Add a test for find_similar_embeddings that runs only if connected to a real Postgres with pgvector.
# This would typically involve a separate conftest.py for integration tests or a way to mark tests
# based on DB capabilities.
# For example: @pytest.mark.integration_postgres

Requirements

  • Create integration test for find_similar_embeddings function
  • Add pytest markers for PostgreSQL/pgvector tests
  • Set up test configuration to detect pgvector capability
  • Add proper test fixtures for vector similarity testing
  • Ensure tests skip gracefully when pgvector is unavailable

Priority

Medium - Important for testing vector search functionality

Metadata

Metadata

Assignees

No one assigned

    Labels

    testingTest-related work

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions