Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docker-compose.override.unit_tests_cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
6 changes: 3 additions & 3 deletions docker/entrypoint-unit-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}