Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /ViperJuice_Code-Index-MCP /tests /test_qdrant_autostart.py
| """Tests for Docker-based Qdrant autostart.""" | |
| from pathlib import Path | |
| from mcp_server.config.settings import Settings | |
| from mcp_server.setup.qdrant_autostart import ensure_qdrant_running | |
| def test_ensure_qdrant_running_reports_missing_docker(monkeypatch, tmp_path: Path): | |
| settings = Settings( | |
| qdrant_host="127.0.0.1", | |
| qdrant_port=65530, | |
| qdrant_compose_file=str(tmp_path / "docker-compose.qdrant.yml"), | |
| semantic_preflight_timeout_seconds=1, | |
| ) | |
| (tmp_path / "docker-compose.qdrant.yml").write_text("services: {}", encoding="utf-8") | |
| monkeypatch.setattr("mcp_server.setup.qdrant_autostart.is_docker_available", lambda: False) | |
| result = ensure_qdrant_running(settings) | |
| assert result.started is False | |
| assert "Docker is not available" in result.message | |
| def test_ensure_qdrant_running_reports_missing_compose_file(monkeypatch): | |
| settings = Settings( | |
| qdrant_host="127.0.0.1", | |
| qdrant_port=65530, | |
| qdrant_compose_file="/nonexistent/compose.yml", | |
| semantic_preflight_timeout_seconds=1, | |
| ) | |
| monkeypatch.setattr("mcp_server.setup.qdrant_autostart.is_docker_available", lambda: True) | |
| result = ensure_qdrant_running(settings) | |
| assert result.started is False | |
| assert "compose file not found" in result.message | |
Xet Storage Details
- Size:
- 1.31 kB
- Xet hash:
- 45f74c20a41ad690d133b6a74a21640236fcd5efb39e67ecb5fad162cd722640
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.