aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/cli/prune-storage.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/cli/prune-storage.ts')
-rw-r--r--server/tests/cli/prune-storage.ts14
1 files changed, 7 insertions, 7 deletions
diff --git a/server/tests/cli/prune-storage.ts b/server/tests/cli/prune-storage.ts
index 9912a36e0..5bf86462b 100644
--- a/server/tests/cli/prune-storage.ts
+++ b/server/tests/cli/prune-storage.ts
@@ -10,10 +10,10 @@ import {
10 cleanupTests, 10 cleanupTests,
11 CLICommand, 11 CLICommand,
12 doubleFollow, 12 doubleFollow,
13 flushAndRunMultipleServers, 13 createMultipleServers,
14 killallServers, 14 killallServers,
15 makeGetRequest, 15 makeGetRequest,
16 ServerInfo, 16 PeerTubeServer,
17 setAccessTokensToServers, 17 setAccessTokensToServers,
18 setDefaultVideoChannel, 18 setDefaultVideoChannel,
19 wait, 19 wait,
@@ -23,13 +23,13 @@ import { VideoPlaylistPrivacy } from '@shared/models'
23 23
24const expect = chai.expect 24const expect = chai.expect
25 25
26async function countFiles (server: ServerInfo, directory: string) { 26async function countFiles (server: PeerTubeServer, directory: string) {
27 const files = await readdir(server.servers.buildDirectory(directory)) 27 const files = await readdir(server.servers.buildDirectory(directory))
28 28
29 return files.length 29 return files.length
30} 30}
31 31
32async function assertNotExists (server: ServerInfo, directory: string, substring: string) { 32async function assertNotExists (server: PeerTubeServer, directory: string, substring: string) {
33 const files = await readdir(server.servers.buildDirectory(directory)) 33 const files = await readdir(server.servers.buildDirectory(directory))
34 34
35 for (const f of files) { 35 for (const f of files) {
@@ -37,7 +37,7 @@ async function assertNotExists (server: ServerInfo, directory: string, substring
37 } 37 }
38} 38}
39 39
40async function assertCountAreOkay (servers: ServerInfo[]) { 40async function assertCountAreOkay (servers: PeerTubeServer[]) {
41 for (const server of servers) { 41 for (const server of servers) {
42 const videosCount = await countFiles(server, 'videos') 42 const videosCount = await countFiles(server, 'videos')
43 expect(videosCount).to.equal(8) 43 expect(videosCount).to.equal(8)
@@ -57,13 +57,13 @@ async function assertCountAreOkay (servers: ServerInfo[]) {
57} 57}
58 58
59describe('Test prune storage scripts', function () { 59describe('Test prune storage scripts', function () {
60 let servers: ServerInfo[] 60 let servers: PeerTubeServer[]
61 const badNames: { [directory: string]: string[] } = {} 61 const badNames: { [directory: string]: string[] } = {}
62 62
63 before(async function () { 63 before(async function () {
64 this.timeout(120000) 64 this.timeout(120000)
65 65
66 servers = await flushAndRunMultipleServers(2, { transcoding: { enabled: true } }) 66 servers = await createMultipleServers(2, { transcoding: { enabled: true } })
67 await setAccessTokensToServers(servers) 67 await setAccessTokensToServers(servers)
68 await setDefaultVideoChannel(servers) 68 await setDefaultVideoChannel(servers)
69 69