From dddfff6800dd851d3eefe70c1d9aea6af218bdfb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iwo=20Strzebo=C5=84ski?= Date: Mon, 19 Oct 2026 00:37:27 +0000 Subject: [PATCH] Say what the e2e's WebRTC assertion actually proves go2rtc is not running in this test, so the gateway cannot reach it and the message "its go2rtc answered (as a refusal)" was wrong. What the assertion really establishes is that the offer travelled cloud -> uplink -> gateway at all, which a timeout would not. Records that the happy path was verified by hand - the real go2rtc and a valid offer return 200 with an answer SDP carrying go2rtc's own host and server-reflexive candidates - and why that is not automated here: it needs a live camera and go2rtc installed, and this script should not depend on either. --- scripts/e2e-edge.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/scripts/e2e-edge.sh b/scripts/e2e-edge.sh index 6a77f31..74210d3 100755 --- a/scripts/e2e-edge.sh +++ b/scripts/e2e-edge.sh @@ -349,8 +349,15 @@ else -H "$AUTH_HEADER" -H 'Content-Type: application/json' \ -d '{"sdp":"v=0\r\no=- 0 0 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\n"}' \ "$BASE/printers/$CAM_UUID/webrtc")" - if [ "$OFFER_CODE" = "503" ] && grep -q 'go2rtc\|connection refused\|refused the offer' "$WORK/offer.json"; then - ok "the WebRTC offer reached the gateway and its go2rtc answered (as a refusal): $(head -c 160 "$WORK/offer.json")" + # go2rtc is deliberately not running here, so the expected answer is the + # gateway reporting that it could not reach it - which still proves the + # offer travelled cloud -> uplink -> gateway. A timeout would mean it did + # not. Verified once by hand with the real go2rtc and a valid offer, which + # returns a 200 and an answer SDP carrying go2rtc's own ICE candidates; + # that is not automated here because it needs a live camera and go2rtc + # installed, which would make this script depend on both. + if [ "$OFFER_CODE" = "503" ] && grep -q 'go2rtc' "$WORK/offer.json"; then + ok "the WebRTC offer round-tripped to the gateway: $(head -c 170 "$WORK/offer.json")" elif [ "$OFFER_CODE" = "503" ] && grep -q 'did not answer within' "$WORK/offer.json"; then fail "the gateway never answered the offer - the relay did not round-trip: $(cat "$WORK/offer.json")" else