Skip to content

Commit

Permalink
test: add test that too early media segment response is 425
Browse files Browse the repository at this point in the history
  • Loading branch information
tobbee committed Jan 26, 2024
1 parent 70f43ef commit d1ece90
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions cmd/livesim2/app/handler_livesim_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,20 @@ func TestFetches(t *testing.T) {
wantedStatusCode: http.StatusOK,
wantedContentType: `video/mp4`,
},
{
desc: "thumbnail image too early",
url: "testpic_2s_thumbs/thumbs/300.jpg?nowMS=510000",
params: "",
wantedStatusCode: 425,
wantedContentType: `image/jpeg`,
},
{
desc: "media segment too early",
url: "testpic_2s/V300/300.m4s?nowMS=510000",
params: "",
wantedStatusCode: 425,
wantedContentType: `video/mp4`,
},
}

for _, tc := range testCases {
Expand Down

0 comments on commit d1ece90

Please sign in to comment.