diff options
Diffstat (limited to 'server/tests/api/redundancy/redundancy.ts')
-rw-r--r-- | server/tests/api/redundancy/redundancy.ts | 15 |
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' | |||
5 | import { readdir } from 'fs-extra' | 5 | import { readdir } from 'fs-extra' |
6 | import * as magnetUtil from 'magnet-uri' | 6 | import * as magnetUtil from 'magnet-uri' |
7 | import { join } from 'path' | 7 | import { join } from 'path' |
8 | import { removeVideoRedundancy } from '@server/lib/redundancy' | ||
9 | import { HttpStatusCode } from '@shared/core-utils' | 8 | import { HttpStatusCode } from '@shared/core-utils' |
10 | import { | 9 | import { |
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' |
33 | import { getStats } from '@shared/extra-utils/server/stats' | 32 | import { VideoDetails, VideoPrivacy, VideoRedundancyStrategy, VideoRedundancyStrategyWithManual } from '@shared/models' |
34 | import { | ||
35 | ServerStats, | ||
36 | VideoDetails, | ||
37 | VideoPrivacy, | ||
38 | VideoRedundancy, | ||
39 | VideoRedundancyStrategy, | ||
40 | VideoRedundancyStrategyWithManual | ||
41 | } from '@shared/models' | ||
42 | 33 | ||
43 | const expect = chai.expect | 34 | const 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] |