Skip to content

Commit d5556d3

Browse files
authored
Rest Framework Tests: Improve speed and repeatability (#10503)
1 parent 844aed4 commit d5556d3

24 files changed

Lines changed: 308 additions & 221 deletions

docker-compose.override.unit_tests_cicd.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ services:
1515
environment:
1616
PYTHONWARNINGS: error # We are strict about Warnings during testing
1717
DD_DEBUG: 'True'
18+
DD_LOG_LEVEL: 'ERROR'
1819
DD_TEST_DATABASE_NAME: ${DD_TEST_DATABASE_NAME}
1920
DD_DATABASE_NAME: ${DD_TEST_DATABASE_NAME}
2021
DD_DATABASE_ENGINE: ${DD_DATABASE_ENGINE}

docker/entrypoint-unit-tests-devDocker.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ EOF
5353

5454
echo "Unit Tests"
5555
echo "------------------------------------------------------------"
56-
python3 manage.py test unittests -v 3 --keepdb --no-input --shuffle
56+
python3 manage.py test unittests -v 3 --keepdb --no-input --failfast --shuffle --parallel --exclude-tag="non-parallel"
57+
python3 manage.py test unittests -v 3 --keepdb --no-input --failfast --shuffle --tag="non-parallel"
5758

5859
# you can select a single file to "test" unit tests
5960
# python3 manage.py test unittests.tools.test_npm_audit_scan_parser.TestNpmAuditParser --keepdb -v 3

docker/entrypoint-unit-tests.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,4 +79,6 @@ python3 manage.py migrate
7979

8080
echo "Unit Tests"
8181
echo "------------------------------------------------------------"
82-
python3 manage.py test unittests -v 3 --keepdb --no-input --shuffle
82+
python3 manage.py test unittests -v 3 --keepdb --no-input --failfast --shuffle --parallel --exclude-tag="non-parallel"
83+
python3 manage.py test unittests -v 3 --keepdb --no-input --failfast --shuffle --tag="non-parallel"
84+

0 commit comments

Comments
 (0)