]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/object-storage/videos.ts
Translated using Weblate (Italian)
[github/Chocobozzz/PeerTube.git] / server / tests / api / object-storage / videos.ts
index af3db9334d44da616e558f2ef5e1f4da74f1764e..6862658cc1b41702630817a9f2e9d0953167ca04 100644 (file)
@@ -9,7 +9,7 @@ import {
   expectLogDoesNotContain,
   expectStartWith,
   generateHighBitrateVideo,
-  MockObjectStorage
+  MockObjectStorageProxy
 } from '@server/tests/shared'
 import { areMockObjectStorageTestsDisabled } from '@shared/core-utils'
 import { HttpStatusCode, VideoDetails } from '@shared/models'
@@ -124,7 +124,7 @@ function runTestSuite (options: {
 
   useMockBaseUrl?: boolean
 }) {
-  const mockObjectStorage = new MockObjectStorage()
+  const mockObjectStorageProxy = new MockObjectStorageProxy()
   const { fixture } = options
   let baseMockUrl: string
 
@@ -138,8 +138,10 @@ function runTestSuite (options: {
   before(async function () {
     this.timeout(120000)
 
-    const port = await mockObjectStorage.initialize()
-    baseMockUrl = options.useMockBaseUrl ? `http://localhost:${port}` : undefined
+    const port = await mockObjectStorageProxy.initialize()
+    baseMockUrl = options.useMockBaseUrl
+      ? `http://127.0.0.1:${port}`
+      : undefined
 
     await ObjectStorageCommand.createMockBucket(options.playlistBucket)
     await ObjectStorageCommand.createMockBucket(options.webtorrentBucket)
@@ -254,7 +256,7 @@ function runTestSuite (options: {
   })
 
   after(async function () {
-    await mockObjectStorage.terminate()
+    await mockObjectStorageProxy.terminate()
 
     await cleanupTests(servers)
   })
@@ -323,7 +325,7 @@ describe('Object storage for videos', function () {
 
       const { uuid } = await server.videos.quickUpload({ name: 'video' })
 
-      await waitJobs([ server ], true)
+      await waitJobs([ server ], { skipDelayed: true })
       const video = await server.videos.get({ id: uuid })
 
       expectStartWith(video.files[0].fileUrl, server.url)
@@ -358,7 +360,7 @@ describe('Object storage for videos', function () {
 
       const { uuid } = await server.videos.quickUpload({ name: 'video' })
 
-      await waitJobs([ server ], true)
+      await waitJobs([ server ], { skipDelayed: true })
       const video = await server.videos.get({ id: uuid })
 
       expectStartWith(video.files[0].fileUrl, ObjectStorageCommand.getMockWebTorrentBaseUrl())