From 83002a823465fe03a8d82833cb2e073a383405a8 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 22 May 2023 17:04:39 +0200 Subject: Update server dependencies --- server/tests/api/check-params/upload-quota.ts | 2 +- server/tests/api/redundancy/redundancy.ts | 4 ++-- server/tests/api/server/tracker.ts | 6 +++--- server/tests/peertube-runner/vod-transcoding.ts | 2 +- server/tests/shared/mock-servers/mock-proxy.ts | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) (limited to 'server/tests') diff --git a/server/tests/api/check-params/upload-quota.ts b/server/tests/api/check-params/upload-quota.ts index 008537524..06698c056 100644 --- a/server/tests/api/check-params/upload-quota.ts +++ b/server/tests/api/check-params/upload-quota.ts @@ -54,7 +54,7 @@ describe('Test upload quota', function () { }) it('Should fail with a registered user having too many videos with resumable upload', async function () { - this.timeout(30000) + this.timeout(120000) const user = { username: 'registered' + randomInt(1, 1500), password: 'password' } await server.registrations.register(user) diff --git a/server/tests/api/redundancy/redundancy.ts b/server/tests/api/redundancy/redundancy.ts index 57939775e..5262c503f 100644 --- a/server/tests/api/redundancy/redundancy.ts +++ b/server/tests/api/redundancy/redundancy.ts @@ -2,7 +2,7 @@ import { expect } from 'chai' import { readdir } from 'fs-extra' -import magnetUtil from 'magnet-uri' +import { decode as magnetUriDecode } from 'magnet-uri' import { basename, join } from 'path' import { checkSegmentHash, checkVideoFilesWereRemoved, saveVideoInServers } from '@server/tests/shared' import { wait } from '@shared/core-utils' @@ -29,7 +29,7 @@ let servers: PeerTubeServer[] = [] let video1Server2: VideoDetails async function checkMagnetWebseeds (file: VideoFile, baseWebseeds: string[], server: PeerTubeServer) { - const parsed = magnetUtil.decode(file.magnetUri) + const parsed = magnetUriDecode(file.magnetUri) for (const ws of baseWebseeds) { const found = parsed.urlList.find(url => url === `${ws}${basename(file.fileUrl)}`) diff --git a/server/tests/api/server/tracker.ts b/server/tests/api/server/tracker.ts index 34d450998..a0ce2ca35 100644 --- a/server/tests/api/server/tracker.ts +++ b/server/tests/api/server/tracker.ts @@ -1,6 +1,6 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await,@typescript-eslint/no-floating-promises */ -import magnetUtil from 'magnet-uri' +import { decode as magnetUriDecode, encode as magnetUriEncode } from 'magnet-uri' import WebTorrent from 'webtorrent' import { cleanupTests, createSingleServer, killallServers, PeerTubeServer, setAccessTokensToServers } from '@shared/server-commands' @@ -19,10 +19,10 @@ describe('Test tracker', function () { const video = await server.videos.get({ id: uuid }) goodMagnet = video.files[0].magnetUri - const parsed = magnetUtil.decode(goodMagnet) + const parsed = magnetUriDecode(goodMagnet) parsed.infoHash = '010597bb88b1968a5693a4fa8267c592ca65f2e9' - badMagnet = magnetUtil.encode(parsed) + badMagnet = magnetUriEncode(parsed) } }) diff --git a/server/tests/peertube-runner/vod-transcoding.ts b/server/tests/peertube-runner/vod-transcoding.ts index f1670c1fb..dc505baab 100644 --- a/server/tests/peertube-runner/vod-transcoding.ts +++ b/server/tests/peertube-runner/vod-transcoding.ts @@ -189,7 +189,7 @@ describe('Test VOD transcoding in peertube-runner program', function () { }) it('Should transcode videos on manual run', async function () { - this.timeout(360000) + this.timeout(120000) await servers[0].config.disableTranscoding() diff --git a/server/tests/shared/mock-servers/mock-proxy.ts b/server/tests/shared/mock-servers/mock-proxy.ts index cbc7c4466..e741d6735 100644 --- a/server/tests/shared/mock-servers/mock-proxy.ts +++ b/server/tests/shared/mock-servers/mock-proxy.ts @@ -1,5 +1,5 @@ import { createServer, Server } from 'http' -import proxy from 'proxy' +import { createProxy } from 'proxy' import { getPort, terminateServer } from './shared' class MockProxy { @@ -7,7 +7,7 @@ class MockProxy { initialize () { return new Promise(res => { - this.server = proxy(createServer()) + this.server = createProxy(createServer()) this.server.listen(0, () => res(getPort(this.server))) }) } -- cgit v1.2.3