X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fapi%2Fusers%2Fuser-subscriptions.ts;h=77b99886d24208a976d63f782ae25c2edd564ea6;hb=4d029ef8ec3d5274eeaa3ee6d808eb7035e7faef;hp=1b15a98dcfec8deccbff055d3d416b038f3de2a2;hpb=89d241a79c262b9775c233b73cff080043ebb5e6;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/api/users/user-subscriptions.ts b/server/tests/api/users/user-subscriptions.ts index 1b15a98dc..77b99886d 100644 --- a/server/tests/api/users/user-subscriptions.ts +++ b/server/tests/api/users/user-subscriptions.ts @@ -4,9 +4,9 @@ import 'mocha' import * as chai from 'chai' import { cleanupTests, + createMultipleServers, doubleFollow, - flushAndRunMultipleServers, - ServerInfo, + PeerTubeServer, setAccessTokensToServers, SubscriptionsCommand, waitJobs @@ -15,7 +15,7 @@ import { const expect = chai.expect describe('Test users subscriptions', function () { - let servers: ServerInfo[] = [] + let servers: PeerTubeServer[] = [] const users: { accessToken: string }[] = [] let video3UUID: string @@ -24,7 +24,7 @@ describe('Test users subscriptions', function () { before(async function () { this.timeout(120000) - servers = await flushAndRunMultipleServers(3) + servers = await createMultipleServers(3) // Get the access tokens await setAccessTokensToServers(servers) @@ -67,7 +67,8 @@ describe('Test users subscriptions', function () { await waitJobs(servers) - const { uuid } = await servers[2].videos.upload({ attributes: { name: 'video server 3 added after follow' } }) + const attributes = { name: 'video server 3 added after follow' } + const { uuid } = await servers[2].videos.upload({ token: users[2].accessToken, attributes }) video3UUID = uuid await waitJobs(servers) @@ -223,7 +224,7 @@ describe('Test users subscriptions', function () { it('Should have server 1 follow server 3 and display server 3 videos', async function () { this.timeout(60000) - await servers[0].follows.follow({ targets: [ servers[2].url ] }) + await servers[0].follows.follow({ hosts: [ servers[2].url ] }) await waitJobs(servers)