Skip to content

Commit

Permalink
fixing panic in TestChunksLength, providing meaningful error info ins…
Browse files Browse the repository at this point in the history
…tead

WARNING: this does not fix the broken test.
The test URL should be changed to URL on a server, supporting content-range header
  • Loading branch information
ink-splatters committed May 25, 2022
1 parent eac659f commit 3360906
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions chunks_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ func TestChunksLength(t *testing.T) {
End: 10485759,
}

if d.info.Rangeable == false {
t.Errorf("Chunk information could not be retrieved for the test file: %s", d.URL)
return
}

if d.chunks[0].Start != 0 {

t.Errorf("First chunk should start from 0, but got %d", d.chunks[0].Start)
Expand Down

0 comments on commit 3360906

Please sign in to comment.