test: cover webm/ogg record uploads in the right test suite (#1254)
my previous PR (#1253) added webm/ogg parameterization to
backend/tests/test_integration_upload.py — which turns out to be a
LEGACY file that the CI integration workflow does not run. the
actual suite is backend/tests/integration/ and CI invokes it via
\`pytest tests/integration -m integration -v\` (see
.github/workflows/integration-tests.yml). i caught this only after
manually dispatching the integration workflow and reading the output
logs to verify my tests executed — they did not appear at all, and
the 12 tests that ran were all under tests/integration/.
this PR corrects the placement:
1. reverts backend/tests/test_integration_upload.py to its pre-#1253
state (wav-only, as before — nothing is gained by adding cases to
a file CI won't run)
2. adds backend/tests/integration/test_record_formats.py with two
new integration tests: test_upload_webm and test_upload_ogg. both
use the existing user1_client + upload-then-delete pattern from
test_lossless_uploads.py so they fit the surrounding idiom.
3. adds drone_webm and drone_ogg fixtures to the integration
conftest.py. they use a new save_drone_as_opus helper that forces
libopus — save_drone_as with ffmpeg defaults produced
FLAC-in-ogg (the ffprobe-confirmed default codec ffmpeg picks for
a bare .ogg extension), which isn't what browser MediaRecorder
actually emits. opus-in-{webm,ogg} matches real-world output.
4. save_drone_as_opus lives in tests/integration/utils/audio.py
alongside the existing save_drone / save_drone_as helpers. it
skips with a helpful message if ffmpeg is unavailable.
verified locally:
- ffprobe confirms both fixtures are opus (19925B webm, 18994B ogg)
- both tests collect and skip cleanly without tokens (2 skipped)
- just backend lint + just backend test still pass (765 passed, 15
skipped — +2 from this PR)
next time the CI integration workflow runs (automatic on backend/src
changes, manual dispatch otherwise) it will exercise the full
/record upload path end-to-end against staging: post webm/ogg →
transcoder → mp3 → verify track.file_type == "mp3" → delete.
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
authored by