aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/cli/prune-storage.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-11-21 12:16:27 +0100
committerChocobozzz <me@florianbigard.com>2019-11-25 10:59:44 +0100
commit66fb2aa39b6f8e4677f80128c27fbafd3a8fe2e7 (patch)
tree9d2f21e81cc42d8d51ac7ae35d91c30f143f0be0 /server/tests/cli/prune-storage.ts
parentd7a25329f9e607894d29ab342b9cb66638b56dc0 (diff)
downloadPeerTube-66fb2aa39b6f8e4677f80128c27fbafd3a8fe2e7.tar.gz
PeerTube-66fb2aa39b6f8e4677f80128c27fbafd3a8fe2e7.tar.zst
PeerTube-66fb2aa39b6f8e4677f80128c27fbafd3a8fe2e7.zip
Don't always replace actor avatar
Diffstat (limited to 'server/tests/cli/prune-storage.ts')
-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)