import { ACTOR_IMAGES_SIZE } from '@server/initializers/constants'
import {
cleanupTests,
+ createMultipleServers,
doubleFollow,
- flushAndRunMultipleServers,
- ServerInfo,
+ PeerTubeServer,
setAccessTokensToServers,
setDefaultVideoChannel,
testFileExistsOrNot,
const expect = chai.expect
-async function findChannel (server: ServerInfo, channelId: number) {
+async function findChannel (server: PeerTubeServer, channelId: number) {
const body = await server.channels.list({ sort: '-name' })
return body.data.find(c => c.id === channelId)
}
describe('Test video channels', function () {
- let servers: ServerInfo[]
+ let servers: PeerTubeServer[]
let userInfo: User
let secondVideoChannelId: number
let totoChannel: number
before(async function () {
this.timeout(60000)
- servers = await flushAndRunMultipleServers(2)
+ servers = await createMultipleServers(2)
await setAccessTokensToServers(servers)
await setDefaultVideoChannel(servers)
for (const server of servers) {
const channelURI = 'second_video_channel@localhost:' + servers[0].port
- const { total, data } = await server.videos.listByChannel({ videoChannelName: channelURI })
+ const { total, data } = await server.videos.listByChannel({ handle: channelURI })
expect(total).to.equal(1)
expect(data).to.be.an('array')
for (const server of servers) {
{
const secondChannelURI = 'second_video_channel@localhost:' + servers[0].port
- const { total } = await server.videos.listByChannel({ videoChannelName: secondChannelURI })
+ const { total } = await server.videos.listByChannel({ handle: secondChannelURI })
expect(total).to.equal(0)
}
{
const channelURI = 'root_channel@localhost:' + servers[0].port
- const { total, data } = await server.videos.listByChannel({ videoChannelName: channelURI })
+ const { total, data } = await server.videos.listByChannel({ handle: channelURI })
expect(total).to.equal(1)
expect(data).to.be.an('array')