1
0
mirror of https://gitlab.crans.org/nounous/ghostream.git synced 2025-06-27 22:42:15 +02:00

If ffmpeg returns an error, then test failed

This commit is contained in:
Alexandre Iooss
2020-10-04 21:05:42 +02:00
parent 708501c5c8
commit 4e066d6c33
2 changed files with 3 additions and 13 deletions

View File

@ -2,7 +2,6 @@ package srt
import (
"bufio"
"log"
"os/exec"
"testing"
"time"
@ -54,12 +53,11 @@ func TestServeSRT(t *testing.T) {
go func() {
scanner := bufio.NewScanner(errOutput)
for scanner.Scan() {
log.Printf("[FFMPEG TEST] %s", scanner.Text())
t.Fatalf("ffmpeg virtual source returned %s", scanner.Text())
}
}()
time.Sleep(5 * time.Second) // Delay is in nanoseconds, here 5s
// TODO Check that the stream ran
// TODO Kill SRT server
}