diff --git a/docker-compose.override.unit_tests_cicd.yml b/docker-compose.override.unit_tests_cicd.yml index 0acd340ce4c..1151d43600a 100644 --- a/docker-compose.override.unit_tests_cicd.yml +++ b/docker-compose.override.unit_tests_cicd.yml @@ -13,7 +13,7 @@ services: condition: service_started environment: PYTHONWARNINGS: error # We are strict about Warnings during testing - DD_DEBUG: 'True' + DD_DEBUG: 'False' DD_LOG_LEVEL: 'ERROR' DD_TEST_DATABASE_NAME: ${DD_TEST_DATABASE_NAME:-test_defectdojo} DD_DATABASE_NAME: ${DD_TEST_DATABASE_NAME:-test_defectdojo} diff --git a/docker/entrypoint-unit-tests.sh b/docker/entrypoint-unit-tests.sh index 21e9465fc48..bc1ddaea7ea 100755 --- a/docker/entrypoint-unit-tests.sh +++ b/docker/entrypoint-unit-tests.sh @@ -80,16 +80,16 @@ echo "Unit Tests" echo "------------------------------------------------------------" # Removing parallel and shuffle for now to maintain stability -python3 manage.py test unittests -v 3 --keepdb --no-input --exclude-tag="non-parallel" --exclude-tag="transactional" || { +python3 manage.py test unittests --keepdb --no-input --exclude-tag="non-parallel" --exclude-tag="transactional" || { exit 1; } -python3 manage.py test unittests -v 3 --keepdb --no-input --tag="non-parallel" || { +python3 manage.py test unittests --keepdb --no-input --tag="non-parallel" || { exit 1; } # Running one unit tests that inherits from TransactionTestCase somehow changes the behaviour of how Django loads fixtures into the database. # Meaning any test after this one would fail to load our dojo_testdata.json fixture. In a way this makes sense as it contains some data integrity problems. # I tried to fix these in https://github.com/DefectDojo/django-DefectDojo/pull/13217. # For now here we run the only TranscationTestCase at the end to avoid the problem. -python3 manage.py test unittests -v 3 --keepdb --no-input --tag="transactional" || { +python3 manage.py test unittests --keepdb --no-input --tag="transactional" || { exit 1; }