diff options
Diffstat (limited to 'server/tests/cli')
-rw-r--r-- | server/tests/cli/prune-storage.ts | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/server/tests/cli/prune-storage.ts b/server/tests/cli/prune-storage.ts index a723ed8b4..3ca7c19ea 100644 --- a/server/tests/cli/prune-storage.ts +++ b/server/tests/cli/prune-storage.ts | |||
@@ -51,7 +51,7 @@ async function assertCountAreOkay (servers: PeerTubeServer[]) { | |||
51 | expect(thumbnailsCount).to.equal(6) | 51 | expect(thumbnailsCount).to.equal(6) |
52 | 52 | ||
53 | const avatarsCount = await countFiles(server, 'avatars') | 53 | const avatarsCount = await countFiles(server, 'avatars') |
54 | expect(avatarsCount).to.equal(2) | 54 | expect(avatarsCount).to.equal(4) |
55 | 55 | ||
56 | const hlsRootCount = await countFiles(server, 'streaming-playlists/hls') | 56 | const hlsRootCount = await countFiles(server, 'streaming-playlists/hls') |
57 | expect(hlsRootCount).to.equal(2) | 57 | expect(hlsRootCount).to.equal(2) |
@@ -87,23 +87,28 @@ describe('Test prune storage scripts', function () { | |||
87 | 87 | ||
88 | await doubleFollow(servers[0], servers[1]) | 88 | await doubleFollow(servers[0], servers[1]) |
89 | 89 | ||
90 | // Lazy load the remote avatar | 90 | // Lazy load the remote avatars |
91 | { | 91 | { |
92 | const account = await servers[0].accounts.get({ accountName: 'root@localhost:' + servers[1].port }) | 92 | const account = await servers[0].accounts.get({ accountName: 'root@localhost:' + servers[1].port }) |
93 | await makeGetRequest({ | 93 | |
94 | url: servers[0].url, | 94 | for (const avatar of account.avatars) { |
95 | path: account.avatar.path, | 95 | await makeGetRequest({ |
96 | expectedStatus: HttpStatusCode.OK_200 | 96 | url: servers[0].url, |
97 | }) | 97 | path: avatar.path, |
98 | expectedStatus: HttpStatusCode.OK_200 | ||
99 | }) | ||
100 | } | ||
98 | } | 101 | } |
99 | 102 | ||
100 | { | 103 | { |
101 | const account = await servers[1].accounts.get({ accountName: 'root@localhost:' + servers[0].port }) | 104 | const account = await servers[1].accounts.get({ accountName: 'root@localhost:' + servers[0].port }) |
102 | await makeGetRequest({ | 105 | for (const avatar of account.avatars) { |
103 | url: servers[1].url, | 106 | await makeGetRequest({ |
104 | path: account.avatar.path, | 107 | url: servers[1].url, |
105 | expectedStatus: HttpStatusCode.OK_200 | 108 | path: avatar.path, |
106 | }) | 109 | expectedStatus: HttpStatusCode.OK_200 |
110 | }) | ||
111 | } | ||
107 | } | 112 | } |
108 | 113 | ||
109 | await wait(1000) | 114 | await wait(1000) |