You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This change adds the so-called exploration tests which we use to ensure that the dynamic instrumentation does not affect the expected behaviour of the instrumented code. We select a few popular Python frameworks and inject probes on each single line and wrap every single function. We then run the full test suite for the actual validation.
At the end of the test run, line coverage and function call counts are reported as a "proof-of-work"
# Note: test_supports_json_field_operational_error will fail with the tracer
90
90
# DEV: Insert @skipUnless before the test definition
91
91
# DEV: We need to escape the space indenting
92
92
sed -i'' '/def test_supports_json_field_operational_error/i \ \ \ \ @skipUnless(False, "test not supported by dd-trace-py")' tests/backends/sqlite/test_features.py
93
+
sed -i'' 's/if not filename.startswith(os.path.dirname(django.__file__))/if False/' django/conf/__init__.py
94
+
sed -i'' 's/test_paginating_unordered_queryset_raises_warning/paginating_unordered_queryset_raises_warning/' tests/pagination/tests.py
95
+
sed -i'' 's/test_access_warning/access_warning/' tests/auth_tests/test_password_reset_timeout_days.py
96
+
sed -i'' 's/test_get_or_set_version/get_or_set_version/' tests/cache/tests.py
97
+
sed -i'' 's/test_avoid_infinite_loop_on_too_many_subqueries/avoid_infinite_loop_on_too_many_subqueries/' tests/queries/tests.py
98
+
sed -i'' 's/test_multivalue_dict_key_error/multivalue_dict_key_error/' tests/view_tests/tests/test_debug.py # Sensitive data leak
99
+
sed -i'' 's/test_db_table/db_table/' tests/schema/tests.py
100
+
93
101
- name: Run tests
94
102
# django.tests.requests module interferes with requests library patching in the tracer -> disable requests patch
#Parameters for keyword expression skip 3 failing tests that are expected due to asserting on headers. The errors are because our context propagation headers are being added
295
309
#test_staticfiles_with_invalid_dir_permissions_returns_401 fails with and without ddtrace enabled
296
310
- name: Run tests
297
-
run: pytest --ddtrace-patch-all tests -k 'not test_request_headers and not test_subdomain_route and not test_websocket_headers and not test_staticfiles_with_invalid_dir_permissions_returns_401'
311
+
run: pytest -W ignore --ddtrace-patch-all tests -k 'not test_request_headers and not test_subdomain_route and not test_websocket_headers and not test_staticfiles_with_invalid_dir_permissions_returns_401'
0 commit comments