X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fapi%2Fredundancy%2Fmanage-redundancy.ts;h=d415ac3bfab55407024913e24508678ab00f10e0;hb=0582b4f972a72c2297676faf1e574f817a5712f9;hp=cbf3106bd433f1b31f89eefee7a353fe7f557358;hpb=3318147300b4f998adf728eb0a5a14a4c1829c51;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/api/redundancy/manage-redundancy.ts b/server/tests/api/redundancy/manage-redundancy.ts index cbf3106bd..d415ac3bf 100644 --- a/server/tests/api/redundancy/manage-redundancy.ts +++ b/server/tests/api/redundancy/manage-redundancy.ts @@ -69,6 +69,7 @@ describe('Test manage videos redundancy', function () { // Server 1 and server 2 follow each other await doubleFollow(servers[0], servers[1]) + await doubleFollow(servers[0], servers[2]) await commands[0].updateRedundancy({ host: servers[1].host, redundancyAllowed: true }) await waitJobs(servers) @@ -83,6 +84,16 @@ describe('Test manage videos redundancy', function () { } }) + it('Should correctly list followings by redundancy', async function () { + const body = await servers[0].follows.getFollowings({ sort: '-redundancyAllowed' }) + + expect(body.total).to.equal(2) + expect(body.data).to.have.lengthOf(2) + + expect(body.data[0].following.host).to.equal(servers[1].host) + expect(body.data[1].following.host).to.equal(servers[2].host) + }) + it('Should not have "remote-videos" redundancies on server 2', async function () { this.timeout(120000)