aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/cli
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/cli')
-rw-r--r--server/tests/cli/prune-storage.ts16
1 files changed, 12 insertions, 4 deletions
diff --git a/server/tests/cli/prune-storage.ts b/server/tests/cli/prune-storage.ts
index 67a5c564e..144e67c44 100644
--- a/server/tests/cli/prune-storage.ts
+++ b/server/tests/cli/prune-storage.ts
@@ -11,7 +11,7 @@ import {
11 execCLI, 11 execCLI,
12 flushAndRunMultipleServers, 12 flushAndRunMultipleServers,
13 getAccount, 13 getAccount,
14 getEnvCli, 14 getEnvCli, makeGetRequest, makeRawRequest,
15 ServerInfo, 15 ServerInfo,
16 setAccessTokensToServers, setDefaultVideoChannel, 16 setAccessTokensToServers, setDefaultVideoChannel,
17 updateMyAvatar, 17 updateMyAvatar,
@@ -46,7 +46,7 @@ async function assertCountAreOkay (servers: ServerInfo[]) {
46 expect(videosCount).to.equal(8) 46 expect(videosCount).to.equal(8)
47 47
48 const torrentsCount = await countFiles(server.internalServerNumber, 'torrents') 48 const torrentsCount = await countFiles(server.internalServerNumber, 'torrents')
49 expect(torrentsCount).to.equal(8) 49 expect(torrentsCount).to.equal(16)
50 50
51 const previewsCount = await countFiles(server.internalServerNumber, 'previews') 51 const previewsCount = await countFiles(server.internalServerNumber, 'previews')
52 expect(previewsCount).to.equal(2) 52 expect(previewsCount).to.equal(2)
@@ -94,13 +94,21 @@ describe('Test prune storage scripts', function () {
94 { 94 {
95 const res = await getAccount(servers[ 0 ].url, 'root@localhost:' + servers[ 1 ].port) 95 const res = await getAccount(servers[ 0 ].url, 'root@localhost:' + servers[ 1 ].port)
96 const account: Account = res.body 96 const account: Account = res.body
97 await request('http://localhost:' + servers[ 0 ].port).get(account.avatar.path).expect(200) 97 await makeGetRequest({
98 url: servers[ 0 ].url,
99 path: account.avatar.path,
100 statusCodeExpected: 200
101 })
98 } 102 }
99 103
100 { 104 {
101 const res = await getAccount(servers[ 1 ].url, 'root@localhost:' + servers[ 0 ].port) 105 const res = await getAccount(servers[ 1 ].url, 'root@localhost:' + servers[ 0 ].port)
102 const account: Account = res.body 106 const account: Account = res.body
103 await request('http://localhost:' + servers[ 1 ].port).get(account.avatar.path).expect(200) 107 await makeGetRequest({
108 url: servers[ 1 ].url,
109 path: account.avatar.path,
110 statusCodeExpected: 200
111 })
104 } 112 }
105 113
106 await wait(1000) 114 await wait(1000)