X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fapi%2Fvideos%2Fvideo-playlist-thumbnails.ts;h=3944dc344349ab388dece75ec16761b50511d716;hb=9295c68b74fe1f1e2e9f72009205d7f0379844c5;hp=709f64c4d80b4b506c7bdfea2ef9d8dc84524f17;hpb=89d241a79c262b9775c233b73cff080043ebb5e6;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/api/videos/video-playlist-thumbnails.ts b/server/tests/api/videos/video-playlist-thumbnails.ts index 709f64c4d..3944dc344 100644 --- a/server/tests/api/videos/video-playlist-thumbnails.ts +++ b/server/tests/api/videos/video-playlist-thumbnails.ts @@ -2,22 +2,22 @@ import 'mocha' import * as chai from 'chai' +import { testImage } from '@server/tests/shared' +import { VideoPlaylistPrivacy } from '@shared/models' import { cleanupTests, + createMultipleServers, doubleFollow, - flushAndRunMultipleServers, - ServerInfo, + PeerTubeServer, setAccessTokensToServers, setDefaultVideoChannel, - testImage, waitJobs -} from '../../../../shared/extra-utils' -import { VideoPlaylistPrivacy } from '../../../../shared/models/videos/playlist/video-playlist-privacy.model' +} from '@shared/server-commands' const expect = chai.expect describe('Playlist thumbnail', function () { - let servers: ServerInfo[] = [] + let servers: PeerTubeServer[] = [] let playlistWithoutThumbnailId: number let playlistWithThumbnailId: number @@ -30,13 +30,13 @@ describe('Playlist thumbnail', function () { let video1: number let video2: number - async function getPlaylistWithoutThumbnail (server: ServerInfo) { + async function getPlaylistWithoutThumbnail (server: PeerTubeServer) { const body = await server.playlists.list({ start: 0, count: 10 }) return body.data.find(p => p.displayName === 'playlist without thumbnail') } - async function getPlaylistWithThumbnail (server: ServerInfo) { + async function getPlaylistWithThumbnail (server: PeerTubeServer) { const body = await server.playlists.list({ start: 0, count: 10 }) return body.data.find(p => p.displayName === 'playlist with thumbnail') @@ -45,12 +45,16 @@ describe('Playlist thumbnail', function () { before(async function () { this.timeout(120000) - servers = await flushAndRunMultipleServers(2, { transcoding: { enabled: false } }) + servers = await createMultipleServers(2) // Get the access tokens await setAccessTokensToServers(servers) await setDefaultVideoChannel(servers) + for (const server of servers) { + await server.config.disableTranscoding() + } + // Server 1 and server 2 follow each other await doubleFollow(servers[0], servers[1])