mirror of
https://git.linux-kernel.at/oliver/ivatar.git
synced 2025-11-19 06:28:03 +00:00
Increase verbosity
This commit is contained in:
@@ -49,7 +49,7 @@ ivatar is a Django-based federated avatar service that serves as an alternative
|
||||
### Testing
|
||||
- **MANDATORY: Run pre-commit hooks and tests before any changes** - this is an obligation
|
||||
- Use `./run_tests_local.sh` for local development (skips Bluesky tests requiring API credentials)
|
||||
- Run `python3 manage.py test -v2` for full test suite including Bluesky tests
|
||||
- Run `python3 manage.py test -v3` for full test suite including Bluesky tests
|
||||
- **MANDATORY: When adding new code, always write tests to increase code coverage** - never decrease coverage
|
||||
- Use pytest markers appropriately:
|
||||
- `@pytest.mark.bluesky`: Tests requiring Bluesky API credentials
|
||||
|
||||
12
README.md
12
README.md
@@ -15,6 +15,7 @@
|
||||
## Running Tests
|
||||
|
||||
### Local Development (Recommended)
|
||||
|
||||
For local development, use the provided script to skip Bluesky tests that require external API credentials:
|
||||
|
||||
```bash
|
||||
@@ -24,27 +25,30 @@ For local development, use the provided script to skip Bluesky tests that requir
|
||||
This runs all tests except those marked with `@pytest.mark.bluesky`.
|
||||
|
||||
### All Tests
|
||||
|
||||
To run all tests including Bluesky tests (requires Bluesky API credentials):
|
||||
|
||||
```bash
|
||||
python3 manage.py test -v2
|
||||
python3 manage.py test -v3
|
||||
```
|
||||
|
||||
### Specific Test Categories
|
||||
|
||||
```bash
|
||||
# Run only Bluesky tests
|
||||
python3 manage.py test ivatar.ivataraccount.test_views_bluesky -v2
|
||||
python3 manage.py test ivatar.ivataraccount.test_views_bluesky -v3
|
||||
|
||||
# Run only file upload security tests
|
||||
python3 manage.py test ivatar.test_file_security -v2
|
||||
python3 manage.py test ivatar.test_file_security -v3
|
||||
|
||||
# Run only upload tests
|
||||
python3 manage.py test ivatar.ivataraccount.test_views -v2
|
||||
python3 manage.py test ivatar.ivataraccount.test_views -v3
|
||||
```
|
||||
|
||||
## Test Markers
|
||||
|
||||
Tests are categorized using pytest markers:
|
||||
|
||||
- `@pytest.mark.bluesky`: Tests requiring Bluesky API credentials
|
||||
- `@pytest.mark.slow`: Long-running tests
|
||||
- `@pytest.mark.integration`: Integration tests
|
||||
|
||||
@@ -21,14 +21,14 @@ python3 manage.py test \
|
||||
ivatar.test_views_stats \
|
||||
ivatar.tools.test_views \
|
||||
ivatar.test_wsgi \
|
||||
-v2
|
||||
-v3
|
||||
|
||||
echo ""
|
||||
echo "To run all tests including Bluesky (requires API credentials):"
|
||||
echo "python3 manage.py test -v2"
|
||||
echo "python3 manage.py test -v3"
|
||||
echo ""
|
||||
echo "To run only Bluesky tests:"
|
||||
echo "python3 manage.py test ivatar.ivataraccount.test_views_bluesky -v2"
|
||||
echo "python3 manage.py test ivatar.ivataraccount.test_views_bluesky -v3"
|
||||
echo ""
|
||||
echo "To run tests with OpenTelemetry enabled:"
|
||||
echo "./run_tests_with_ot.sh"
|
||||
|
||||
@@ -12,7 +12,7 @@ export ENABLE_OPENTELEMETRY=false
|
||||
export OTEL_ENABLED=false
|
||||
|
||||
# Run Django tests (Django will auto-discover all tests)
|
||||
python3 manage.py test -v2
|
||||
python3 manage.py test -v3
|
||||
|
||||
echo ""
|
||||
echo "Tests completed successfully (OpenTelemetry disabled)"
|
||||
|
||||
@@ -14,7 +14,7 @@ export OTEL_SERVICE_NAME=ivatar-test
|
||||
export OTEL_ENVIRONMENT=test
|
||||
|
||||
# Run Django tests (Django will auto-discover all tests)
|
||||
python3 manage.py test -v2
|
||||
python3 manage.py test -v3
|
||||
|
||||
echo ""
|
||||
echo "Tests completed successfully (OpenTelemetry enabled)"
|
||||
|
||||
Reference in New Issue
Block a user