diff options
Diffstat (limited to 'server/tests/shared')
-rw-r--r-- | server/tests/shared/live.ts | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/server/tests/shared/live.ts b/server/tests/shared/live.ts index 8f837c97a..9d8c1d941 100644 --- a/server/tests/shared/live.ts +++ b/server/tests/shared/live.ts | |||
@@ -46,7 +46,7 @@ async function testLiveVideoResolutions (options: { | |||
46 | resolutions: number[] | 46 | resolutions: number[] |
47 | transcoded: boolean | 47 | transcoded: boolean |
48 | 48 | ||
49 | objectStorage: boolean | 49 | objectStorage?: ObjectStorageCommand |
50 | objectStorageBaseUrl?: string | 50 | objectStorageBaseUrl?: string |
51 | }) { | 51 | }) { |
52 | const { | 52 | const { |
@@ -57,7 +57,7 @@ async function testLiveVideoResolutions (options: { | |||
57 | resolutions, | 57 | resolutions, |
58 | transcoded, | 58 | transcoded, |
59 | objectStorage, | 59 | objectStorage, |
60 | objectStorageBaseUrl = ObjectStorageCommand.getMockPlaylistBaseUrl() | 60 | objectStorageBaseUrl = objectStorage?.getMockPlaylistBaseUrl() |
61 | } = options | 61 | } = options |
62 | 62 | ||
63 | for (const server of servers) { | 63 | for (const server of servers) { |
@@ -76,7 +76,7 @@ async function testLiveVideoResolutions (options: { | |||
76 | playlistUrl: hlsPlaylist.playlistUrl, | 76 | playlistUrl: hlsPlaylist.playlistUrl, |
77 | resolutions, | 77 | resolutions, |
78 | transcoded, | 78 | transcoded, |
79 | withRetry: objectStorage | 79 | withRetry: !!objectStorage |
80 | }) | 80 | }) |
81 | 81 | ||
82 | if (objectStorage) { | 82 | if (objectStorage) { |
@@ -105,7 +105,7 @@ async function testLiveVideoResolutions (options: { | |||
105 | 105 | ||
106 | const subPlaylist = await originServer.streamingPlaylists.get({ | 106 | const subPlaylist = await originServer.streamingPlaylists.get({ |
107 | url: `${baseUrl}/${video.uuid}/${i}.m3u8`, | 107 | url: `${baseUrl}/${video.uuid}/${i}.m3u8`, |
108 | withRetry: objectStorage // With object storage, the request may fail because of inconsistent data in S3 | 108 | withRetry: !!objectStorage // With object storage, the request may fail because of inconsistent data in S3 |
109 | }) | 109 | }) |
110 | 110 | ||
111 | expect(subPlaylist).to.contain(segmentName) | 111 | expect(subPlaylist).to.contain(segmentName) |
@@ -116,7 +116,7 @@ async function testLiveVideoResolutions (options: { | |||
116 | videoUUID: video.uuid, | 116 | videoUUID: video.uuid, |
117 | segmentName, | 117 | segmentName, |
118 | hlsPlaylist, | 118 | hlsPlaylist, |
119 | withRetry: objectStorage // With object storage, the request may fail because of inconsistent data in S3 | 119 | withRetry: !!objectStorage // With object storage, the request may fail because of inconsistent data in S3 |
120 | }) | 120 | }) |
121 | 121 | ||
122 | if (originServer.internalServerNumber === server.internalServerNumber) { | 122 | if (originServer.internalServerNumber === server.internalServerNumber) { |