]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/shared/streaming-playlists.ts
Update angular
[github/Chocobozzz/PeerTube.git] / server / tests / shared / streaming-playlists.ts
index acfb2b4085d54a8a2876304bfee8e35a81728cf2..e4f88bc25283b5a3c60e46b47f38c6beb496704c 100644 (file)
@@ -51,12 +51,13 @@ async function checkLiveSegmentHash (options: {
   videoUUID: string
   segmentName: string
   hlsPlaylist: VideoStreamingPlaylist
+  withRetry?: boolean
 }) {
-  const { server, baseUrlSegment, videoUUID, segmentName, hlsPlaylist } = options
+  const { server, baseUrlSegment, videoUUID, segmentName, hlsPlaylist, withRetry = false } = options
   const command = server.streamingPlaylists
 
-  const segmentBody = await command.getFragmentedSegment({ url: `${baseUrlSegment}/${videoUUID}/${segmentName}` })
-  const shaBody = await command.getSegmentSha256({ url: hlsPlaylist.segmentsSha256Url })
+  const segmentBody = await command.getFragmentedSegment({ url: `${baseUrlSegment}/${videoUUID}/${segmentName}`, withRetry })
+  const shaBody = await command.getSegmentSha256({ url: hlsPlaylist.segmentsSha256Url, withRetry })
 
   expect(sha256(segmentBody)).to.equal(shaBody[segmentName])
 }