mirror of
https://github.com/aler9/gortsplib
synced 2025-10-05 07:06:58 +08:00
rename tests
This commit is contained in:
@@ -12,7 +12,7 @@ import (
|
||||
"github.com/aler9/gortsplib/pkg/base"
|
||||
)
|
||||
|
||||
func TestClientConnSession(t *testing.T) {
|
||||
func TestClientSession(t *testing.T) {
|
||||
l, err := net.Listen("tcp", "localhost:8554")
|
||||
require.NoError(t, err)
|
||||
defer l.Close()
|
||||
@@ -77,7 +77,7 @@ func TestClientConnSession(t *testing.T) {
|
||||
require.NoError(t, err)
|
||||
}
|
||||
|
||||
func TestClientConnAuth(t *testing.T) {
|
||||
func TestClientAuth(t *testing.T) {
|
||||
l, err := net.Listen("tcp", "localhost:8554")
|
||||
require.NoError(t, err)
|
||||
defer l.Close()
|
||||
|
@@ -13,7 +13,7 @@ import (
|
||||
"github.com/aler9/gortsplib/pkg/headers"
|
||||
)
|
||||
|
||||
func TestClientConnPublishSerial(t *testing.T) {
|
||||
func TestClientPublishSerial(t *testing.T) {
|
||||
for _, proto := range []string{
|
||||
"udp",
|
||||
"tcp",
|
||||
@@ -144,7 +144,7 @@ func TestClientConnPublishSerial(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestClientConnPublishParallel(t *testing.T) {
|
||||
func TestClientPublishParallel(t *testing.T) {
|
||||
for _, proto := range []string{
|
||||
"udp",
|
||||
"tcp",
|
||||
@@ -286,7 +286,7 @@ func TestClientConnPublishParallel(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestClientConnPublishPauseSerial(t *testing.T) {
|
||||
func TestClientPublishPauseSerial(t *testing.T) {
|
||||
for _, proto := range []string{
|
||||
"udp",
|
||||
"tcp",
|
||||
@@ -446,7 +446,7 @@ func TestClientConnPublishPauseSerial(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestClientConnPublishPauseParallel(t *testing.T) {
|
||||
func TestClientPublishPauseParallel(t *testing.T) {
|
||||
for _, proto := range []string{
|
||||
"udp",
|
||||
"tcp",
|
||||
|
@@ -15,7 +15,7 @@ import (
|
||||
"github.com/aler9/gortsplib/pkg/headers"
|
||||
)
|
||||
|
||||
func TestClientConnRead(t *testing.T) {
|
||||
func TestClientRead(t *testing.T) {
|
||||
for _, ca := range []struct {
|
||||
encrypted bool
|
||||
proto string
|
||||
@@ -203,7 +203,7 @@ func TestClientConnRead(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestClientConnReadNoServerPorts(t *testing.T) {
|
||||
func TestClientReadAnyPort(t *testing.T) {
|
||||
for _, ca := range []string{
|
||||
"zero",
|
||||
"no",
|
||||
@@ -325,7 +325,7 @@ func TestClientConnReadNoServerPorts(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestClientConnReadAutomaticProtocol(t *testing.T) {
|
||||
func TestClientReadAutomaticProtocol(t *testing.T) {
|
||||
l, err := net.Listen("tcp", "localhost:8554")
|
||||
require.NoError(t, err)
|
||||
defer l.Close()
|
||||
@@ -433,7 +433,7 @@ func TestClientConnReadAutomaticProtocol(t *testing.T) {
|
||||
<-done
|
||||
}
|
||||
|
||||
func TestClientConnReadRedirect(t *testing.T) {
|
||||
func TestClientReadRedirect(t *testing.T) {
|
||||
l, err := net.Listen("tcp", "localhost:8554")
|
||||
require.NoError(t, err)
|
||||
defer l.Close()
|
||||
@@ -573,7 +573,7 @@ func TestClientConnReadRedirect(t *testing.T) {
|
||||
<-done
|
||||
}
|
||||
|
||||
func TestClientConnReadPause(t *testing.T) {
|
||||
func TestClientReadPause(t *testing.T) {
|
||||
writeFrames := func(inTH *headers.Transport, bconn *bufio.ReadWriter) (chan struct{}, chan struct{}) {
|
||||
writerTerminate := make(chan struct{})
|
||||
writerDone := make(chan struct{})
|
||||
|
@@ -272,7 +272,7 @@ y++U32uuSFiXDcSLarfIsE992MEJLSAynbF1Rsgsr3gXbGiuToJRyxbIeVy7gwzD
|
||||
-----END RSA PRIVATE KEY-----
|
||||
`)
|
||||
|
||||
func TestServerConnPublishReadHighLevel(t *testing.T) {
|
||||
func TestServerPublishReadHighLevel(t *testing.T) {
|
||||
for _, ca := range []struct {
|
||||
encrypted bool
|
||||
publisherSoft string
|
||||
@@ -377,7 +377,7 @@ func TestServerConnPublishReadHighLevel(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestServerConnCSeq(t *testing.T) {
|
||||
func TestServerCSeq(t *testing.T) {
|
||||
s, err := Serve("127.0.0.1:8554")
|
||||
require.NoError(t, err)
|
||||
defer s.Close()
|
||||
@@ -416,7 +416,7 @@ func TestServerConnCSeq(t *testing.T) {
|
||||
require.Equal(t, base.HeaderValue{"5"}, res.Header["CSeq"])
|
||||
}
|
||||
|
||||
func TestServerConnCSeqNo(t *testing.T) {
|
||||
func TestServerCSeqNo(t *testing.T) {
|
||||
s, err := Serve("127.0.0.1:8554")
|
||||
require.NoError(t, err)
|
||||
defer s.Close()
|
||||
@@ -452,7 +452,7 @@ func TestServerConnCSeqNo(t *testing.T) {
|
||||
require.Equal(t, base.StatusBadRequest, res.StatusCode)
|
||||
}
|
||||
|
||||
func TestServerConnTeardownResponse(t *testing.T) {
|
||||
func TestServerTeardownResponse(t *testing.T) {
|
||||
s, err := Serve("127.0.0.1:8554")
|
||||
require.NoError(t, err)
|
||||
defer s.Close()
|
||||
|
@@ -15,7 +15,7 @@ import (
|
||||
"github.com/aler9/gortsplib/pkg/headers"
|
||||
)
|
||||
|
||||
func TestServerConnPublishSetupPath(t *testing.T) {
|
||||
func TestServerPublishSetupPath(t *testing.T) {
|
||||
for _, ca := range []struct {
|
||||
name string
|
||||
control string
|
||||
@@ -185,7 +185,7 @@ func TestServerConnPublishSetupPath(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestServerConnPublishSetupDifferentPaths(t *testing.T) {
|
||||
func TestServerPublishSetupDifferentPaths(t *testing.T) {
|
||||
serverErr := make(chan error)
|
||||
|
||||
s, err := Serve("127.0.0.1:8554")
|
||||
@@ -283,7 +283,7 @@ func TestServerConnPublishSetupDifferentPaths(t *testing.T) {
|
||||
require.Equal(t, "invalid track path (test2stream/trackID=0)", err.Error())
|
||||
}
|
||||
|
||||
func TestServerConnPublishSetupDouble(t *testing.T) {
|
||||
func TestServerPublishSetupDouble(t *testing.T) {
|
||||
serverErr := make(chan error)
|
||||
|
||||
s, err := Serve("127.0.0.1:8554")
|
||||
@@ -395,7 +395,7 @@ func TestServerConnPublishSetupDouble(t *testing.T) {
|
||||
require.Equal(t, "track 0 has already been setup", err.Error())
|
||||
}
|
||||
|
||||
func TestServerConnPublishRecordPartialTracks(t *testing.T) {
|
||||
func TestServerPublishRecordPartialTracks(t *testing.T) {
|
||||
serverErr := make(chan error)
|
||||
|
||||
s, err := Serve("127.0.0.1:8554")
|
||||
@@ -516,7 +516,7 @@ func TestServerConnPublishRecordPartialTracks(t *testing.T) {
|
||||
require.Equal(t, "not all announced tracks have been setup", err.Error())
|
||||
}
|
||||
|
||||
func TestServerConnPublishReceivePackets(t *testing.T) {
|
||||
func TestServerPublishReceivePackets(t *testing.T) {
|
||||
for _, proto := range []string{
|
||||
"udp",
|
||||
"tcp",
|
||||
|
@@ -12,7 +12,7 @@ import (
|
||||
"github.com/aler9/gortsplib/pkg/headers"
|
||||
)
|
||||
|
||||
func TestServerConnReadSetupPath(t *testing.T) {
|
||||
func TestServerReadSetupPath(t *testing.T) {
|
||||
for _, ca := range []struct {
|
||||
name string
|
||||
url string
|
||||
@@ -129,7 +129,7 @@ func TestServerConnReadSetupPath(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestServerConnReadSetupDifferentPaths(t *testing.T) {
|
||||
func TestServerReadSetupDifferentPaths(t *testing.T) {
|
||||
serverErr := make(chan error)
|
||||
|
||||
s, err := Serve("127.0.0.1:8554")
|
||||
@@ -210,7 +210,7 @@ func TestServerConnReadSetupDifferentPaths(t *testing.T) {
|
||||
require.Equal(t, "can't setup tracks with different paths", err.Error())
|
||||
}
|
||||
|
||||
func TestServerConnReadSetupDouble(t *testing.T) {
|
||||
func TestServerReadSetupDouble(t *testing.T) {
|
||||
serverErr := make(chan error)
|
||||
|
||||
s, err := Serve("127.0.0.1:8554")
|
||||
@@ -291,7 +291,7 @@ func TestServerConnReadSetupDouble(t *testing.T) {
|
||||
require.Equal(t, "track 0 has already been setup", err.Error())
|
||||
}
|
||||
|
||||
func TestServerConnReadReceivePackets(t *testing.T) {
|
||||
func TestServerReadReceivePackets(t *testing.T) {
|
||||
for _, proto := range []string{
|
||||
"udp",
|
||||
"tcp",
|
||||
@@ -424,7 +424,7 @@ func TestServerConnReadReceivePackets(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestServerConnReadTCPResponseBeforeFrames(t *testing.T) {
|
||||
func TestServerReadTCPResponseBeforeFrames(t *testing.T) {
|
||||
s, err := Serve("127.0.0.1:8554")
|
||||
require.NoError(t, err)
|
||||
defer s.Close()
|
||||
@@ -531,7 +531,7 @@ func TestServerConnReadTCPResponseBeforeFrames(t *testing.T) {
|
||||
require.NoError(t, err)
|
||||
}
|
||||
|
||||
func TestServerConnReadPlayMultiple(t *testing.T) {
|
||||
func TestServerReadPlayMultiple(t *testing.T) {
|
||||
s, err := Serve("127.0.0.1:8554")
|
||||
require.NoError(t, err)
|
||||
defer s.Close()
|
||||
@@ -645,7 +645,7 @@ func TestServerConnReadPlayMultiple(t *testing.T) {
|
||||
require.Equal(t, base.StatusOK, res.StatusCode)
|
||||
}
|
||||
|
||||
func TestServerConnReadPauseMultiple(t *testing.T) {
|
||||
func TestServerReadPauseMultiple(t *testing.T) {
|
||||
s, err := Serve("127.0.0.1:8554")
|
||||
require.NoError(t, err)
|
||||
defer s.Close()
|
||||
|
Reference in New Issue
Block a user