diff options
author | Chocobozzz <me@florianbigard.com> | 2021-07-07 11:07:12 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-07-20 15:27:17 +0200 |
commit | bc8090411ddaa8d742ce4de3c83f9dba7bc18e2a (patch) | |
tree | 5020b384b6bc4870b06c53a0483abf551b33604e /server/tests/api/redundancy | |
parent | dab047092b51b453f175069573d8865fb17acdfc (diff) | |
download | PeerTube-bc8090411ddaa8d742ce4de3c83f9dba7bc18e2a.tar.gz PeerTube-bc8090411ddaa8d742ce4de3c83f9dba7bc18e2a.tar.zst PeerTube-bc8090411ddaa8d742ce4de3c83f9dba7bc18e2a.zip |
Introduce stats command
Diffstat (limited to 'server/tests/api/redundancy')
-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] |