Files
ivatar/run_tests_local.sh
Oliver Falk 7258d911c8 Add OpenTelemetry integration
- Add OpenTelemetry dependencies to requirements.txt
- Implement OpenTelemetry configuration with feature flag support
- Add OpenTelemetry middleware for custom metrics and tracing
- Update Django settings to conditionally enable OpenTelemetry
- Add comprehensive test suite for OpenTelemetry functionality
- Create test scripts for running with/without OpenTelemetry
- Add pytest markers for OpenTelemetry test categorization
- Update documentation with OpenTelemetry setup and infrastructure details

Features:
- Feature flag controlled (ENABLE_OPENTELEMETRY) for F/LOSS deployments
- Localhost-only security model
- Custom avatar metrics and tracing
- Graceful fallback when OpenTelemetry is disabled
- Comprehensive test coverage for both enabled/disabled states
2025-10-16 14:19:24 +02:00

38 lines
1.2 KiB
Bash
Executable File

#!/bin/bash
# Run tests locally, skipping Bluesky tests that require external API credentials
# OpenTelemetry is disabled by default for local testing
echo "Running tests locally (skipping Bluesky tests, OpenTelemetry disabled)..."
echo "======================================================================="
# Ensure OpenTelemetry is disabled for local testing
export ENABLE_OPENTELEMETRY=false
export OTEL_ENABLED=false
# Run Django tests excluding the Bluesky test file and OpenTelemetry tests
python3 manage.py test \
ivatar.ivataraccount.test_auth \
ivatar.ivataraccount.test_views \
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 "To run all tests including Bluesky (requires API credentials):"
echo "python3 manage.py test -v2"
echo ""
echo "To run only Bluesky tests:"
echo "python3 manage.py test ivatar.ivataraccount.test_views_bluesky -v2"
echo ""
echo "To run tests with OpenTelemetry enabled:"
echo "./run_tests_with_ot.sh"
echo ""
echo "To run tests without OpenTelemetry (default):"
echo "./run_tests_no_ot.sh"