aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-05-05 10:29:35 +0200
committerChocobozzz <me@florianbigard.com>2022-05-05 10:29:35 +0200
commitbae616273d455d225d131eb17c56db6c20a0b6b3 (patch)
treeed2174122d092320cea34c4ae522da6f2131f968 /server/tests/api
parentd493e2d4bf0ace177d15e9173d1c02df8c100558 (diff)
downloadPeerTube-bae616273d455d225d131eb17c56db6c20a0b6b3.tar.gz
PeerTube-bae616273d455d225d131eb17c56db6c20a0b6b3.tar.zst
PeerTube-bae616273d455d225d131eb17c56db6c20a0b6b3.zip
Convert followers/following in raw SQL queries
Prevent weird bug in SQL generation
Diffstat (limited to 'server/tests/api')
-rw-r--r--server/tests/api/redundancy/manage-redundancy.ts11
1 files changed, 11 insertions, 0 deletions
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 () {
69 69
70 // Server 1 and server 2 follow each other 70 // Server 1 and server 2 follow each other
71 await doubleFollow(servers[0], servers[1]) 71 await doubleFollow(servers[0], servers[1])
72 await doubleFollow(servers[0], servers[2])
72 await commands[0].updateRedundancy({ host: servers[1].host, redundancyAllowed: true }) 73 await commands[0].updateRedundancy({ host: servers[1].host, redundancyAllowed: true })
73 74
74 await waitJobs(servers) 75 await waitJobs(servers)
@@ -83,6 +84,16 @@ describe('Test manage videos redundancy', function () {
83 } 84 }
84 }) 85 })
85 86
87 it('Should correctly list followings by redundancy', async function () {
88 const body = await servers[0].follows.getFollowings({ sort: '-redundancyAllowed' })
89
90 expect(body.total).to.equal(2)
91 expect(body.data).to.have.lengthOf(2)
92
93 expect(body.data[0].following.host).to.equal(servers[1].host)
94 expect(body.data[1].following.host).to.equal(servers[2].host)
95 })
96
86 it('Should not have "remote-videos" redundancies on server 2', async function () { 97 it('Should not have "remote-videos" redundancies on server 2', async function () {
87 this.timeout(120000) 98 this.timeout(120000)
88 99