LightRAG/tests
BukeLy 19caf9f27c test: add comprehensive E2E migration tests for Qdrant and complete unit test coverage
Why this change is needed:
The previous test coverage had gaps in critical migration scenarios that could lead
to data loss or broken upgrades for users migrating from old versions of LightRAG.

What was added:

1. E2E Tests (test_e2e_multi_instance.py):
   - test_case1_both_exist_warning_qdrant: Verify warning when both collections exist
   - test_case2_only_new_exists_qdrant: Verify existing collection reuse
   - test_backward_compat_old_workspace_naming_qdrant: Test old workspace naming migration
   - test_empty_legacy_qdrant: Verify empty legacy collection handling
   - test_workspace_isolation_e2e_qdrant: Validate workspace data isolation

2. Unit Tests (test_migration_complete.py):
   - All 4 migration cases (new+legacy, only new, only legacy, neither)
   - Backward compatibility tests for multiple legacy naming patterns
   - Empty legacy migration scenario
   - Workspace isolation verification
   - Model switching scenario
   - Full migration lifecycle integration test

How it solves it:
These tests validate the _find_legacy_collection() backward compatibility fix with
real Qdrant database instances, ensuring smooth upgrades from all legacy versions.

Impact:
- Prevents regressions in migration logic
- Validates backward compatibility with old naming schemes
- Ensures workspace isolation works correctly
- Will run in CI pipeline to catch issues early

Testing:
All 20+ tests pass locally. E2E tests will validate against real Qdrant in CI.
2025-11-20 01:47:09 +08:00
..
conftest.py Add GitHub CI workflow and test markers for offline/integration tests 2025-11-18 11:36:10 +08:00
README_WORKSPACE_ISOLATION_TESTS.md Fix linting 2025-11-18 08:07:54 +08:00
test_aquery_data_endpoint.py Add GitHub CI workflow and test markers for offline/integration tests 2025-11-18 11:36:10 +08:00
test_base_storage_integrity.py style: fix lint errors (trailing whitespace and formatting) 2025-11-20 01:41:23 +08:00
test_curl_aquery_data.sh Fix linting 2025-10-06 04:57:11 +08:00
test_e2e_multi_instance.py test: add comprehensive E2E migration tests for Qdrant and complete unit test coverage 2025-11-20 01:47:09 +08:00
test_embedding_func.py style: fix lint errors (trailing whitespace and formatting) 2025-11-20 01:41:23 +08:00
test_graph_storage.py Add GitHub CI workflow and test markers for offline/integration tests 2025-11-18 11:36:10 +08:00
test_lightrag_ollama_chat.py Rename test classes to prevent warning from pytest 2025-11-18 13:33:05 +08:00
test_migration_complete.py fix: add backward compatibility for Qdrant legacy collection detection 2025-11-20 01:43:47 +08:00
test_postgres_migration.py style: fix lint errors (trailing whitespace and formatting) 2025-11-20 01:41:23 +08:00
test_postgres_retry_integration.py Add GitHub CI workflow and test markers for offline/integration tests 2025-11-18 11:36:10 +08:00
test_qdrant_migration.py style: fix lint errors (trailing whitespace and formatting) 2025-11-20 01:41:23 +08:00
test_workspace_isolation.py Fix test to use default workspace parameter behavior 2025-11-18 11:51:17 +08:00
test_write_json_optimization.py Add GitHub CI workflow and test markers for offline/integration tests 2025-11-18 11:36:10 +08:00