aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/users/users-multiple-servers.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api/users/users-multiple-servers.ts')
-rw-r--r--server/tests/api/users/users-multiple-servers.ts27
1 files changed, 23 insertions, 4 deletions
diff --git a/server/tests/api/users/users-multiple-servers.ts b/server/tests/api/users/users-multiple-servers.ts
index 591ce4959..dcd03879b 100644
--- a/server/tests/api/users/users-multiple-servers.ts
+++ b/server/tests/api/users/users-multiple-servers.ts
@@ -34,7 +34,7 @@ describe('Test users with multiple servers', function () {
34 let userAvatarFilename: string 34 let userAvatarFilename: string
35 35
36 before(async function () { 36 before(async function () {
37 this.timeout(120000) 37 this.timeout(120_000)
38 38
39 servers = await flushAndRunMultipleServers(3) 39 servers = await flushAndRunMultipleServers(3)
40 40
@@ -92,7 +92,7 @@ describe('Test users with multiple servers', function () {
92 }) 92 })
93 93
94 it('Should be able to update my description', async function () { 94 it('Should be able to update my description', async function () {
95 this.timeout(10000) 95 this.timeout(10_000)
96 96
97 await updateMyUser({ 97 await updateMyUser({
98 url: servers[0].url, 98 url: servers[0].url,
@@ -109,7 +109,7 @@ describe('Test users with multiple servers', function () {
109 }) 109 })
110 110
111 it('Should be able to update my avatar', async function () { 111 it('Should be able to update my avatar', async function () {
112 this.timeout(10000) 112 this.timeout(10_000)
113 113
114 const fixture = 'avatar2.png' 114 const fixture = 'avatar2.png'
115 115
@@ -164,8 +164,27 @@ describe('Test users with multiple servers', function () {
164 } 164 }
165 }) 165 })
166 166
167 it('Should search through account videos', async function () {
168 this.timeout(10_000)
169
170 const resVideo = await uploadVideo(servers[0].url, userAccessToken, { name: 'Kami no chikara' })
171
172 await waitJobs(servers)
173
174 for (const server of servers) {
175 const res = await getAccountVideos(server.url, server.accessToken, 'user1@localhost:' + servers[0].port, 0, 5, undefined, {
176 search: 'Kami'
177 })
178
179 expect(res.body.total).to.equal(1)
180 expect(res.body.data).to.be.an('array')
181 expect(res.body.data).to.have.lengthOf(1)
182 expect(res.body.data[0].uuid).to.equal(resVideo.body.video.uuid)
183 }
184 })
185
167 it('Should remove the user', async function () { 186 it('Should remove the user', async function () {
168 this.timeout(10000) 187 this.timeout(10_000)
169 188
170 for (const server of servers) { 189 for (const server of servers) {
171 const resAccounts = await getAccountsList(server.url, '-createdAt') 190 const resAccounts = await getAccountsList(server.url, '-createdAt')