aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/server-commands/server/server.ts
diff options
context:
space:
mode:
Diffstat (limited to 'shared/server-commands/server/server.ts')
-rw-r--r--shared/server-commands/server/server.ts33
1 files changed, 20 insertions, 13 deletions
diff --git a/shared/server-commands/server/server.ts b/shared/server-commands/server/server.ts
index 2b4c9c9f8..a8f8c1d84 100644
--- a/shared/server-commands/server/server.ts
+++ b/shared/server-commands/server/server.ts
@@ -182,6 +182,12 @@ export class PeerTubeServer {
182 this.port = parseInt(parsed.port) 182 this.port = parseInt(parsed.port)
183 } 183 }
184 184
185 getDirectoryPath (directoryName: string) {
186 const testDirectory = 'test' + this.internalServerNumber
187
188 return join(root(), testDirectory, directoryName)
189 }
190
185 async flushAndRun (configOverride?: Object, options: RunServerOptions = {}) { 191 async flushAndRun (configOverride?: Object, options: RunServerOptions = {}) {
186 await ServersCommand.flushTests(this.internalServerNumber) 192 await ServersCommand.flushTests(this.internalServerNumber)
187 193
@@ -341,19 +347,20 @@ export class PeerTubeServer {
341 suffix: '_test' + this.internalServerNumber 347 suffix: '_test' + this.internalServerNumber
342 }, 348 },
343 storage: { 349 storage: {
344 tmp: `test${this.internalServerNumber}/tmp/`, 350 tmp: this.getDirectoryPath('tmp') + '/',
345 bin: `test${this.internalServerNumber}/bin/`, 351 bin: this.getDirectoryPath('bin') + '/',
346 avatars: `test${this.internalServerNumber}/avatars/`, 352 avatars: this.getDirectoryPath('avatars') + '/',
347 videos: `test${this.internalServerNumber}/videos/`, 353 videos: this.getDirectoryPath('videos') + '/',
348 streaming_playlists: `test${this.internalServerNumber}/streaming-playlists/`, 354 streaming_playlists: this.getDirectoryPath('streaming-playlists') + '/',
349 redundancy: `test${this.internalServerNumber}/redundancy/`, 355 redundancy: this.getDirectoryPath('redundancy') + '/',
350 logs: `test${this.internalServerNumber}/logs/`, 356 logs: this.getDirectoryPath('logs') + '/',
351 previews: `test${this.internalServerNumber}/previews/`, 357 previews: this.getDirectoryPath('previews') + '/',
352 thumbnails: `test${this.internalServerNumber}/thumbnails/`, 358 thumbnails: this.getDirectoryPath('thumbnails') + '/',
353 torrents: `test${this.internalServerNumber}/torrents/`, 359 torrents: this.getDirectoryPath('torrents') + '/',
354 captions: `test${this.internalServerNumber}/captions/`, 360 captions: this.getDirectoryPath('captions') + '/',
355 cache: `test${this.internalServerNumber}/cache/`, 361 cache: this.getDirectoryPath('cache') + '/',
356 plugins: `test${this.internalServerNumber}/plugins/` 362 plugins: this.getDirectoryPath('plugins') + '/',
363 well_known: this.getDirectoryPath('well-known') + '/'
357 }, 364 },
358 admin: { 365 admin: {
359 email: `admin${this.internalServerNumber}@example.com` 366 email: `admin${this.internalServerNumber}@example.com`