]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - shared/extra-utils/server/servers.ts
Introduce feed command
[github/Chocobozzz/PeerTube.git] / shared / extra-utils / server / servers.ts
index 08d05ef36ed630a6a558c314935463f64b1013e1..b64c9eec66f9c43457845004dfa2c310ca3be7fe 100644 (file)
@@ -6,6 +6,10 @@ import { copy, ensureDir, pathExists, readdir, readFile, remove } from 'fs-extra
 import { join } from 'path'
 import { randomInt } from '../../core-utils/miscs/miscs'
 import { VideoChannel } from '../../models/videos'
+import { BulkCommand } from '../bulk'
+import { CLICommand } from '../cli'
+import { CustomPagesCommand } from '../custom-pages'
+import { FeedCommand } from '../feeds'
 import { buildServerDirectory, getFileSize, isGithubCI, root, wait } from '../miscs/miscs'
 import { makeGetRequest } from '../requests/requests'
 
@@ -37,16 +41,21 @@ interface ServerInfo {
   customConfigFile?: string
 
   accessToken?: string
+  refreshToken?: string
   videoChannel?: VideoChannel
 
   video?: {
     id: number
     uuid: string
+    shortUUID: string
     name?: string
     url?: string
+
     account?: {
       name: string
     }
+
+    embedPath?: string
   }
 
   remoteVideo?: {
@@ -55,6 +64,11 @@ interface ServerInfo {
   }
 
   videos?: { id: number, uuid: string }[]
+
+  bulkCommand?: BulkCommand
+  cliCommand?: CLICommand
+  customPageCommand?: CustomPagesCommand
+  feedCommand?: FeedCommand
 }
 
 function parallelTests () {
@@ -260,6 +274,11 @@ async function runServer (server: ServerInfo, configOverrideArg?: any, args = []
         } catch { /* empty */ }
       })
 
+      server.bulkCommand = new BulkCommand(server)
+      server.cliCommand = new CLICommand(server)
+      server.customPageCommand = new CustomPagesCommand(server)
+      server.feedCommand = new FeedCommand(server)
+
       res(server)
     })
   })
@@ -273,7 +292,7 @@ async function reRunServer (server: ServerInfo, configOverride?: any) {
 }
 
 async function checkTmpIsEmpty (server: ServerInfo) {
-  await checkDirectoryIsEmpty(server, 'tmp', [ 'plugins-global.css', 'hls' ])
+  await checkDirectoryIsEmpty(server, 'tmp', [ 'plugins-global.css', 'hls', 'resumable-uploads' ])
 
   if (await pathExists(join('test' + server.internalServerNumber, 'tmp', 'hls'))) {
     await checkDirectoryIsEmpty(server, 'tmp/hls')