forked from dcmjs-org/dicomweb-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_ci.sh
executable file
·29 lines (22 loc) · 913 Bytes
/
test_ci.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
# Clear any previous data from the last test run
rm -rf /tmp/dcm4chee-arc/db
# now start dcm4chee archive and wait for it to startup
echo 'Starting dcm4chee Docker container'
docker-compose -f dcm4chee-docker-compose.yml up -d || { exit 1; }
until curl localhost:8008/dcm4chee-arc/aets; do echo waiting for archive...; sleep 2; done
echo ""
echo ""
echo "Archive started, ready to run tests..."
echo ""
# at this point DICOMweb server is running and ready for testing
echo 'Installing and running tests'
./node_modules/karma/bin/karma start karma.conf.js --browsers ChromeHeadless_without_security --concurrency 1 --single-run
# Store the exit code from mochify
exit_code=$?
# now shut down the archive
echo 'Shutting down Docker container'
docker-compose -f dcm4chee-docker-compose.yml down
# clean up temp database used by test
sudo rm -rf ./tmp
# Exit with the exit code from Mochify
exit "$exit_code"