@@ -61,7 +61,7 @@ print_step "Testing basic functionality..."
6161
6262# Test help command
6363print_info " Testing --help command..."
64- if docker run --rm " $FULL_IMAGE_NAME " run.py --help > /dev/null; then
64+ if docker run --rm " $FULL_IMAGE_NAME " vector-db-benchmark --help > /dev/null; then
6565 print_info " ✅ Help command works"
6666else
6767 print_error " ❌ Help command failed"
7070
7171# Test Python environment
7272print_info " Testing Python environment..."
73- if docker run --rm " $FULL_IMAGE_NAME " -c " import sys; print(f'Python {sys.version}'); import redis; print('Redis module available')" > /dev/null; then
73+ if docker run --rm --entrypoint python " $FULL_IMAGE_NAME " -c " import sys; print(f'Python {sys.version}'); import redis; print('Redis module available')" > /dev/null; then
7474 print_info " ✅ Python environment works"
7575else
7676 print_error " ❌ Python environment test failed"
@@ -91,14 +91,14 @@ if docker run -d --name "$REDIS_CONTAINER_NAME" -p 6379:6379 redis:8.2-rc1-bookw
9191 sleep 5
9292
9393 # Test basic connection
94- if timeout 10 docker run --rm --network=host " $FULL_IMAGE_NAME " \
94+ if timeout 10 docker run --rm --network=host --entrypoint python " $FULL_IMAGE_NAME " \
9595 -c " import redis; r = redis.Redis(host='localhost', port=6379); r.ping(); print('Redis connection successful')" > /dev/null 2>&1 ; then
9696 print_info " ✅ Redis connectivity test passed"
9797
9898 # Test benchmark execution with specific configuration
9999 print_info " Testing benchmark execution with redis-default-simple configuration..."
100- if timeout 120 docker run --rm --network=host -v " $( pwd) /results:/app /results" " $FULL_IMAGE_NAME " \
101- run.py --host localhost --engines redis --dataset random-100 --experiment redis-default-simple > /dev/null 2>&1 ; then
100+ if timeout 120 docker run --rm --network=host -v " $( pwd) /results:/code /results" " $FULL_IMAGE_NAME " \
101+ vector-db-benchmark --host localhost --engines redis --dataset random-100 --experiment redis-default-simple > /dev/null 2>&1 ; then
102102 print_info " ✅ Benchmark execution test passed"
103103 else
104104 print_warning " ⚠️ Benchmark execution test failed (this may be expected without proper dataset setup)"
118118# Step 4: Test file output permissions
119119print_step " Testing file output permissions..."
120120TEMP_DIR=$( mktemp -d)
121- if docker run --rm -v " $TEMP_DIR :/app /results" " $FULL_IMAGE_NAME " \
122- -c " import os; os.makedirs('/app /results', exist_ok=True); open('/app /results/test.txt', 'w').write('test'); print('File write successful')" > /dev/null 2>&1 ; then
121+ if docker run --rm -v " $TEMP_DIR :/code /results" --entrypoint python " $FULL_IMAGE_NAME " \
122+ -c " import os; os.makedirs('/code /results', exist_ok=True); open('/code /results/test.txt', 'w').write('test'); print('File write successful')" > /dev/null 2>&1 ; then
123123 if [ -f " $TEMP_DIR /test.txt" ]; then
124124 print_info " ✅ File output test passed"
125125 else
@@ -137,8 +137,8 @@ print_info "Image size: $IMAGE_SIZE"
137137
138138# Step 6: Test benchmark configuration loading
139139print_step " Testing benchmark configuration loading..."
140- if docker run --rm " $FULL_IMAGE_NAME " \
141- -c " import json; import os; print('Configuration loading test'); print(os.listdir('/app '))" > /dev/null 2>&1 ; then
140+ if docker run --rm --entrypoint python " $FULL_IMAGE_NAME " \
141+ -c " import json; import os; print('Configuration loading test'); print(os.listdir('/code '))" > /dev/null 2>&1 ; then
142142 print_info " ✅ Configuration loading test passed"
143143else
144144 print_warning " ⚠️ Configuration loading test completed with warnings"
0 commit comments