From e3c9ea722629a7d2b5656299ea51aec8c903b8ae Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 27 Aug 2021 16:21:19 +0200 Subject: Add peertube import test --- server/tests/api/videos/video-imports.ts | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'server/tests/api/videos') diff --git a/server/tests/api/videos/video-imports.ts b/server/tests/api/videos/video-imports.ts index 2eac130d2..108688651 100644 --- a/server/tests/api/videos/video-imports.ts +++ b/server/tests/api/videos/video-imports.ts @@ -336,6 +336,32 @@ Ajouter un sous-titre est vraiment facile`) expect(maxResolution, 'expected max resolution not met').to.equals(VideoResolution.H_1080P) }) + it('Should import a peertube video', async function () { + this.timeout(120_000) + + // TODO: include peertube_short when https://github.com/ytdl-org/youtube-dl/pull/29475 is merged + for (const targetUrl of [ FIXTURE_URLS.peertube_long ]) { + // for (const targetUrl of [ FIXTURE_URLS.peertube_long, FIXTURE_URLS.peertube_short ]) { + await servers[0].config.disableTranscoding() + + const attributes = { + targetUrl, + channelId: channelIdServer1, + privacy: VideoPrivacy.PUBLIC + } + const { video } = await servers[0].imports.importVideo({ attributes }) + const videoUUID = video.uuid + + await waitJobs(servers) + + for (const server of servers) { + const video = await server.videos.get({ id: videoUUID }) + + expect(video.name).to.equal('E2E tests') + } + } + }) + after(async function () { await cleanupTests(servers) }) -- cgit v1.2.3