From b488ba1e26b803ac6c637e8b11bdd444ca4c803f Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 30 Jul 2020 09:43:12 +0200 Subject: Don't rely on youtube for tests Use another import URL when possible, and disable import tests when we want to do a youtube import test --- server/tests/plugins/filter-hooks.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'server/tests/plugins') diff --git a/server/tests/plugins/filter-hooks.ts b/server/tests/plugins/filter-hooks.ts index 41242318e..4d354b68e 100644 --- a/server/tests/plugins/filter-hooks.ts +++ b/server/tests/plugins/filter-hooks.ts @@ -24,7 +24,7 @@ import { waitJobs } from '../../../shared/extra-utils' import { cleanupTests, flushAndRunMultipleServers, ServerInfo } from '../../../shared/extra-utils/server/servers' -import { getMyVideoImports, getYoutubeVideoUrl, importVideo } from '../../../shared/extra-utils/videos/video-imports' +import { getGoodVideoUrl, getMyVideoImports, importVideo } from '../../../shared/extra-utils/videos/video-imports' import { VideoDetails, VideoImport, VideoImportState, VideoPrivacy } from '../../../shared/models/videos' import { VideoCommentThreadTree } from '../../../shared/models/videos/video-comment.model' @@ -92,7 +92,7 @@ describe('Test plugin filter hooks', function () { name: 'normal title', privacy: VideoPrivacy.PUBLIC, channelId: servers[0].videoChannel.id, - targetUrl: getYoutubeVideoUrl() + 'bad' + targetUrl: getGoodVideoUrl() + 'bad' } await importVideo(servers[0].url, servers[0].accessToken, baseAttributes, 403) }) @@ -117,7 +117,7 @@ describe('Test plugin filter hooks', function () { name: 'title with bad word', privacy: VideoPrivacy.PUBLIC, channelId: servers[0].videoChannel.id, - targetUrl: getYoutubeVideoUrl() + targetUrl: getGoodVideoUrl() } const res = await importVideo(servers[0].url, servers[0].accessToken, baseAttributes) videoImportId = res.body.id @@ -220,7 +220,7 @@ describe('Test plugin filter hooks', function () { const attributes = { name: 'video please blacklist me', - targetUrl: getYoutubeVideoUrl(), + targetUrl: getGoodVideoUrl(), channelId: servers[0].videoChannel.id } const res = await importVideo(servers[0].url, servers[0].accessToken, attributes) -- cgit v1.2.3