Browse Source

fix some test failures

pull/52/head
aler9 5 years ago
parent
commit
933090a074
  1. 22
      main_test.go
  2. 2
      test-images/ffmpeg/start.sh

22
main_test.go

@ -111,8 +111,6 @@ func TestPublish(t *testing.T) { @@ -111,8 +111,6 @@ func TestPublish(t *testing.T) {
switch conf.publishSoft {
case "ffmpeg":
cnt1, err := newContainer("ffmpeg", "publish", []string{
"-hide_banner",
"-loglevel", "panic",
"-re",
"-stream_loop", "-1",
"-i", "/emptyvideo.ts",
@ -127,7 +125,7 @@ func TestPublish(t *testing.T) { @@ -127,7 +125,7 @@ func TestPublish(t *testing.T) {
default:
cnt1, err := newContainer("gstreamer", "source", []string{
"filesrc location=emptyvideo.ts ! tsdemux ! rtspclientsink " +
"location=rtsp://" + ownDockerIp + ":8554/teststream protocols=" + conf.publishProto,
"location=rtsp://" + ownDockerIp + ":8554/teststream protocols=" + conf.publishProto + " latency=0",
})
require.NoError(t, err)
defer cnt1.close()
@ -136,8 +134,6 @@ func TestPublish(t *testing.T) { @@ -136,8 +134,6 @@ func TestPublish(t *testing.T) {
time.Sleep(1 * time.Second)
cnt2, err := newContainer("ffmpeg", "read", []string{
"-hide_banner",
"-loglevel", "panic",
"-rtsp_transport", "udp",
"-i", "rtsp://" + ownDockerIp + ":8554/teststream",
"-vframes", "1",
@ -171,8 +167,6 @@ func TestRead(t *testing.T) { @@ -171,8 +167,6 @@ func TestRead(t *testing.T) {
time.Sleep(1 * time.Second)
cnt1, err := newContainer("ffmpeg", "publish", []string{
"-hide_banner",
"-loglevel", "panic",
"-re",
"-stream_loop", "-1",
"-i", "/emptyvideo.ts",
@ -189,8 +183,6 @@ func TestRead(t *testing.T) { @@ -189,8 +183,6 @@ func TestRead(t *testing.T) {
switch conf.readSoft {
case "ffmpeg":
cnt2, err := newContainer("ffmpeg", "read", []string{
"-hide_banner",
"-loglevel", "panic",
"-rtsp_transport", conf.readProto,
"-i", "rtsp://" + ownDockerIp + ":8554/teststream",
"-vframes", "1",
@ -236,8 +228,6 @@ func TestAuth(t *testing.T) { @@ -236,8 +228,6 @@ func TestAuth(t *testing.T) {
time.Sleep(1 * time.Second)
cnt1, err := newContainer("ffmpeg", "source", []string{
"-hide_banner",
"-loglevel", "panic",
"-re",
"-stream_loop", "-1",
"-i", "/emptyvideo.ts",
@ -252,8 +242,6 @@ func TestAuth(t *testing.T) { @@ -252,8 +242,6 @@ func TestAuth(t *testing.T) {
time.Sleep(1 * time.Second)
cnt2, err := newContainer("ffmpeg", "dest", []string{
"-hide_banner",
"-loglevel", "panic",
"-rtsp_transport", "udp",
"-i", "rtsp://" + ownDockerIp + ":8554/teststream",
"-vframes", "1",
@ -285,8 +273,6 @@ func TestAuth(t *testing.T) { @@ -285,8 +273,6 @@ func TestAuth(t *testing.T) {
time.Sleep(1 * time.Second)
cnt1, err := newContainer("ffmpeg", "source", []string{
"-hide_banner",
"-loglevel", "panic",
"-re",
"-stream_loop", "-1",
"-i", "/emptyvideo.ts",
@ -302,8 +288,6 @@ func TestAuth(t *testing.T) { @@ -302,8 +288,6 @@ func TestAuth(t *testing.T) {
if soft == "ffmpeg" {
cnt2, err := newContainer("ffmpeg", "dest", []string{
"-hide_banner",
"-loglevel", "panic",
"-rtsp_transport", "udp",
"-i", "rtsp://testuser:testpass@" + ownDockerIp + ":8554/teststream",
"-vframes", "1",
@ -347,8 +331,6 @@ func TestProxy(t *testing.T) { @@ -347,8 +331,6 @@ func TestProxy(t *testing.T) {
time.Sleep(1 * time.Second)
cnt1, err := newContainer("ffmpeg", "source", []string{
"-hide_banner",
"-loglevel", "panic",
"-re",
"-stream_loop", "-1",
"-i", "/emptyvideo.ts",
@ -378,8 +360,6 @@ func TestProxy(t *testing.T) { @@ -378,8 +360,6 @@ func TestProxy(t *testing.T) {
time.Sleep(1 * time.Second)
cnt2, err := newContainer("ffmpeg", "dest", []string{
"-hide_banner",
"-loglevel", "panic",
"-rtsp_transport", "udp",
"-i", "rtsp://" + ownDockerIp + ":8555/proxied",
"-vframes", "1",

2
test-images/ffmpeg/start.sh

@ -1,3 +1,3 @@ @@ -1,3 +1,3 @@
#!/bin/sh -e
exec ffmpeg $@
exec ffmpeg -hide_banner -loglevel error $@

Loading…
Cancel
Save