Skip to content

Commit a0646fb

Browse files
committed
make integration tests a little bit nicer
1 parent 5a267c1 commit a0646fb

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

test_htr_api.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ export LOGHI_GPUS="-1"
4444
# Start the API server in docker
4545
container_id=$(docker run -u $(id -u ${USER}):$(id -g ${USER}) -v $LOGHI_MODEL_PATH:$LOGHI_MODEL_PATH -v $TEMP_OUTPUT_DIR:$TEMP_OUTPUT_DIR -e LOGHI_MODEL_PATH=$LOGHI_MODEL_PATH -e LOGHI_CHARLIST_PATH="$LOGHI_MODEL_PATH/charlist.txt" -e LOGHI_MODEL_CHANNELS=1 -e LOGHI_BATCH_SIZE=300 -e LOGHI_OUTPUT_PATH="$TEMP_OUTPUT_DIR" -e LOGHI_MAX_QUEUE_SIZE=50000 -e LOGGING_LEVEL="DEBUG" -e LOGHI_GPUS="-1" -e GUNICORN_RUN_HOST='0.0.0.0:5000' -e GUNICORN_WORKERS=1 -e GUNICORN_THREADS=1 -e GUNICORN_ACCESSLOG='-' --name htr-api-test -p 5000:5000 -d loghi/docker.htr python3 /src/loghi-htr/src/api/gunicorn_app.py)
4646

47-
47+
echo "containerid: "$container_id
4848
# Assuming the server takes a few seconds to start up, we sleep for a while
4949
while [ $(curl -w "%{http_code}" -s -o /dev/null localhost:5000/) == "000" ]; do
50-
echo echo waiting for webservice to start
50+
echo waiting for webservice to start
5151
sleep 5s
5252
done
5353

tooling_integration_tests.sh

+2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
#!/bin/bash
22
#mkdir -p /tmp/upload
3+
set -e
34
tmp_dir=$(mktemp -d)
45
container_id=$(docker run -u $(id -u ${USER}):$(id -g ${USER}) -v $tmp_dir:/tmp/upload --name tooling_integrationtest -d -p 8080:8080 -p 8081:8081 loghi/docker.loghi-tooling /src/loghi-tooling/loghiwebservice/target/appassembler/bin/LoghiWebserviceApplication server /src/loghi-tooling/loghiwebservice/target/classes/configuration.yml)
6+
echo $container_id
57

68
while [ "$( docker container inspect -f '{{.State.Status}}' tooling_integrationtest )" != "running" ]; do
79
echo waiting for the docker to start

0 commit comments

Comments
 (0)