datarhei-dragonfork-core/app/webrtc
Zac Gaetano b030102611 test(webrtc): add M2 integration smoke test
End-to-end exercise of the M2 pipeline — subsystem hook, port
allocation, two-track forwarding, WHEP handshake — without
spinning up a full Core HTTP server:

- Fire onProcessStart directly to get the two RTP legs back
- Parse video + audio UDP ports out of the leg addresses,
  assert adjacency
- Mount the Handler on an Echo httptest server
- Build a Pion PeerConnection (recvonly video + audio), POST
  its offer, feed the answer back in
- Spray synthetic RTP packets at both loopback sockets
- Assert both OnTrack callbacks fire and each delivers at least
  one RTP packet within 10s
- DELETE via the returned Location header to confirm teardown

Passes cleanly under -race in ~1s. Catches regressions across
the whole M2 wiring from a single fixture.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-17 10:11:34 -04:00
..
ffmpeg_args.go feat(app/webrtc): port allocator + FFmpeg arg builder 2026-04-17 09:52:09 -04:00
ffmpeg_args_test.go feat(app/webrtc): port allocator + FFmpeg arg builder 2026-04-17 09:52:09 -04:00
handler.go feat(webrtc): add Echo WHEP handler for app/webrtc subsystem 2026-04-17 10:03:24 -04:00
handler_test.go feat(webrtc): add Echo WHEP handler for app/webrtc subsystem 2026-04-17 10:03:24 -04:00
integration_test.go test(webrtc): add M2 integration smoke test 2026-04-17 10:11:34 -04:00
lifecycle.go feat(webrtc): add app/webrtc subsystem + lifecycle hooks 2026-04-17 10:02:00 -04:00
lifecycle_test.go feat(webrtc): add app/webrtc subsystem + lifecycle hooks 2026-04-17 10:02:00 -04:00
portalloc.go feat(app/webrtc): port allocator + FFmpeg arg builder 2026-04-17 09:52:09 -04:00
portalloc_test.go feat(app/webrtc): port allocator + FFmpeg arg builder 2026-04-17 09:52:09 -04:00
subsystem.go feat(webrtc): add app/webrtc subsystem + lifecycle hooks 2026-04-17 10:02:00 -04:00