mirror of
https://github.com/aler9/gortsplib
synced 2025-10-06 15:46:51 +08:00
server: add more test cases
This commit is contained in:
@@ -22,16 +22,16 @@ func TestServerConnReadSetupPath(t *testing.T) {
|
|||||||
}{
|
}{
|
||||||
{
|
{
|
||||||
"normal",
|
"normal",
|
||||||
"rtsp://localhost:8554/teststream/trackID=0",
|
|
||||||
"teststream",
|
|
||||||
0,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"unordered id",
|
|
||||||
"rtsp://localhost:8554/teststream/trackID=2",
|
"rtsp://localhost:8554/teststream/trackID=2",
|
||||||
"teststream",
|
"teststream",
|
||||||
2,
|
2,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"with query",
|
||||||
|
"rtsp://localhost:8554/teststream?testing=123/trackID=4",
|
||||||
|
"teststream",
|
||||||
|
4,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
// this is needed to support reading mpegts with ffmpeg
|
// this is needed to support reading mpegts with ffmpeg
|
||||||
"without track id",
|
"without track id",
|
||||||
@@ -51,6 +51,12 @@ func TestServerConnReadSetupPath(t *testing.T) {
|
|||||||
"test/stream",
|
"test/stream",
|
||||||
0,
|
0,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"subpath with query",
|
||||||
|
"rtsp://localhost:8554/test/stream?testing=123/trackID=4",
|
||||||
|
"test/stream",
|
||||||
|
4,
|
||||||
|
},
|
||||||
} {
|
} {
|
||||||
t.Run(ca.name, func(t *testing.T) {
|
t.Run(ca.name, func(t *testing.T) {
|
||||||
type pathTrackIDPair struct {
|
type pathTrackIDPair struct {
|
||||||
|
Reference in New Issue
Block a user