Fix backendRunner's exitcode (#4134)

* remove minification because it's not necessary for backend and contentcollector tests

* run all tests regardless of errors
pull/4142/head
webzwo0i 2020-06-27 21:10:55 +02:00 committed by GitHub
parent 168737b6d8
commit bbee833b89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 13 deletions

View File

@ -1,7 +1,7 @@
#!/bin/bash
# do not continue if there is an error
set -eu
set -u
# source: https://stackoverflow.com/questions/59895/get-the-source-directory-of-a-bash-script-from-within-the-script-itself#246128
MY_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
@ -31,20 +31,12 @@ echo "Successfully connected to Etherpad on http://localhost:9001"
# a copy of settings.json is necessary for the backend tests to work
cp settings.json.template settings.json
# Build the minified files?
curl http://localhost:9001/p/minifyme -f -s > /dev/null
# just in case, let's wait for another 10 seconds before going on
sleep 10
# run the backend tests
echo "Now run the backend tests"
cd src
npm run test
npm run test-contentcollector
exit_code=$?
kill $!
sleep 5
failed=0
npm run test || failed=1
npm run test-contentcollector || failed=1
exit $exit_code
exit $failed