From 48dce1c90dff4e90a4bcffefaecf157336cf904b Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 24 Apr 2018 17:05:32 +0200 Subject: Update video channel routes --- server/tests/api/videos/multiple-servers.ts | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'server/tests/api/videos/multiple-servers.ts') 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 { getVideoCommentThreads, getVideoThreadComments } from '../../utils/videos/video-comments' +import { getAccountsList } from '../../utils/users/accounts' const expect = chai.expect @@ -46,6 +47,7 @@ describe('Test multiple servers', function () { let servers: ServerInfo[] = [] const toRemove = [] let videoUUID = '' + let accountId: number let videoChannelId: number before(async function () { @@ -56,13 +58,20 @@ describe('Test multiple servers', function () { // Get the access tokens await setAccessTokensToServers(servers) - const videoChannel = { - name: 'my channel', - description: 'super channel' + { + const res = await getAccountsList(servers[0].url) + accountId = res.body.data[0].id + } + + { + const videoChannel = { + name: 'my channel', + description: 'super channel' + } + await addVideoChannel(servers[ 0 ].url, servers[ 0 ].accessToken, accountId, videoChannel) + const channelRes = await getVideoChannelsList(servers[ 0 ].url, 0, 1) + videoChannelId = channelRes.body.data[ 0 ].id } - await addVideoChannel(servers[0].url, servers[0].accessToken, videoChannel) - const channelRes = await getVideoChannelsList(servers[0].url, 0, 1) - videoChannelId = channelRes.body.data[0].id // Server 1 and server 2 follow each other await doubleFollow(servers[0], servers[1]) -- cgit v1.2.3