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 #!/bin/bash
# do not continue if there is an error # 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 # 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 )" 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 # a copy of settings.json is necessary for the backend tests to work
cp settings.json.template settings.json 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 # run the backend tests
echo "Now run the backend tests" echo "Now run the backend tests"
cd src cd src
npm run test
npm run test-contentcollector
exit_code=$?
kill $! failed=0
sleep 5 npm run test || failed=1
npm run test-contentcollector || failed=1
exit $exit_code exit $failed