-
Notifications
You must be signed in to change notification settings - Fork 53
/
Copy pathonly-solr.sh
executable file
·41 lines (34 loc) · 1.21 KB
/
only-solr.sh
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
41
#!/bin/bash
# Run the integration tests.
#
# testrunner.sh <servicename>
#
# For <servicename>, use "test" for CI testing,
# "test-local" to run locally (and automatically save
# missing responses).
set -o errexit # Exit on error (set -e)
# Get the servicename (or default to "test", the regular CI test)
SERVICE_NAME="${1:-test}"
# Go to the test dir
cd $( dirname -- "$0"; )/
# Check how to call Compose
#COMPOSE=docker-compose
#if ! command -v $COMPOSE &> /dev/null
#then
COMPOSE="docker compose"
#fi
# Enable BuildKit
export DOCKER_BUILDKIT=1
##----------------------------------------------------------
## Re-run the same tests using Solr+proxy
echo === Testing Solr \(with integrated index format\)...
$COMPOSE build proxy solr "$SERVICE_NAME"
$COMPOSE down -v # delete previous index so it updates if it was changed in the repo
$COMPOSE up --force-recreate -d proxy solr
export APP_URL=http://proxy:8080/blacklab-server
export CORPUS_NAME=test
export SKIP_INDEXING_TESTS=true # not yet implemented for Solr
sleep 15 # allow Solr a little time to start up
$COMPOSE run --rm "$SERVICE_NAME"
$COMPOSE stop # (stop then rm -v instead of down -v, otherwise we get an error about the volume being in use)
$COMPOSE rm -fv