mirror of
https://github.com/azaion/detections.git
synced 2026-06-21 08:11:07 +00:00
Fixed state before e2e tests
This commit is contained in:
@@ -20,7 +20,11 @@ steps:
|
||||
COMPOSE_PROJECT_NAME: detections-e2e
|
||||
commands:
|
||||
- cd e2e
|
||||
- mkdir -p results logs
|
||||
- mkdir -p fixtures results logs
|
||||
- if [ -d fixtures/classes.json ]; then rm -rf fixtures/classes.json; fi
|
||||
- if [ ! -f fixtures/classes.json ] && [ -f ../classes.json ]; then cp ../classes.json fixtures/classes.json; fi
|
||||
- test -f fixtures/classes.json
|
||||
- docker compose -f docker-compose.test.yml --profile cpu down -v --remove-orphans || true
|
||||
- docker compose -f docker-compose.test.yml --profile cpu up --build --abort-on-container-exit --exit-code-from e2e-runner
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
|
||||
@@ -26,7 +26,7 @@ services:
|
||||
LOADER_URL: http://mock-loader:8080
|
||||
ANNOTATIONS_URL: http://mock-annotations:8081
|
||||
JWT_SECRET: test-secret-e2e-only
|
||||
CLASSES_JSON_PATH: /media/classes.json
|
||||
CLASSES_JSON_PATH: /app/classes.json
|
||||
volumes:
|
||||
- ./fixtures:/media
|
||||
- ./logs:/app/Logs
|
||||
@@ -49,7 +49,7 @@ services:
|
||||
LOADER_URL: http://mock-loader:8080
|
||||
ANNOTATIONS_URL: http://mock-annotations:8081
|
||||
JWT_SECRET: test-secret-e2e-only
|
||||
CLASSES_JSON_PATH: /media/classes.json
|
||||
CLASSES_JSON_PATH: /app/classes.json
|
||||
volumes:
|
||||
- ./fixtures:/media
|
||||
- ./logs:/app/Logs
|
||||
@@ -72,7 +72,7 @@ services:
|
||||
LOADER_URL: http://mock-loader:8080
|
||||
ANNOTATIONS_URL: http://mock-annotations:8081
|
||||
JWT_SECRET: test-secret-e2e-only
|
||||
CLASSES_JSON_PATH: /media/classes.json
|
||||
CLASSES_JSON_PATH: /app/classes.json
|
||||
volumes:
|
||||
- ./fixtures:/media:ro
|
||||
shm_size: 512m
|
||||
|
||||
@@ -20,6 +20,18 @@ esac
|
||||
|
||||
COMPOSE="docker compose -f docker-compose.test.yml --profile $PROFILE"
|
||||
LOG_TAIL="${E2E_LOG_TAIL:-100}"
|
||||
|
||||
if [[ -d fixtures/classes.json ]]; then
|
||||
rm -rf fixtures/classes.json
|
||||
fi
|
||||
if [[ ! -f fixtures/classes.json && -f ../classes.json ]]; then
|
||||
cp ../classes.json fixtures/classes.json
|
||||
fi
|
||||
if [[ ! -f fixtures/classes.json ]]; then
|
||||
echo "ERROR: e2e/fixtures/classes.json is missing"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
RUNNER_ENV_ARGS=(-e E2E_PROFILE="$PROFILE")
|
||||
if [[ "$PROFILE" == "jetson" ]]; then
|
||||
RUNNER_ENV_ARGS+=(
|
||||
@@ -45,6 +57,7 @@ usage() {
|
||||
|
||||
[[ $# -lt 1 ]] && usage
|
||||
|
||||
$COMPOSE down -v --remove-orphans || true
|
||||
$COMPOSE up -d --build "$DETECTIONS_SERVICE"
|
||||
echo "--- Waiting for detections service to become healthy..."
|
||||
for i in $(seq 1 60); do
|
||||
|
||||
Reference in New Issue
Block a user