aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/redundancy/redundancy.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api/redundancy/redundancy.ts')
-rw-r--r--server/tests/api/redundancy/redundancy.ts27
1 files changed, 15 insertions, 12 deletions
diff --git a/server/tests/api/redundancy/redundancy.ts b/server/tests/api/redundancy/redundancy.ts
index 2bc1b60ce..9d3ce8153 100644
--- a/server/tests/api/redundancy/redundancy.ts
+++ b/server/tests/api/redundancy/redundancy.ts
@@ -137,7 +137,7 @@ async function check2Webseeds (strategy: VideoRedundancyStrategy, videoUUID?: st
137 if (!videoUUID) videoUUID = video1Server2UUID 137 if (!videoUUID) videoUUID = video1Server2UUID
138 138
139 const webseeds = [ 139 const webseeds = [
140 'http://localhost:9001/static/webseed/' + videoUUID, 140 'http://localhost:9001/static/redundancy/' + videoUUID,
141 'http://localhost:9002/static/webseed/' + videoUUID 141 'http://localhost:9002/static/webseed/' + videoUUID
142 ] 142 ]
143 143
@@ -149,20 +149,23 @@ async function check2Webseeds (strategy: VideoRedundancyStrategy, videoUUID?: st
149 for (const file of video.files) { 149 for (const file of video.files) {
150 checkMagnetWebseeds(file, webseeds, server) 150 checkMagnetWebseeds(file, webseeds, server)
151 151
152 // Only servers 1 and 2 have the video 152 await makeGetRequest({
153 if (server.serverNumber !== 3) { 153 url: servers[0].url,
154 await makeGetRequest({ 154 statusCodeExpected: 200,
155 url: server.url, 155 path: '/static/redundancy/' + `${videoUUID}-${file.resolution.id}.mp4`,
156 statusCodeExpected: 200, 156 contentType: null
157 path: '/static/webseed/' + `${videoUUID}-${file.resolution.id}.mp4`, 157 })
158 contentType: null 158 await makeGetRequest({
159 }) 159 url: servers[1].url,
160 } 160 statusCodeExpected: 200,
161 path: '/static/webseed/' + `${videoUUID}-${file.resolution.id}.mp4`,
162 contentType: null
163 })
161 } 164 }
162 } 165 }
163 166
164 for (const directory of [ 'test1', 'test2' ]) { 167 for (const directory of [ 'test1/redundancy', 'test2/videos' ]) {
165 const files = await readdir(join(root(), directory, 'videos')) 168 const files = await readdir(join(root(), directory))
166 expect(files).to.have.length.at.least(4) 169 expect(files).to.have.length.at.least(4)
167 170
168 for (const resolution of [ 240, 360, 480, 720 ]) { 171 for (const resolution of [ 240, 360, 480, 720 ]) {