Files
t66_langmem/test.sh
Docker Config Backup 46faa78237 Initial commit: LangMem fact-based AI memory system with docs and MCP integration
- Complete fact-based memory API with mem0-inspired approach
- Individual fact extraction and deduplication
- ADD/UPDATE/DELETE memory actions
- Precision search with 0.86+ similarity scores
- MCP server for Claude Code integration
- Neo4j graph relationships and PostgreSQL vector storage
- Comprehensive documentation with architecture and API docs
- Matrix communication integration
- Production-ready Docker setup with Ollama and Supabase

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-17 13:16:19 +02:00

56 lines
1.4 KiB
Bash
Executable File

#!/bin/bash
# LangMem Test Runner Script
set -e
echo "🧪 Running LangMem API Tests"
# Check if services are running
if ! curl -s http://localhost:8765/health > /dev/null; then
echo "❌ LangMem API is not running. Please start with ./start-dev.sh first."
exit 1
fi
# Install test dependencies
echo "📦 Installing test dependencies..."
pip install -r tests/requirements.txt
# Run different test suites based on argument
case "${1:-all}" in
"unit")
echo "🔬 Running unit tests..."
python -m pytest tests/test_api.py -v -m "not integration"
;;
"integration")
echo "🔗 Running integration tests..."
python -m pytest tests/test_integration.py -v -m "integration"
;;
"all")
echo "🎯 Running all tests..."
python -m pytest tests/ -v
;;
"quick")
echo "⚡ Running quick tests..."
python -m pytest tests/ -v -m "not slow"
;;
"coverage")
echo "📊 Running tests with coverage..."
python -m pytest tests/ -v --cov=src --cov-report=html --cov-report=term
;;
*)
echo "❌ Unknown test type: $1"
echo "Usage: ./test.sh [unit|integration|all|quick|coverage]"
exit 1
;;
esac
echo ""
echo "✅ Tests completed!"
# Show service logs if tests failed
if [ $? -ne 0 ]; then
echo ""
echo "❌ Tests failed. Showing recent API logs:"
docker-compose logs --tail=50 langmem-api
fi