X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fapi%2Fredundancy%2Fredundancy.ts;h=e4ea99de6c2223973218a09f66593446a6613f5e;hb=a2470c9f4bfc7f49f4b94de935bacdd53fd54f29;hp=5b970473c054ea1c7b6ed4e195586df67dd405c4;hpb=dab047092b51b453f175069573d8865fb17acdfc;p=github%2FChocobozzz%2FPeerTube.git 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]