import {
BlacklistCommand,
cleanupTests,
+ createMultipleServers,
doubleFollow,
- flushAndRunMultipleServers,
- ImportsCommand,
+ FIXTURE_URLS,
killallServers,
- reRunServer,
- ServerInfo,
+ PeerTubeServer,
setAccessTokensToServers,
waitJobs
} from '@shared/extra-utils'
const expect = chai.expect
describe('Test video blacklist', function () {
- let servers: ServerInfo[] = []
+ let servers: PeerTubeServer[] = []
let videoId: number
let command: BlacklistCommand
- async function blacklistVideosOnServer (server: ServerInfo) {
+ async function blacklistVideosOnServer (server: PeerTubeServer) {
const { data } = await server.videos.list()
for (const video of data) {
this.timeout(50000)
// Run servers
- servers = await flushAndRunMultipleServers(2)
+ servers = await createMultipleServers(2)
// Get the access tokens
await setAccessTokensToServers(servers)
}
}
}
- await reRunServer(servers[0], config)
+ await servers[0].run(config)
{
const user = { username: 'user_without_flag', password: 'password' }
this.timeout(15000)
const attributes = {
- targetUrl: ImportsCommand.getGoodVideoUrl(),
+ targetUrl: FIXTURE_URLS.goodVideo,
name: 'URL import',
channelId: channelOfUserWithoutFlag
}
it('Should auto blacklist a video on torrent import', async function () {
const attributes = {
- magnetUri: ImportsCommand.getMagnetURI(),
+ magnetUri: FIXTURE_URLS.magnet,
name: 'Torrent import',
channelId: channelOfUserWithoutFlag
}