-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathrun_tests.sh
More file actions
executable file
·33 lines (27 loc) · 907 Bytes
/
Copy pathrun_tests.sh
File metadata and controls
executable file
·33 lines (27 loc) · 907 Bytes
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
30
31
32
33
#!/bin/sh
PYTEST_ARGS="${@:--v}"
run_tests() {
service=$1
test_dir=$2
echo ""
echo "================================================================"
echo " Running $test_dir tests in '$service' container"
echo "================================================================"
docker compose run --rm --no-deps -e CONFIG=Test "$service" \
python -m pytest $test_dir $PYTEST_ARGS
return $?
}
failed=0
run_tests app tests/pwnedhub || failed=1
run_tests api tests/pwnedapi || failed=1
run_tests sso tests/pwnedsso || failed=1
run_tests admin tests/pwnedadmin || failed=1
echo ""
echo "================================================================"
if [ $failed -eq 0 ]; then
echo " All test suites passed."
else
echo " Some test suites had failures."
fi
echo "================================================================"
exit $failed