server: add more test cases

This commit is contained in:
aler9
2021-03-14 17:33:28 +01:00
parent d902b7da93
commit d2cd127695

View File

@@ -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 {