X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fapi%2Fcheck-params%2Fupload-quota.ts;h=deb4a7aa3dae24a59c49289555cdae495dd29a35;hb=4ec52d04dcc5d664612331f8e08d7d90da990415;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..deb4a7aa3 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 ]) @@ -76,8 +76,8 @@ describe('Test upload quota', function () { 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 ])