Skip to content
Snippets Groups Projects
Commit bae2a04e authored by Simon Künzel's avatar Simon Künzel
Browse files

Fix failing test not actually failing and add artifacts (This commit should fail), Closes #24

parent a75cf5a8
No related branches found
No related tags found
No related merge requests found
Pipeline #5874 canceled
...@@ -30,3 +30,7 @@ run-tests: ...@@ -30,3 +30,7 @@ run-tests:
entrypoint: [""] entrypoint: [""]
script: script:
- $CI_PROJECT_DIR/docker_start.sh -test - $CI_PROJECT_DIR/docker_start.sh -test
artifacts:
paths:
- $CI_PROJECT_DIR/coverage/report.txt
- $CI_PROJECT_DIR/coverage/html/*
...@@ -11,10 +11,14 @@ if [ $# = 1 ] && [ $1 = "-test" ]; then ...@@ -11,10 +11,14 @@ if [ $# = 1 ] && [ $1 = "-test" ]; then
uname -a uname -a
export VIDEOAG_API_TEST_CONFIG_OVERRIDE="../config/test_config_override.py" export VIDEOAG_API_TEST_CONFIG_OVERRIDE="../config/test_config_override.py"
python3 -V python3 -V
python3 -m coverage run --data-file "../coverage/.data" run_tests.py python3 -m coverage run --data-file "../coverage/.data" run_tests.py ||
python3 -m coverage report --data-file "../coverage/.data" --include "./*" { echo "Test failed!"; exit 1; }
python3 -m coverage report --data-file "../coverage/.data" -m --include "./*" > ../coverage/report.txt python3 -m coverage report --data-file "../coverage/.data" --include "./*" ||
python3 -m coverage html -d "../coverage/html/" --data-file "../coverage/.data" --include "./*" { echo "Coverage report stdout failed"; exit 1; }
python3 -m coverage report --data-file "../coverage/.data" -m --include "./*" > ../coverage/report.txt ||
{ echo "Coverage report report.txt failed"; exit 1; }
python3 -m coverage html -d "../coverage/html/" --data-file "../coverage/.data" --include "./*" ||
{ echo "Coverage report html failed"; exit 1; }
else else
echo "Running nginx and uWSGI" echo "Running nginx and uWSGI"
nginx -c ${VIDEOAG_NGINX_CONFIG} -p . & nginx -c ${VIDEOAG_NGINX_CONFIG} -p . &
......
...@@ -8,7 +8,7 @@ class SiteTest(ApiTest): ...@@ -8,7 +8,7 @@ class SiteTest(ApiTest):
# TODO test live config # TODO test live config
self.do_json_request( self.do_json_request(
"GET", "GET",
"/status", "/path-which-does-not-exist",
None, None,
{ {
"status": "available", "status": "available",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment