mirror of
https://github.com/intari/roocodetests_1.git
synced 2025-04-08 04:59:10 +00:00
now tests no longer use compose
This commit is contained in:
parent
80d365c859
commit
034addb234
3 changed files with 10 additions and 18 deletions
|
@ -38,10 +38,3 @@ services:
|
|||
timeout: 10s
|
||||
retries: 5
|
||||
|
||||
booksearch_tests:
|
||||
build: .
|
||||
container_name: booksearch_tests
|
||||
volumes:
|
||||
- ./test_data:/app/test_data
|
||||
- ./tests:/app/tests
|
||||
command: sh -c "cd /app && PYTHONPATH=/app python -m unittest tests.unit.test_epub_extraction -v"
|
||||
|
|
|
@ -3,11 +3,13 @@
|
|||
# Get absolute path to project root
|
||||
PROJECT_ROOT=$(dirname $(dirname $(realpath $0)))
|
||||
|
||||
# Build the test image
|
||||
docker build -t booksearch_tests .
|
||||
|
||||
# Run the test container
|
||||
docker-compose -f $PROJECT_ROOT/docker-compose.yml up -d booksearch_tests
|
||||
|
||||
# Follow the logs
|
||||
docker logs -f booksearch_tests
|
||||
|
||||
# Clean up
|
||||
docker-compose -f $PROJECT_ROOT/docker-compose.yml down
|
||||
docker run --rm \
|
||||
-v $PROJECT_ROOT/test_data:/app/test_data \
|
||||
-v $PROJECT_ROOT/tests:/app/tests \
|
||||
--name booksearch_tests \
|
||||
booksearch_tests \
|
||||
sh -c "cd /app && PYTHONPATH=/app python -m unittest tests.unit.test_epub_extraction -v"
|
||||
|
|
|
@ -9,10 +9,7 @@ import PyPDF2
|
|||
import time
|
||||
import logging
|
||||
import multiprocessing
|
||||
import sys
|
||||
from pathlib import Path
|
||||
sys.path.append(str(Path(__file__).parent.parent))
|
||||
from index import index_files, get_progress
|
||||
from src.core.index import index_files, get_progress
|
||||
from io import StringIO
|
||||
import sys
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue