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