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.ts15
1 files changed, 2 insertions, 13 deletions
diff --git a/server/tests/api/redundancy/redundancy.ts b/server/tests/api/redundancy/redundancy.ts
index 5b970473c..e4ea99de6 100644
--- a/server/tests/api/redundancy/redundancy.ts
+++ b/server/tests/api/redundancy/redundancy.ts
@@ -5,7 +5,6 @@ import * as chai from 'chai'
5import { readdir } from 'fs-extra' 5import { readdir } from 'fs-extra'
6import * as magnetUtil from 'magnet-uri' 6import * as magnetUtil from 'magnet-uri'
7import { join } from 'path' 7import { join } from 'path'
8import { removeVideoRedundancy } from '@server/lib/redundancy'
9import { HttpStatusCode } from '@shared/core-utils' 8import { HttpStatusCode } from '@shared/core-utils'
10import { 9import {
11 checkSegmentHash, 10 checkSegmentHash,
@@ -30,15 +29,7 @@ import {
30 waitJobs, 29 waitJobs,
31 waitUntilLog 30 waitUntilLog
32} from '@shared/extra-utils' 31} from '@shared/extra-utils'
33import { getStats } from '@shared/extra-utils/server/stats' 32import { VideoDetails, VideoPrivacy, VideoRedundancyStrategy, VideoRedundancyStrategyWithManual } from '@shared/models'
34import {
35 ServerStats,
36 VideoDetails,
37 VideoPrivacy,
38 VideoRedundancy,
39 VideoRedundancyStrategy,
40 VideoRedundancyStrategyWithManual
41} from '@shared/models'
42 33
43const expect = chai.expect 34const expect = chai.expect
44 35
@@ -241,9 +232,7 @@ async function checkStatsGlobal (strategy: VideoRedundancyStrategyWithManual) {
241 statsLength = 2 232 statsLength = 2
242 } 233 }
243 234
244 const res = await getStats(servers[0].url) 235 const data = await servers[0].statsCommand.get()
245 const data: ServerStats = res.body
246
247 expect(data.videosRedundancy).to.have.lengthOf(statsLength) 236 expect(data.videosRedundancy).to.have.lengthOf(statsLength)
248 237
249 const stat = data.videosRedundancy[0] 238 const stat = data.videosRedundancy[0]