add client TLS publish tests

This commit is contained in:
aler9
2021-12-08 17:23:03 +01:00
parent 5f3f7ec93a
commit a1de5ffdf9
7 changed files with 221 additions and 68 deletions

View File

@@ -117,7 +117,9 @@ func TestClientSession(t *testing.T) {
require.Equal(t, base.HeaderValue{"123456"}, req.Header["Session"])
track, err := NewTrackH264(96, &TrackConfigH264{[]byte{0x01, 0x02, 0x03, 0x04}, []byte{0x01, 0x02, 0x03, 0x04}})
track, err := NewTrackH264(96, &TrackConfigH264{
[]byte{0x01, 0x02, 0x03, 0x04}, []byte{0x01, 0x02, 0x03, 0x04},
})
require.NoError(t, err)
tracks := cloneAndClearTracks(Tracks{track})
@@ -199,7 +201,9 @@ func TestClientAuth(t *testing.T) {
err = v.ValidateRequest(req)
require.NoError(t, err)
track, err := NewTrackH264(96, &TrackConfigH264{[]byte{0x01, 0x02, 0x03, 0x04}, []byte{0x01, 0x02, 0x03, 0x04}})
track, err := NewTrackH264(96, &TrackConfigH264{
[]byte{0x01, 0x02, 0x03, 0x04}, []byte{0x01, 0x02, 0x03, 0x04},
})
require.NoError(t, err)
tracks := cloneAndClearTracks(Tracks{track})
@@ -264,7 +268,9 @@ func TestClientDescribeCharset(t *testing.T) {
require.Equal(t, base.Describe, req.Method)
require.Equal(t, mustParseURL("rtsp://localhost:8554/teststream"), req.URL)
track1, err := NewTrackH264(96, &TrackConfigH264{[]byte{0x01, 0x02, 0x03, 0x04}, []byte{0x01, 0x02, 0x03, 0x04}})
track1, err := NewTrackH264(96, &TrackConfigH264{
[]byte{0x01, 0x02, 0x03, 0x04}, []byte{0x01, 0x02, 0x03, 0x04},
})
require.NoError(t, err)
err = base.Response{