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