Simplify test scripts and move run_tests_local.sh to scripts/

- Move run_tests_local.sh to scripts/ directory for consistency
- Remove explicit test module listing from all test scripts
- Let Django auto-discover all tests instead of maintaining explicit lists
- Update README.md to reference new script location
- Simplify scripts/run_tests_with_coverage.py to use auto-discovery
- Reduce maintenance burden by eliminating duplicate test module lists
This commit is contained in:
Oliver Falk
2025-10-16 18:00:17 +02:00
parent 6f205ccad9
commit eeeb8a4f3a
5 changed files with 44 additions and 48 deletions

View File

@@ -18,24 +18,8 @@ def main():
print("Running tests with OpenTelemetry enabled...")
print("==========================================")
# Test modules to run (including OpenTelemetry-specific tests)
test_modules = [
'ivatar.ivataraccount.test_auth',
'ivatar.ivataraccount.test_views',
'ivatar.ivataraccount.test_views_bluesky',
'ivatar.test_auxiliary',
'ivatar.test_file_security',
'ivatar.test_opentelemetry',
'ivatar.test_static_pages',
'ivatar.test_utils',
'ivatar.test_views',
'ivatar.test_views_stats',
'ivatar.tools.test_views',
'ivatar.test_wsgi',
]
# Run Django tests
cmd = ['python3', 'manage.py', 'test'] + test_modules + ['-v2']
# Run Django tests (Django will auto-discover all tests)
cmd = ['python3', 'manage.py', 'test', '-v2']
try:
result = subprocess.run(cmd, check=True)