aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-09-25 16:22:48 +0200
committerChocobozzz <me@florianbigard.com>2018-09-25 17:49:48 +0200
commitebdb612458877465717bc669b40612fa833ff0c9 (patch)
tree4049731ee3185d2277c51916c16b36874598f161 /server/tests/api
parent660d11e91e1643927028d2d6870a911f569b34d8 (diff)
downloadPeerTube-ebdb612458877465717bc669b40612fa833ff0c9.tar.gz
PeerTube-ebdb612458877465717bc669b40612fa833ff0c9.tar.zst
PeerTube-ebdb612458877465717bc669b40612fa833ff0c9.zip
Fix redundancy totalVideos stats
Diffstat (limited to 'server/tests/api')
-rw-r--r--server/tests/api/server/redundancy.ts21
1 files changed, 16 insertions, 5 deletions
diff --git a/server/tests/api/server/redundancy.ts b/server/tests/api/server/redundancy.ts
index a773e3de4..f4ae4c065 100644
--- a/server/tests/api/server/redundancy.ts
+++ b/server/tests/api/server/redundancy.ts
@@ -9,7 +9,7 @@ import {
9 getFollowingListPaginationAndSort, 9 getFollowingListPaginationAndSort,
10 getVideo, 10 getVideo,
11 immutableAssign, 11 immutableAssign,
12 killallServers, 12 killallServers, makeGetRequest,
13 root, 13 root,
14 ServerInfo, 14 ServerInfo,
15 setAccessTokensToServers, 15 setAccessTokensToServers,
@@ -147,11 +147,22 @@ async function check2Webseeds (strategy: VideoRedundancyStrategy, videoUUID?: st
147 } 147 }
148 } 148 }
149 149
150 const files = await readdir(join(root(), 'test1', 'videos')) 150 for (const url of [ 'http://localhost:9001', 'http://localhost:9002' ]) {
151 expect(files).to.have.lengthOf(4) 151 await makeGetRequest({
152 url,
153 statusCodeExpected: 200,
154 path: '/static/webseed/' + videoUUID,
155 contentType: null
156 })
157 }
152 158
153 for (const resolution of [ 240, 360, 480, 720 ]) { 159 for (const directory of [ 'test1', 'test2' ]) {
154 expect(files.find(f => f === `${videoUUID}-${resolution}.mp4`)).to.not.be.undefined 160 const files = await readdir(join(root(), directory, 'videos'))
161 expect(files).to.have.length.at.least(4)
162
163 for (const resolution of [ 240, 360, 480, 720 ]) {
164 expect(files.find(f => f === `${videoUUID}-${resolution}.mp4`)).to.not.be.undefined
165 }
155 } 166 }
156} 167}
157 168