diff --git a/test/rtmp.go b/test/rtmp.go index b6ef160..7f4dc2f 100644 --- a/test/rtmp.go +++ b/test/rtmp.go @@ -39,13 +39,14 @@ func RunRTMPTest(t *testing.T, conf *TestConfig, bus psrpc.MessageBus, commandPs rtmpsrv := rtmp.NewRTMPServer() relay := service.NewRelay(rtmpsrv, nil) - svc := service.NewService(conf.Config, psrpcClient, bus, rtmpsrv, nil, newCmd) + svc, err := service.NewService(conf.Config, psrpcClient, bus, rtmpsrv, nil, newCmd, "") + require.NoError(t, err) go func() { err := svc.Run() require.NoError(t, err) }() - err := rtmpsrv.Start(conf.Config, svc.HandleRTMPPublishRequest) + err = rtmpsrv.Start(conf.Config, svc.HandleRTMPPublishRequest) require.NoError(t, err) err = relay.Start(conf.Config) require.NoError(t, err) diff --git a/test/url.go b/test/url.go index dbb5bbb..4c3d2f8 100644 --- a/test/url.go +++ b/test/url.go @@ -33,7 +33,8 @@ import ( ) func RunURLTest(t *testing.T, conf *TestConfig, bus psrpc.MessageBus, commandPsrpcClient rpc.IngressHandlerClient, psrpcClient rpc.IOInfoClient, newCmd func(ctx context.Context, p *params.Params) (*exec.Cmd, error)) { - svc := service.NewService(conf.Config, psrpcClient, bus, nil, nil, newCmd) + svc, err := service.NewService(conf.Config, psrpcClient, bus, nil, nil, newCmd, "") + require.NoError(t, err) svc.StartDebugHandlers() go func() { @@ -45,7 +46,7 @@ func RunURLTest(t *testing.T, conf *TestConfig, bus psrpc.MessageBus, commandPsr svc.Stop(true) }) - _, err := rpc.NewIngressInternalServer(svc, bus) + _, err = rpc.NewIngressInternalServer(svc, bus) require.NoError(t, err) internalPsrpcClient, err := rpc.NewIngressInternalClient(bus, psrpc.WithClientTimeout(5*time.Second)) diff --git a/test/whip.go b/test/whip.go index d8330ff..1c39fae 100644 --- a/test/whip.go +++ b/test/whip.go @@ -44,13 +44,14 @@ func RunWHIPTest(t *testing.T, conf *TestConfig, bus psrpc.MessageBus, commandPs whipsrv := whip.NewWHIPServer(commandPsrpcClient) relay := service.NewRelay(nil, whipsrv) - svc := service.NewService(conf.Config, psrpcClient, bus, nil, whipsrv, newCmd) + svc, err := service.NewService(conf.Config, psrpcClient, bus, nil, whipsrv, newCmd, "") + require.NoError(t, err) go func() { err := svc.Run() require.NoError(t, err) }() - err := whipsrv.Start(conf.Config, svc.HandleWHIPPublishRequest, svc.GetHealthHandlers()) + err = whipsrv.Start(conf.Config, svc.HandleWHIPPublishRequest, svc.GetHealthHandlers()) require.NoError(t, err) err = relay.Start(conf.Config) require.NoError(t, err)