]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/check-params/upload-quota.ts
Merge branch 'release/4.2.0' into develop
[github/Chocobozzz/PeerTube.git] / server / tests / api / check-params / upload-quota.ts
index 4ca544790752d761d278b7a958403d83f3388ee2..deb4a7aa3dae24a59c49289555cdae495dd29a35 100644 (file)
@@ -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 ])