1
0
Fork 0
forked from External/mediamtx

move test utilities into 'test' (#3016)

* move test utilities into 'test'

* rename newEmptyTimer into emptyTimer
This commit is contained in:
Alessandro Ros 2024-02-13 18:49:27 +01:00 committed by GitHub
parent c2883f2ce9
commit b6eaa6bc18
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
19 changed files with 75 additions and 71 deletions

View file

@ -14,7 +14,7 @@ import (
"github.com/bluenviron/mediamtx/internal/conf"
"github.com/bluenviron/mediamtx/internal/defs"
"github.com/bluenviron/mediamtx/internal/protocols/rtmp"
"github.com/bluenviron/mediamtx/internal/staticsources/tester"
"github.com/bluenviron/mediamtx/internal/test"
)
var serverCert = []byte(`-----BEGIN CERTIFICATE-----
@ -150,10 +150,10 @@ func TestSource(t *testing.T) {
require.NoError(t, err)
}()
var te *tester.Tester
var te *test.SourceTester
if ca == "plain" {
te = tester.New(
te = test.NewSourceTester(
func(p defs.StaticSourceParent) defs.StaticSource {
return &Source{
ResolvedSource: "rtmp://localhost/teststream",
@ -165,7 +165,7 @@ func TestSource(t *testing.T) {
&conf.Path{},
)
} else {
te = tester.New(
te = test.NewSourceTester(
func(p defs.StaticSourceParent) defs.StaticSource {
return &Source{
ResolvedSource: "rtmps://localhost/teststream",