diff options
author | kontrollanten <6680299+kontrollanten@users.noreply.github.com> | 2022-10-04 10:53:00 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-04 10:53:00 +0200 |
commit | 6c5f0d3aebbd9debcd33a9aab306b130547852a5 (patch) | |
tree | bb5da168dc1d60f13c3fd6247fa9082928529a8a /server/tests/shared/playlists.ts | |
parent | cfd57d2ca0bb058087f7dc90fcc3e8442b0288e1 (diff) | |
download | PeerTube-6c5f0d3aebbd9debcd33a9aab306b130547852a5.tar.gz PeerTube-6c5f0d3aebbd9debcd33a9aab306b130547852a5.tar.zst PeerTube-6c5f0d3aebbd9debcd33a9aab306b130547852a5.zip |
server: serve files from storage/well-known (#5214)
* server: serve files from storage/well-known
closes #5206
* well-known: add tests
* test: try to skip new tests
* test: another try
* fix(config/prod): well_known path
* test: fix broken tests
* Update misc-endpoints.ts
* Use getDirectoryPath for tests
* Fix tests
Co-authored-by: Chocobozzz <me@florianbigard.com>
Diffstat (limited to 'server/tests/shared/playlists.ts')
-rw-r--r-- | server/tests/shared/playlists.ts | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/server/tests/shared/playlists.ts b/server/tests/shared/playlists.ts index fdd541d20..8db303fd8 100644 --- a/server/tests/shared/playlists.ts +++ b/server/tests/shared/playlists.ts | |||
@@ -1,17 +1,14 @@ | |||
1 | import { expect } from 'chai' | 1 | import { expect } from 'chai' |
2 | import { readdir } from 'fs-extra' | 2 | import { readdir } from 'fs-extra' |
3 | import { join } from 'path' | 3 | import { PeerTubeServer } from '@shared/server-commands' |
4 | import { root } from '@shared/core-utils' | ||
5 | 4 | ||
6 | async function checkPlaylistFilesWereRemoved ( | 5 | async function checkPlaylistFilesWereRemoved ( |
7 | playlistUUID: string, | 6 | playlistUUID: string, |
8 | internalServerNumber: number, | 7 | server: PeerTubeServer, |
9 | directories = [ 'thumbnails' ] | 8 | directories = [ 'thumbnails' ] |
10 | ) { | 9 | ) { |
11 | const testDirectory = 'test' + internalServerNumber | ||
12 | |||
13 | for (const directory of directories) { | 10 | for (const directory of directories) { |
14 | const directoryPath = join(root(), testDirectory, directory) | 11 | const directoryPath = server.getDirectoryPath(directory) |
15 | 12 | ||
16 | const files = await readdir(directoryPath) | 13 | const files = await readdir(directoryPath) |
17 | for (const file of files) { | 14 | for (const file of files) { |