forked from LearningLocker/xapi-service
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.sh
28 lines (20 loc) · 775 Bytes
/
test.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
#!/usr/bin/env sh
log () {
echo "- XAPI SERVICE LOG: $1"
}
log "Running conformance tests."
log "Starting the server on port $EXPRESS_PORT."
SERVICE_AWAIT_UPDATES=true node dist/conformanceServer.js &
log "Cloning the ADL conformance test suite."
git clone -b master https://github.com/adlnet/lrs-conformance-test-suite ../conformance
cd ../conformance
log "Installing dependencies for the ADL conformance test suite."
npm ci
log "Running the ADL conformance test suite."
node bin/console_runner.js -e "http://localhost:$EXPRESS_PORT/data/xAPI" -a -u "AAA" -p "BBB" -b
exitCode=$?
log "Stopping the server."
ps aux | grep [n]ode\ dist\/conformanceServer | awk '{print $2}' | xargs kill
cat /root/conformance/logs/*
log "Completed conformance tests."
exit $exitCode