diff options
Diffstat (limited to 'server/tests/api/videos/multiple-servers.ts')
-rw-r--r-- | server/tests/api/videos/multiple-servers.ts | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/server/tests/api/videos/multiple-servers.ts b/server/tests/api/videos/multiple-servers.ts index 2563939ec..6238cdc08 100644 --- a/server/tests/api/videos/multiple-servers.ts +++ b/server/tests/api/videos/multiple-servers.ts | |||
@@ -39,6 +39,7 @@ import { | |||
39 | getVideoCommentThreads, | 39 | getVideoCommentThreads, |
40 | getVideoThreadComments | 40 | getVideoThreadComments |
41 | } from '../../utils/videos/video-comments' | 41 | } from '../../utils/videos/video-comments' |
42 | import { getAccountsList } from '../../utils/users/accounts' | ||
42 | 43 | ||
43 | const expect = chai.expect | 44 | const expect = chai.expect |
44 | 45 | ||
@@ -46,6 +47,7 @@ describe('Test multiple servers', function () { | |||
46 | let servers: ServerInfo[] = [] | 47 | let servers: ServerInfo[] = [] |
47 | const toRemove = [] | 48 | const toRemove = [] |
48 | let videoUUID = '' | 49 | let videoUUID = '' |
50 | let accountId: number | ||
49 | let videoChannelId: number | 51 | let videoChannelId: number |
50 | 52 | ||
51 | before(async function () { | 53 | before(async function () { |
@@ -56,13 +58,20 @@ describe('Test multiple servers', function () { | |||
56 | // Get the access tokens | 58 | // Get the access tokens |
57 | await setAccessTokensToServers(servers) | 59 | await setAccessTokensToServers(servers) |
58 | 60 | ||
59 | const videoChannel = { | 61 | { |
60 | name: 'my channel', | 62 | const res = await getAccountsList(servers[0].url) |
61 | description: 'super channel' | 63 | accountId = res.body.data[0].id |
64 | } | ||
65 | |||
66 | { | ||
67 | const videoChannel = { | ||
68 | name: 'my channel', | ||
69 | description: 'super channel' | ||
70 | } | ||
71 | await addVideoChannel(servers[ 0 ].url, servers[ 0 ].accessToken, accountId, videoChannel) | ||
72 | const channelRes = await getVideoChannelsList(servers[ 0 ].url, 0, 1) | ||
73 | videoChannelId = channelRes.body.data[ 0 ].id | ||
62 | } | 74 | } |
63 | await addVideoChannel(servers[0].url, servers[0].accessToken, videoChannel) | ||
64 | const channelRes = await getVideoChannelsList(servers[0].url, 0, 1) | ||
65 | videoChannelId = channelRes.body.data[0].id | ||
66 | 75 | ||
67 | // Server 1 and server 2 follow each other | 76 | // Server 1 and server 2 follow each other |
68 | await doubleFollow(servers[0], servers[1]) | 77 | await doubleFollow(servers[0], servers[1]) |