From bc8090411ddaa8d742ce4de3c83f9dba7bc18e2a Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 7 Jul 2021 11:07:12 +0200 Subject: Introduce stats command --- server/tests/api/redundancy/redundancy.ts | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'server/tests/api/redundancy/redundancy.ts') 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' import { readdir } from 'fs-extra' import * as magnetUtil from 'magnet-uri' import { join } from 'path' -import { removeVideoRedundancy } from '@server/lib/redundancy' import { HttpStatusCode } from '@shared/core-utils' import { checkSegmentHash, @@ -30,15 +29,7 @@ import { waitJobs, waitUntilLog } from '@shared/extra-utils' -import { getStats } from '@shared/extra-utils/server/stats' -import { - ServerStats, - VideoDetails, - VideoPrivacy, - VideoRedundancy, - VideoRedundancyStrategy, - VideoRedundancyStrategyWithManual -} from '@shared/models' +import { VideoDetails, VideoPrivacy, VideoRedundancyStrategy, VideoRedundancyStrategyWithManual } from '@shared/models' const expect = chai.expect @@ -241,9 +232,7 @@ async function checkStatsGlobal (strategy: VideoRedundancyStrategyWithManual) { statsLength = 2 } - const res = await getStats(servers[0].url) - const data: ServerStats = res.body - + const data = await servers[0].statsCommand.get() expect(data.videosRedundancy).to.have.lengthOf(statsLength) const stat = data.videosRedundancy[0] -- cgit v1.2.3