mirror of
https://github.com/aler9/gortsplib
synced 2025-10-04 23:02:45 +08:00
server: use localhost instead of 127.0.0.1 in tests
This commit is contained in:
@@ -225,7 +225,7 @@ func TestServerPublishErrorAnnounce(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
err := s.Start("127.0.0.1:8554")
|
||||
err := s.Start("localhost:8554")
|
||||
require.NoError(t, err)
|
||||
defer s.Close()
|
||||
|
||||
@@ -311,7 +311,7 @@ func TestServerPublishSetupPath(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
err := s.Start("127.0.0.1:8554")
|
||||
err := s.Start("localhost:8554")
|
||||
require.NoError(t, err)
|
||||
defer s.Close()
|
||||
|
||||
@@ -406,7 +406,7 @@ func TestServerPublishErrorSetupDifferentPaths(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
err := s.Start("127.0.0.1:8554")
|
||||
err := s.Start("localhost:8554")
|
||||
require.NoError(t, err)
|
||||
defer s.Close()
|
||||
|
||||
@@ -488,7 +488,7 @@ func TestServerPublishErrorSetupTrackTwice(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
err := s.Start("127.0.0.1:8554")
|
||||
err := s.Start("localhost:8554")
|
||||
require.NoError(t, err)
|
||||
defer s.Close()
|
||||
|
||||
@@ -587,7 +587,7 @@ func TestServerPublishErrorRecordPartialTracks(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
err := s.Start("127.0.0.1:8554")
|
||||
err := s.Start("localhost:8554")
|
||||
require.NoError(t, err)
|
||||
defer s.Close()
|
||||
|
||||
@@ -731,7 +731,7 @@ func TestServerPublish(t *testing.T) {
|
||||
s.TLSConfig = &tls.Config{Certificates: []tls.Certificate{cert}}
|
||||
}
|
||||
|
||||
err := s.Start("127.0.0.1:8554")
|
||||
err := s.Start("localhost:8554")
|
||||
require.NoError(t, err)
|
||||
defer s.Close()
|
||||
|
||||
@@ -930,7 +930,7 @@ func TestServerPublishErrorWrongProtocol(t *testing.T) {
|
||||
UDPRTCPAddress: "127.0.0.1:8001",
|
||||
}
|
||||
|
||||
err := s.Start("127.0.0.1:8554")
|
||||
err := s.Start("localhost:8554")
|
||||
require.NoError(t, err)
|
||||
defer s.Close()
|
||||
|
||||
@@ -1032,7 +1032,7 @@ func TestServerPublishRTCPReport(t *testing.T) {
|
||||
receiverReportPeriod: 1 * time.Second,
|
||||
}
|
||||
|
||||
err := s.Start("127.0.0.1:8554")
|
||||
err := s.Start("localhost:8554")
|
||||
require.NoError(t, err)
|
||||
defer s.Close()
|
||||
|
||||
@@ -1193,7 +1193,7 @@ func TestServerPublishTimeout(t *testing.T) {
|
||||
s.UDPRTCPAddress = "127.0.0.1:8001"
|
||||
}
|
||||
|
||||
err := s.Start("127.0.0.1:8554")
|
||||
err := s.Start("localhost:8554")
|
||||
require.NoError(t, err)
|
||||
defer s.Close()
|
||||
|
||||
@@ -1321,7 +1321,7 @@ func TestServerPublishWithoutTeardown(t *testing.T) {
|
||||
s.UDPRTCPAddress = "127.0.0.1:8001"
|
||||
}
|
||||
|
||||
err := s.Start("127.0.0.1:8554")
|
||||
err := s.Start("localhost:8554")
|
||||
require.NoError(t, err)
|
||||
defer s.Close()
|
||||
|
||||
@@ -1436,7 +1436,7 @@ func TestServerPublishUDPChangeConn(t *testing.T) {
|
||||
UDPRTCPAddress: "127.0.0.1:8001",
|
||||
}
|
||||
|
||||
err := s.Start("127.0.0.1:8554")
|
||||
err := s.Start("localhost:8554")
|
||||
require.NoError(t, err)
|
||||
defer s.Close()
|
||||
|
||||
|
@@ -71,7 +71,7 @@ func TestServerReadSetupPath(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
err := s.Start("127.0.0.1:8554")
|
||||
err := s.Start("localhost:8554")
|
||||
require.NoError(t, err)
|
||||
defer s.Close()
|
||||
|
||||
@@ -124,7 +124,7 @@ func TestServerReadErrorSetupDifferentPaths(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
err := s.Start("127.0.0.1:8554")
|
||||
err := s.Start("localhost:8554")
|
||||
require.NoError(t, err)
|
||||
defer s.Close()
|
||||
|
||||
@@ -191,7 +191,7 @@ func TestServerReadErrorSetupTrackTwice(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
err := s.Start("127.0.0.1:8554")
|
||||
err := s.Start("localhost:8554")
|
||||
require.NoError(t, err)
|
||||
defer s.Close()
|
||||
|
||||
@@ -307,7 +307,7 @@ func TestServerRead(t *testing.T) {
|
||||
s.TLSConfig = &tls.Config{Certificates: []tls.Certificate{cert}}
|
||||
}
|
||||
|
||||
err := s.Start("127.0.0.1:8554")
|
||||
err := s.Start("localhost:8554")
|
||||
require.NoError(t, err)
|
||||
defer s.Close()
|
||||
|
||||
@@ -518,7 +518,7 @@ func TestServerReadTCPResponseBeforeFrames(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
err := s.Start("127.0.0.1:8554")
|
||||
err := s.Start("localhost:8554")
|
||||
require.NoError(t, err)
|
||||
defer s.Close()
|
||||
|
||||
@@ -584,7 +584,7 @@ func TestServerReadPlayPlay(t *testing.T) {
|
||||
UDPRTCPAddress: "127.0.0.1:8001",
|
||||
}
|
||||
|
||||
err := s.Start("127.0.0.1:8554")
|
||||
err := s.Start("localhost:8554")
|
||||
require.NoError(t, err)
|
||||
defer s.Close()
|
||||
|
||||
@@ -686,7 +686,7 @@ func TestServerReadPlayPausePlay(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
err := s.Start("127.0.0.1:8554")
|
||||
err := s.Start("localhost:8554")
|
||||
require.NoError(t, err)
|
||||
defer s.Close()
|
||||
|
||||
@@ -795,7 +795,7 @@ func TestServerReadPlayPausePause(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
err := s.Start("127.0.0.1:8554")
|
||||
err := s.Start("localhost:8554")
|
||||
require.NoError(t, err)
|
||||
defer s.Close()
|
||||
|
||||
@@ -902,7 +902,7 @@ func TestServerReadTimeout(t *testing.T) {
|
||||
s.UDPRTPAddress = "127.0.0.1:8000"
|
||||
s.UDPRTCPAddress = "127.0.0.1:8001"
|
||||
|
||||
err := s.Start("127.0.0.1:8554")
|
||||
err := s.Start("localhost:8554")
|
||||
require.NoError(t, err)
|
||||
defer s.Close()
|
||||
|
||||
@@ -994,7 +994,7 @@ func TestServerReadWithoutTeardown(t *testing.T) {
|
||||
s.UDPRTCPAddress = "127.0.0.1:8001"
|
||||
}
|
||||
|
||||
err := s.Start("127.0.0.1:8554")
|
||||
err := s.Start("localhost:8554")
|
||||
require.NoError(t, err)
|
||||
defer s.Close()
|
||||
|
||||
@@ -1077,7 +1077,7 @@ func TestServerReadUDPChangeConn(t *testing.T) {
|
||||
UDPRTCPAddress: "127.0.0.1:8001",
|
||||
}
|
||||
|
||||
err := s.Start("127.0.0.1:8554")
|
||||
err := s.Start("localhost:8554")
|
||||
require.NoError(t, err)
|
||||
defer s.Close()
|
||||
|
||||
|
@@ -417,7 +417,7 @@ func TestServerHighLevelPublishRead(t *testing.T) {
|
||||
s.UDPRTCPAddress = "127.0.0.1:8001"
|
||||
}
|
||||
|
||||
err := s.Start("127.0.0.1:8554")
|
||||
err := s.Start("localhost:8554")
|
||||
require.NoError(t, err)
|
||||
defer s.Close()
|
||||
|
||||
@@ -479,7 +479,7 @@ func TestServerClose(t *testing.T) {
|
||||
Handler: &testServerHandler{},
|
||||
}
|
||||
|
||||
err := s.Start("127.0.0.1:8554")
|
||||
err := s.Start("localhost:8554")
|
||||
require.NoError(t, err)
|
||||
s.Close()
|
||||
s.Close()
|
||||
@@ -491,7 +491,7 @@ func TestServerErrorWrongUDPPorts(t *testing.T) {
|
||||
UDPRTPAddress: "127.0.0.1:8006",
|
||||
UDPRTCPAddress: "127.0.0.1:8009",
|
||||
}
|
||||
err := s.Start("127.0.0.1:8554")
|
||||
err := s.Start("localhost:8554")
|
||||
require.Error(t, err)
|
||||
})
|
||||
|
||||
@@ -500,7 +500,7 @@ func TestServerErrorWrongUDPPorts(t *testing.T) {
|
||||
UDPRTPAddress: "127.0.0.1:8003",
|
||||
UDPRTCPAddress: "127.0.0.1:8004",
|
||||
}
|
||||
err := s.Start("127.0.0.1:8554")
|
||||
err := s.Start("localhost:8554")
|
||||
require.Error(t, err)
|
||||
})
|
||||
}
|
||||
@@ -520,7 +520,7 @@ func TestServerConnClose(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
err := s.Start("127.0.0.1:8554")
|
||||
err := s.Start("localhost:8554")
|
||||
require.NoError(t, err)
|
||||
defer s.Close()
|
||||
|
||||
@@ -533,7 +533,7 @@ func TestServerConnClose(t *testing.T) {
|
||||
|
||||
func TestServerCSeq(t *testing.T) {
|
||||
s := &Server{}
|
||||
err := s.Start("127.0.0.1:8554")
|
||||
err := s.Start("localhost:8554")
|
||||
require.NoError(t, err)
|
||||
defer s.Close()
|
||||
|
||||
@@ -566,7 +566,7 @@ func TestServerErrorCSeqMissing(t *testing.T) {
|
||||
}
|
||||
|
||||
s := &Server{Handler: h}
|
||||
err := s.Start("127.0.0.1:8554")
|
||||
err := s.Start("localhost:8554")
|
||||
require.NoError(t, err)
|
||||
defer s.Close()
|
||||
|
||||
@@ -597,7 +597,7 @@ func TestServerErrorInvalidMethod(t *testing.T) {
|
||||
}
|
||||
|
||||
s := &Server{Handler: h}
|
||||
err := s.Start("127.0.0.1:8554")
|
||||
err := s.Start("localhost:8554")
|
||||
require.NoError(t, err)
|
||||
defer s.Close()
|
||||
|
||||
@@ -640,7 +640,7 @@ func TestServerErrorTCPTwoConnOneSession(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
err := s.Start("127.0.0.1:8554")
|
||||
err := s.Start("localhost:8554")
|
||||
require.NoError(t, err)
|
||||
defer s.Close()
|
||||
|
||||
@@ -732,7 +732,7 @@ func TestServerErrorTCPOneConnTwoSessions(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
err := s.Start("127.0.0.1:8554")
|
||||
err := s.Start("localhost:8554")
|
||||
require.NoError(t, err)
|
||||
defer s.Close()
|
||||
|
||||
@@ -817,7 +817,7 @@ func TestServerGetSetParameter(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
err := s.Start("127.0.0.1:8554")
|
||||
err := s.Start("localhost:8554")
|
||||
require.NoError(t, err)
|
||||
defer s.Close()
|
||||
|
||||
@@ -888,7 +888,7 @@ func TestServerErrorInvalidSession(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
err := s.Start("127.0.0.1:8554")
|
||||
err := s.Start("localhost:8554")
|
||||
require.NoError(t, err)
|
||||
defer s.Close()
|
||||
|
||||
@@ -930,7 +930,7 @@ func TestServerSessionClose(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
err := s.Start("127.0.0.1:8554")
|
||||
err := s.Start("localhost:8554")
|
||||
require.NoError(t, err)
|
||||
defer s.Close()
|
||||
|
||||
@@ -979,7 +979,7 @@ func TestServerSessionAutoClose(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
err := s.Start("127.0.0.1:8554")
|
||||
err := s.Start("localhost:8554")
|
||||
require.NoError(t, err)
|
||||
defer s.Close()
|
||||
|
||||
@@ -1051,7 +1051,7 @@ func TestServerErrorInvalidPath(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
err := s.Start("127.0.0.1:8554")
|
||||
err := s.Start("localhost:8554")
|
||||
require.NoError(t, err)
|
||||
defer s.Close()
|
||||
|
||||
|
Reference in New Issue
Block a user