]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Fix test cleanup
authorChocobozzz <me@florianbigard.com>
Wed, 10 May 2023 11:57:06 +0000 (13:57 +0200)
committerChocobozzz <me@florianbigard.com>
Wed, 10 May 2023 11:57:06 +0000 (13:57 +0200)
server/tests/api/check-params/videos.ts
server/tests/api/object-storage/live.ts
server/tests/api/object-storage/video-imports.ts
server/tests/api/object-storage/videos.ts
server/tests/api/videos/video-channel-syncs.ts
shared/server-commands/server/servers-command.ts
shared/server-commands/videos/streaming-playlists-command.ts

index 572ca8997507791bdfd6dfb60dd3b9f8b942c41f..094ab6891a6f7d129fd69ea42a482da883fa95ef 100644 (file)
@@ -437,7 +437,7 @@ describe('Test videos API validator', function () {
       })
 
       it('Should succeed with the correct parameters', async function () {
-        this.timeout(10000)
+        this.timeout(30000)
 
         const fields = baseCorrectParams
 
index c430cd0a066a6d70a516ebe0cbfad2b436a74daf..7f8db40e5e65fdf25801bb09ce3ac6e84b0280a7 100644 (file)
@@ -5,10 +5,10 @@ import { expectStartWith, MockObjectStorageProxy, SQLCommand, testLiveVideoResol
 import { areMockObjectStorageTestsDisabled } from '@shared/core-utils'
 import { HttpStatusCode, LiveVideoCreate, VideoPrivacy } from '@shared/models'
 import {
+  cleanupTests,
   createMultipleServers,
   doubleFollow,
   findExternalSavedVideo,
-  killallServers,
   makeRawRequest,
   ObjectStorageCommand,
   PeerTubeServer,
@@ -290,6 +290,6 @@ describe('Object storage for lives', function () {
   after(async function () {
     await sqlCommandServer1.cleanup()
 
-    await killallServers(servers)
+    await cleanupTests(servers)
   })
 })
index 11c86641105b8cc7ee3c719f20ade28a46034e3d..d5fd91b6ad137f381c16e3d50fab10d2151c820b 100644 (file)
@@ -5,8 +5,8 @@ import { expectStartWith, FIXTURE_URLS } from '@server/tests/shared'
 import { areMockObjectStorageTestsDisabled } from '@shared/core-utils'
 import { HttpStatusCode, VideoPrivacy } from '@shared/models'
 import {
+  cleanupTests,
   createSingleServer,
-  killallServers,
   makeRawRequest,
   ObjectStorageCommand,
   PeerTubeServer,
@@ -103,6 +103,6 @@ describe('Object storage for video import', function () {
   })
 
   after(async function () {
-    await killallServers([ server ])
+    await cleanupTests([ server ])
   })
 })
index e90753d09860f02cefcaaae05f17638f599e8e02..fe07202947cbc133d69ad93416236c54be5703f0 100644 (file)
@@ -389,7 +389,7 @@ describe('Object storage for videos', function () {
     })
 
     after(async function () {
-      await killallServers([ server ])
+      await cleanupTests([ server ])
     })
   })
 
index a31e48d1d2524e2f93e1a643dd6a69bac1ae2a72..12c2c158edbf6edbaf4394680f4aa0ecc4f7062b 100644 (file)
@@ -5,9 +5,9 @@ import { FIXTURE_URLS, SQLCommand } from '@server/tests/shared'
 import { areHttpImportTestsDisabled } from '@shared/core-utils'
 import { VideoChannelSyncState, VideoInclude, VideoPrivacy } from '@shared/models'
 import {
+  cleanupTests,
   createMultipleServers,
   getServerImportConfig,
-  killallServers,
   PeerTubeServer,
   setAccessTokensToServers,
   setDefaultAccountAvatar,
@@ -309,7 +309,7 @@ describe('Test channel synchronizations', function () {
           await sqlCommand.cleanup()
         }
 
-        await killallServers(servers)
+        await cleanupTests(servers)
       })
     })
   }
index 19645cb93a1eae15e82389a9ff4a014d4b351024..f174a2aa02c30146d00e5eee98a4f21968c52371 100644 (file)
@@ -44,6 +44,7 @@ export class ServersCommand extends AbstractCommand {
 
       await copy(origin, join('artifacts', destname))
     }
+    console.log(this.server.parallel)
 
     if (this.server.parallel) {
       const promise = saveGithubLogsIfNeeded()
index 950808b6009912b6e0516ef07c9abe493b174105..e7448aa69a071ce7ba24bad096f55a6dbd71a085 100644 (file)
@@ -14,7 +14,7 @@ export class StreamingPlaylistsCommand extends AbstractCommand {
     withRetry?: boolean // default false
     currentRetry?: number
   }): Promise<string> {
-    const { videoFileToken, reinjectVideoFileToken, withRetry, currentRetry = 1 } = options
+    const { videoFileToken, reinjectVideoFileToken, withRetry = false, currentRetry = 1 } = options
 
     try {
       const result = await unwrapTextOrDecode(this.getRawRequest({
@@ -51,7 +51,7 @@ export class StreamingPlaylistsCommand extends AbstractCommand {
     withRetry?: boolean // default false
     currentRetry?: number
   }) {
-    const { withRetry, currentRetry = 1 } = options
+    const { withRetry = false, currentRetry = 1 } = options
 
     try {
       const result = await unwrapBody<Buffer>(this.getRawRequest({
@@ -85,7 +85,7 @@ export class StreamingPlaylistsCommand extends AbstractCommand {
     withRetry?: boolean // default false
     currentRetry?: number
   }) {
-    const { withRetry, currentRetry = 1 } = options
+    const { withRetry = false, currentRetry = 1 } = options
 
     try {
       const result = await unwrapBodyOrDecodeToJSON<{ [ id: string ]: string }>(this.getRawRequest({