Skip to content

Commit

Permalink
transcode: fix transcode test
Browse files Browse the repository at this point in the history
  • Loading branch information
emranemran committed Nov 8, 2022
1 parent e72e27d commit 0e7b9f1
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions transcode/transcode_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"net/http/httptest"
"os"
"path/filepath"
"strconv"
"testing"

"github.com/livepeer/catalyst-api/clients"
Expand Down Expand Up @@ -80,6 +81,10 @@ func TestItCanTranscode(t *testing.T) {
}))
defer callbackServer.Close()

sourceVideoTrack := clients.VideoTrack{
Width: 2020,
Height: 2020,
}
// Set up a fake Broadcaster that returns the rendition segments we'd expect based on the
// transcode request we send in the next step
localBroadcasterClient = StubBroadcasterClient{
Expand All @@ -90,7 +95,7 @@ func TestItCanTranscode(t *testing.T) {
MediaData: []byte("pretend media data"),
},
{
Name: "source",
Name: strconv.FormatInt(int64(sourceVideoTrack.Height), 10) + "p0",
MediaData: []byte("pretend high-def media data"),
},
},
Expand All @@ -110,11 +115,8 @@ func TestItCanTranscode(t *testing.T) {
SizeBytes: 123,
Tracks: []clients.InputTrack{
{
Type: "video",
VideoTrack: clients.VideoTrack{
Width: 2020,
Height: 2020,
},
Type: "video",
VideoTrack: sourceVideoTrack,
},
},
},
Expand Down

0 comments on commit 0e7b9f1

Please sign in to comment.