diff options
author | Chocobozzz <me@florianbigard.com> | 2023-05-10 09:28:42 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2023-05-10 09:30:33 +0200 |
commit | 5170f492b95dc81b75230312411c5fdb0019eed2 (patch) | |
tree | fea18f482e1eb16ac92fd2d08022b33d58ab8747 /server/tests/shared/streaming-playlists.ts | |
parent | 9d1e41e8bbd9afd961f2dd48c791a3be114e878d (diff) | |
download | PeerTube-5170f492b95dc81b75230312411c5fdb0019eed2.tar.gz PeerTube-5170f492b95dc81b75230312411c5fdb0019eed2.tar.zst PeerTube-5170f492b95dc81b75230312411c5fdb0019eed2.zip |
Try to have more robust live tests
Diffstat (limited to 'server/tests/shared/streaming-playlists.ts')
-rw-r--r-- | server/tests/shared/streaming-playlists.ts | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/server/tests/shared/streaming-playlists.ts b/server/tests/shared/streaming-playlists.ts index acfb2b408..e4f88bc25 100644 --- a/server/tests/shared/streaming-playlists.ts +++ b/server/tests/shared/streaming-playlists.ts | |||
@@ -51,12 +51,13 @@ async function checkLiveSegmentHash (options: { | |||
51 | videoUUID: string | 51 | videoUUID: string |
52 | segmentName: string | 52 | segmentName: string |
53 | hlsPlaylist: VideoStreamingPlaylist | 53 | hlsPlaylist: VideoStreamingPlaylist |
54 | withRetry?: boolean | ||
54 | }) { | 55 | }) { |
55 | const { server, baseUrlSegment, videoUUID, segmentName, hlsPlaylist } = options | 56 | const { server, baseUrlSegment, videoUUID, segmentName, hlsPlaylist, withRetry = false } = options |
56 | const command = server.streamingPlaylists | 57 | const command = server.streamingPlaylists |
57 | 58 | ||
58 | const segmentBody = await command.getFragmentedSegment({ url: `${baseUrlSegment}/${videoUUID}/${segmentName}` }) | 59 | const segmentBody = await command.getFragmentedSegment({ url: `${baseUrlSegment}/${videoUUID}/${segmentName}`, withRetry }) |
59 | const shaBody = await command.getSegmentSha256({ url: hlsPlaylist.segmentsSha256Url }) | 60 | const shaBody = await command.getSegmentSha256({ url: hlsPlaylist.segmentsSha256Url, withRetry }) |
60 | 61 | ||
61 | expect(sha256(segmentBody)).to.equal(shaBody[segmentName]) | 62 | expect(sha256(segmentBody)).to.equal(shaBody[segmentName]) |
62 | } | 63 | } |