-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtest_pgvector.sh
More file actions
executable file
·40 lines (31 loc) · 919 Bytes
/
test_pgvector.sh
File metadata and controls
executable file
·40 lines (31 loc) · 919 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/bash
# Test pgvector capabilities
# This script runs integration tests to demonstrate semantic search
set -e
echo "🧪 Testing pgvector Integration"
echo "================================"
echo ""
# Check if .env file exists
if [ -f .env ]; then
echo "📋 Loading configuration from .env..."
export $(grep -v '^#' .env | xargs)
else
echo "⚠️ No .env file found. Please create one with DATABASE_URL"
echo ""
echo "Example .env:"
echo "DATABASE_URL=postgresql://user:pass@localhost:5432/briefly"
exit 1
fi
# Verify DATABASE_URL is set
if [ -z "$DATABASE_URL" ]; then
echo "❌ DATABASE_URL not set in .env file"
exit 1
fi
echo "✅ Connected to: ${DATABASE_URL%%@*}@***"
echo ""
# Run the integration test
echo "🚀 Running pgvector capabilities test..."
echo ""
go test -v ./internal/vectorstore -run TestPgVectorIntegration
echo ""
echo "✅ Test completed!"