mirror of
https://git.linux-kernel.at/oliver/ivatar.git
synced 2025-11-15 20:48:02 +00:00
Fix test scripts to use Django test suite instead of pytest
- Replace pytest with python3 manage.py test in both scripts - Remove pytest.ini configuration file - Maintain consistency with existing testing approach - Include all test modules explicitly for better control
This commit is contained in:
@@ -5,17 +5,26 @@
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
echo "Running tests without OpenTelemetry (default mode)..."
|
echo "Running tests without OpenTelemetry (default mode)..."
|
||||||
|
echo "====================================================="
|
||||||
|
|
||||||
# Ensure OpenTelemetry is disabled
|
# Ensure OpenTelemetry is disabled
|
||||||
export ENABLE_OPENTELEMETRY=false
|
export ENABLE_OPENTELEMETRY=false
|
||||||
export OTEL_ENABLED=false
|
export OTEL_ENABLED=false
|
||||||
export DJANGO_SETTINGS_MODULE=ivatar.settings
|
|
||||||
|
|
||||||
# Run tests excluding OpenTelemetry-specific tests
|
# Run Django tests excluding OpenTelemetry-specific tests
|
||||||
python3 -m pytest \
|
python3 manage.py test \
|
||||||
-m "not opentelemetry" \
|
ivatar.ivataraccount.test_auth \
|
||||||
--verbose \
|
ivatar.ivataraccount.test_views \
|
||||||
--tb=short \
|
ivatar.ivataraccount.test_views_bluesky \
|
||||||
"$@"
|
ivatar.test_auxiliary \
|
||||||
|
ivatar.test_file_security \
|
||||||
|
ivatar.test_static_pages \
|
||||||
|
ivatar.test_utils \
|
||||||
|
ivatar.test_views \
|
||||||
|
ivatar.test_views_stats \
|
||||||
|
ivatar.tools.test_views \
|
||||||
|
ivatar.test_wsgi \
|
||||||
|
-v2
|
||||||
|
|
||||||
|
echo ""
|
||||||
echo "Tests completed successfully (OpenTelemetry disabled)"
|
echo "Tests completed successfully (OpenTelemetry disabled)"
|
||||||
|
|||||||
@@ -5,19 +5,29 @@
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
echo "Running tests with OpenTelemetry enabled..."
|
echo "Running tests with OpenTelemetry enabled..."
|
||||||
|
echo "=========================================="
|
||||||
|
|
||||||
# Enable OpenTelemetry
|
# Enable OpenTelemetry
|
||||||
export ENABLE_OPENTELEMETRY=true
|
export ENABLE_OPENTELEMETRY=true
|
||||||
export OTEL_ENABLED=true
|
export OTEL_ENABLED=true
|
||||||
export OTEL_SERVICE_NAME=ivatar-test
|
export OTEL_SERVICE_NAME=ivatar-test
|
||||||
export OTEL_ENVIRONMENT=test
|
export OTEL_ENVIRONMENT=test
|
||||||
export DJANGO_SETTINGS_MODULE=ivatar.settings
|
|
||||||
|
|
||||||
# Run tests including OpenTelemetry-specific tests
|
# Run Django tests including OpenTelemetry-specific tests
|
||||||
python3 -m pytest \
|
python3 manage.py test \
|
||||||
-m "opentelemetry or no_opentelemetry" \
|
ivatar.ivataraccount.test_auth \
|
||||||
--verbose \
|
ivatar.ivataraccount.test_views \
|
||||||
--tb=short \
|
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 \
|
||||||
|
-v2
|
||||||
|
|
||||||
|
echo ""
|
||||||
echo "Tests completed successfully (OpenTelemetry enabled)"
|
echo "Tests completed successfully (OpenTelemetry enabled)"
|
||||||
|
|||||||
Reference in New Issue
Block a user