fix: update rtsp url tests

This commit is contained in:
Jake Daynes
2026-03-13 02:19:21 -07:00
parent 5c30baa11e
commit 2bb748e78f
+15
View File
@@ -19,6 +19,7 @@ func TestBuildRTSPURL(t *testing.T) {
route string route string
username string username string
password string password string
secure bool
wantURL string wantURL string
}{ }{
{ {
@@ -74,6 +75,20 @@ func TestBuildRTSPURL(t *testing.T) {
username: "user", username: "user",
wantURL: "rtsp://user:@192.168.0.10:554/stream", wantURL: "rtsp://user:@192.168.0.10:554/stream",
}, },
{
name: "secure rtsps scheme without credentials",
route: "stream",
secure: true,
wantURL: "rtsps://192.168.0.10:554/stream",
},
{
name: "secure rtsps scheme with credentials",
route: "stream",
username: "admin",
password: "password",
secure: true,
wantURL: "rtsps://admin:password@192.168.0.10:554/stream",
},
} }
for _, test := range tests { for _, test := range tests {