import * as chai from 'chai'
import {
cleanupTests,
+ createMultipleServers,
doubleFollow,
- flushAndRunMultipleServers,
- ServerInfo,
+ PeerTubeServer,
setAccessTokensToServers,
SubscriptionsCommand,
waitJobs
const expect = chai.expect
describe('Test users subscriptions', function () {
- let servers: ServerInfo[] = []
+ let servers: PeerTubeServer[] = []
const users: { accessToken: string }[] = []
let video3UUID: string
before(async function () {
this.timeout(120000)
- servers = await flushAndRunMultipleServers(3)
+ servers = await createMultipleServers(3)
// Get the access tokens
await setAccessTokensToServers(servers)
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)
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)