BlocklistCommand,
cleanupTests,
CommentsCommand,
+ createMultipleServers,
doubleFollow,
- flushAndRunMultipleServers,
- ServerInfo,
+ PeerTubeServer,
setAccessTokensToServers,
waitJobs
} from '@shared/extra-utils'
const expect = chai.expect
-async function checkAllVideos (server: ServerInfo, token: string) {
+async function checkAllVideos (server: PeerTubeServer, token: string) {
{
const { data } = await server.videos.listWithToken({ token })
expect(data).to.have.lengthOf(5)
}
}
-async function checkAllComments (server: ServerInfo, token: string, videoUUID: string) {
+async function checkAllComments (server: PeerTubeServer, token: string, videoUUID: string) {
const { data } = await server.comments.listThreads({ videoId: videoUUID, start: 0, count: 25, sort: '-createdAt', token })
const threads = data.filter(t => t.isDeleted === false)
}
async function checkCommentNotification (
- mainServer: ServerInfo,
- comment: { server: ServerInfo, token: string, videoUUID: string, text: string },
+ mainServer: PeerTubeServer,
+ comment: { server: PeerTubeServer, token: string, videoUUID: string, text: string },
check: 'presence' | 'absence'
) {
const command = comment.server.comments
}
describe('Test blocklist', function () {
- let servers: ServerInfo[]
+ let servers: PeerTubeServer[]
let videoUUID1: string
let videoUUID2: string
let videoUUID3: string
before(async function () {
this.timeout(120000)
- servers = await flushAndRunMultipleServers(3)
+ servers = await createMultipleServers(3)
await setAccessTokensToServers(servers)
command = servers[0].blocklist
const now = new Date()
await servers[1].follows.unfollow({ target: servers[0] })
await waitJobs(servers)
- await servers[1].follows.follow({ targets: [ servers[0].host ] })
+ await servers[1].follows.follow({ hosts: [ servers[0].host ] })
await waitJobs(servers)
const now = new Date()
await servers[1].follows.unfollow({ target: servers[0] })
await waitJobs(servers)
- await servers[1].follows.follow({ targets: [ servers[0].host ] })
+ await servers[1].follows.follow({ hosts: [ servers[0].host ] })
await waitJobs(servers)