X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fapi%2Fcheck-params%2Fupload-quota.ts;h=f64eafc1839bdddb5045e233666969d5d9f6ae04;hb=bbd5aa7ead5f1554a0872963f957effc26d8c630;hp=4ca544790752d761d278b7a958403d83f3388ee2;hpb=89d241a79c262b9775c233b73cff080043ebb5e6;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/api/check-params/upload-quota.ts b/server/tests/api/check-params/upload-quota.ts index 4ca544790..f64eafc18 100644 --- a/server/tests/api/check-params/upload-quota.ts +++ b/server/tests/api/check-params/upload-quota.ts @@ -2,21 +2,21 @@ import 'mocha' import { expect } from 'chai' -import { HttpStatusCode, randomInt } from '@shared/core-utils' +import { FIXTURE_URLS } from '@server/tests/shared' +import { randomInt } from '@shared/core-utils' +import { HttpStatusCode, VideoImportState, VideoPrivacy } from '@shared/models' import { cleanupTests, - flushAndRunServer, - ImportsCommand, - ServerInfo, + createSingleServer, + PeerTubeServer, setAccessTokensToServers, setDefaultVideoChannel, VideosCommand, waitJobs -} from '@shared/extra-utils' -import { VideoImportState, VideoPrivacy } from '@shared/models' +} from '@shared/server-commands' describe('Test upload quota', function () { - let server: ServerInfo + let server: PeerTubeServer let rootId: number let command: VideosCommand @@ -25,7 +25,7 @@ describe('Test upload quota', function () { before(async function () { this.timeout(30000) - server = await flushAndRunServer(1) + server = await createSingleServer(1) await setAccessTokensToServers([ server ]) await setDefaultVideoChannel([ server ]) @@ -70,14 +70,14 @@ describe('Test upload quota', function () { }) it('Should fail to import with HTTP/Torrent/magnet', async function () { - this.timeout(120000) + this.timeout(120_000) const baseAttributes = { channelId: server.store.channel.id, privacy: VideoPrivacy.PUBLIC } - await server.imports.importVideo({ attributes: { ...baseAttributes, targetUrl: ImportsCommand.getGoodVideoUrl() } }) - await server.imports.importVideo({ attributes: { ...baseAttributes, magnetUri: ImportsCommand.getMagnetURI() } }) + await server.imports.importVideo({ attributes: { ...baseAttributes, targetUrl: FIXTURE_URLS.goodVideo } }) + await server.imports.importVideo({ attributes: { ...baseAttributes, magnetUri: FIXTURE_URLS.magnet } }) await server.imports.importVideo({ attributes: { ...baseAttributes, torrentfile: 'video-720p.torrent' as any } }) await waitJobs([ server ])