diff options
author | Chocobozzz <me@florianbigard.com> | 2018-09-26 10:16:12 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-09-26 10:16:12 +0200 |
commit | d82d8ad60c467958412dd6bfb3e8119a3f533a37 (patch) | |
tree | 394e7b09243745eb535d77af4cdeefd5c07e4c4d /server/tests/api | |
parent | 4a534352ad046ca804f1f58ef5afb6e366e202b8 (diff) | |
download | PeerTube-d82d8ad60c467958412dd6bfb3e8119a3f533a37.tar.gz PeerTube-d82d8ad60c467958412dd6bfb3e8119a3f533a37.tar.zst PeerTube-d82d8ad60c467958412dd6bfb3e8119a3f533a37.zip |
Fix redundancy tests
Diffstat (limited to 'server/tests/api')
-rw-r--r-- | server/tests/api/server/redundancy.ts | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/server/tests/api/server/redundancy.ts b/server/tests/api/server/redundancy.ts index f4ae4c065..9b3b1b4ad 100644 --- a/server/tests/api/server/redundancy.ts +++ b/server/tests/api/server/redundancy.ts | |||
@@ -143,19 +143,20 @@ async function check2Webseeds (strategy: VideoRedundancyStrategy, videoUUID?: st | |||
143 | 143 | ||
144 | for (const file of video.files) { | 144 | for (const file of video.files) { |
145 | checkMagnetWebseeds(file, webseeds, server) | 145 | checkMagnetWebseeds(file, webseeds, server) |
146 | |||
147 | // Only servers 1 and 2 have the video | ||
148 | if (server.serverNumber !== 3) { | ||
149 | await makeGetRequest({ | ||
150 | url: server.url, | ||
151 | statusCodeExpected: 200, | ||
152 | path: '/static/webseed/' + `${videoUUID}-${file.resolution.id}.mp4`, | ||
153 | contentType: null | ||
154 | }) | ||
155 | } | ||
146 | } | 156 | } |
147 | } | 157 | } |
148 | } | 158 | } |
149 | 159 | ||
150 | for (const url of [ 'http://localhost:9001', 'http://localhost:9002' ]) { | ||
151 | await makeGetRequest({ | ||
152 | url, | ||
153 | statusCodeExpected: 200, | ||
154 | path: '/static/webseed/' + videoUUID, | ||
155 | contentType: null | ||
156 | }) | ||
157 | } | ||
158 | |||
159 | for (const directory of [ 'test1', 'test2' ]) { | 160 | for (const directory of [ 'test1', 'test2' ]) { |
160 | const files = await readdir(join(root(), directory, 'videos')) | 161 | const files = await readdir(join(root(), directory, 'videos')) |
161 | expect(files).to.have.length.at.least(4) | 162 | expect(files).to.have.length.at.least(4) |