From 66fb2aa39b6f8e4677f80128c27fbafd3a8fe2e7 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 21 Nov 2019 12:16:27 +0100 Subject: Don't always replace actor avatar --- server/tests/api/activitypub/refresher.ts | 2 +- server/tests/cli/prune-storage.ts | 16 ++++++++++++---- 2 files changed, 13 insertions(+), 5 deletions(-) (limited to 'server/tests') diff --git a/server/tests/api/activitypub/refresher.ts b/server/tests/api/activitypub/refresher.ts index 921ee874c..2a6be97c6 100644 --- a/server/tests/api/activitypub/refresher.ts +++ b/server/tests/api/activitypub/refresher.ts @@ -106,7 +106,7 @@ describe('Test AP refresher', function () { await reRunServer(servers[ 1 ]) - // Should not refresh the video, even if the last refresh failed (to avoir a loop on dead instances) + // Should not refresh the video, even if the last refresh failed (to avoid a loop on dead instances) await getVideo(servers[ 0 ].url, videoUUID3) await waitJobs(servers) 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 { execCLI, flushAndRunMultipleServers, getAccount, - getEnvCli, + getEnvCli, makeGetRequest, makeRawRequest, ServerInfo, setAccessTokensToServers, setDefaultVideoChannel, updateMyAvatar, @@ -46,7 +46,7 @@ async function assertCountAreOkay (servers: ServerInfo[]) { expect(videosCount).to.equal(8) const torrentsCount = await countFiles(server.internalServerNumber, 'torrents') - expect(torrentsCount).to.equal(8) + expect(torrentsCount).to.equal(16) const previewsCount = await countFiles(server.internalServerNumber, 'previews') expect(previewsCount).to.equal(2) @@ -94,13 +94,21 @@ describe('Test prune storage scripts', function () { { const res = await getAccount(servers[ 0 ].url, 'root@localhost:' + servers[ 1 ].port) const account: Account = res.body - await request('http://localhost:' + servers[ 0 ].port).get(account.avatar.path).expect(200) + await makeGetRequest({ + url: servers[ 0 ].url, + path: account.avatar.path, + statusCodeExpected: 200 + }) } { const res = await getAccount(servers[ 1 ].url, 'root@localhost:' + servers[ 0 ].port) const account: Account = res.body - await request('http://localhost:' + servers[ 1 ].port).get(account.avatar.path).expect(200) + await makeGetRequest({ + url: servers[ 1 ].url, + path: account.avatar.path, + statusCodeExpected: 200 + }) } await wait(1000) -- cgit v1.2.3