aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/users/users-multiple-servers.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-07-09 11:21:30 +0200
committerChocobozzz <me@florianbigard.com>2021-07-20 15:27:18 +0200
commita54618880c394ad7571f3f3222dc96ec2dd10d9a (patch)
treec9f7b05e578abc2383bccd707c11438c61857c72 /server/tests/api/users/users-multiple-servers.ts
parent57f879a540551c3b958b0991c8e1e3657a4481d8 (diff)
downloadPeerTube-a54618880c394ad7571f3f3222dc96ec2dd10d9a.tar.gz
PeerTube-a54618880c394ad7571f3f3222dc96ec2dd10d9a.tar.zst
PeerTube-a54618880c394ad7571f3f3222dc96ec2dd10d9a.zip
Introduce channels command
Diffstat (limited to 'server/tests/api/users/users-multiple-servers.ts')
-rw-r--r--server/tests/api/users/users-multiple-servers.ts15
1 files changed, 5 insertions, 10 deletions
diff --git a/server/tests/api/users/users-multiple-servers.ts b/server/tests/api/users/users-multiple-servers.ts
index 03fbfabeb..47056be78 100644
--- a/server/tests/api/users/users-multiple-servers.ts
+++ b/server/tests/api/users/users-multiple-servers.ts
@@ -12,7 +12,6 @@ import {
12 flushAndRunMultipleServers, 12 flushAndRunMultipleServers,
13 getAccountVideos, 13 getAccountVideos,
14 getMyUserInformation, 14 getMyUserInformation,
15 getVideoChannelsList,
16 removeUser, 15 removeUser,
17 ServerInfo, 16 ServerInfo,
18 setAccessTokensToServers, 17 setAccessTokensToServers,
@@ -23,7 +22,7 @@ import {
23 userLogin, 22 userLogin,
24 waitJobs 23 waitJobs
25} from '@shared/extra-utils' 24} from '@shared/extra-utils'
26import { User, VideoChannel } from '@shared/models' 25import { User } from '@shared/models'
27 26
28const expect = chai.expect 27const expect = chai.expect
29 28
@@ -199,10 +198,8 @@ describe('Test users with multiple servers', function () {
199 const accountDeleted = body.data.find(a => a.name === 'user1' && a.host === 'localhost:' + servers[0].port) 198 const accountDeleted = body.data.find(a => a.name === 'user1' && a.host === 'localhost:' + servers[0].port)
200 expect(accountDeleted).not.to.be.undefined 199 expect(accountDeleted).not.to.be.undefined
201 200
202 const resVideoChannels = await getVideoChannelsList(server.url, 0, 10) 201 const { data } = await server.channelsCommand.list()
203 const videoChannelDeleted = resVideoChannels.body.data.find(a => { 202 const videoChannelDeleted = data.find(a => a.displayName === 'Main user1 channel' && a.host === 'localhost:' + servers[0].port)
204 return a.displayName === 'Main user1 channel' && a.host === 'localhost:' + servers[0].port
205 }) as VideoChannel
206 expect(videoChannelDeleted).not.to.be.undefined 203 expect(videoChannelDeleted).not.to.be.undefined
207 } 204 }
208 205
@@ -216,10 +213,8 @@ describe('Test users with multiple servers', function () {
216 const accountDeleted = body.data.find(a => a.name === 'user1' && a.host === 'localhost:' + servers[0].port) 213 const accountDeleted = body.data.find(a => a.name === 'user1' && a.host === 'localhost:' + servers[0].port)
217 expect(accountDeleted).to.be.undefined 214 expect(accountDeleted).to.be.undefined
218 215
219 const resVideoChannels = await getVideoChannelsList(server.url, 0, 10) 216 const { data } = await server.channelsCommand.list()
220 const videoChannelDeleted = resVideoChannels.body.data.find(a => { 217 const videoChannelDeleted = data.find(a => a.name === 'Main user1 channel' && a.host === 'localhost:' + servers[0].port)
221 return a.name === 'Main user1 channel' && a.host === 'localhost:' + servers[0].port
222 }) as VideoChannel
223 expect(videoChannelDeleted).to.be.undefined 218 expect(videoChannelDeleted).to.be.undefined
224 } 219 }
225 }) 220 })