From d2cd127695426742a596bd7c98a7829f48eb8122 Mon Sep 17 00:00:00 2001 From: aler9 <46489434+aler9@users.noreply.github.com> Date: Sun, 14 Mar 2021 17:33:28 +0100 Subject: [PATCH] server: add more test cases --- serverconnread_test.go | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/serverconnread_test.go b/serverconnread_test.go index 55b36469..d5a0a824 100644 --- a/serverconnread_test.go +++ b/serverconnread_test.go @@ -22,16 +22,16 @@ func TestServerConnReadSetupPath(t *testing.T) { }{ { "normal", - "rtsp://localhost:8554/teststream/trackID=0", - "teststream", - 0, - }, - { - "unordered id", "rtsp://localhost:8554/teststream/trackID=2", "teststream", 2, }, + { + "with query", + "rtsp://localhost:8554/teststream?testing=123/trackID=4", + "teststream", + 4, + }, { // this is needed to support reading mpegts with ffmpeg "without track id", @@ -51,6 +51,12 @@ func TestServerConnReadSetupPath(t *testing.T) { "test/stream", 0, }, + { + "subpath with query", + "rtsp://localhost:8554/test/stream?testing=123/trackID=4", + "test/stream", + 4, + }, } { t.Run(ca.name, func(t *testing.T) { type pathTrackIDPair struct {