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/api/notifications/user-notifications.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'server/tests/api/notifications') diff --git a/server/tests/api/notifications/user-notifications.ts b/server/tests/api/notifications/user-notifications.ts index e5f6aa864..af4ff42b0 100644 --- a/server/tests/api/notifications/user-notifications.ts +++ b/server/tests/api/notifications/user-notifications.ts @@ -24,7 +24,7 @@ import { prepareNotificationsTest } from '../../../../shared/extra-utils/users/user-notifications' import { addUserSubscription, removeUserSubscription } from '../../../../shared/extra-utils/users/user-subscriptions' -import { getBadVideoUrl, getYoutubeVideoUrl, importVideo } from '../../../../shared/extra-utils/videos/video-imports' +import { getBadVideoUrl, getGoodVideoUrl, importVideo } from '../../../../shared/extra-utils/videos/video-imports' import { UserNotification, UserNotificationType } from '../../../../shared/models/users' import { VideoPrivacy } from '../../../../shared/models/videos' @@ -213,7 +213,7 @@ describe('Test user notifications', function () { name, channelId, privacy: VideoPrivacy.PUBLIC, - targetUrl: getYoutubeVideoUrl() + targetUrl: getGoodVideoUrl() } const res = await importVideo(servers[0].url, servers[0].accessToken, attributes) const uuid = res.body.video.uuid @@ -284,7 +284,7 @@ describe('Test user notifications', function () { name, channelId, privacy: VideoPrivacy.PUBLIC, - targetUrl: getYoutubeVideoUrl(), + targetUrl: getGoodVideoUrl(), waitTranscoding: true } const res = await importVideo(servers[1].url, servers[1].accessToken, attributes) @@ -371,13 +371,13 @@ describe('Test user notifications', function () { name, channelId, privacy: VideoPrivacy.PRIVATE, - targetUrl: getYoutubeVideoUrl() + targetUrl: getGoodVideoUrl() } const res = await importVideo(servers[0].url, servers[0].accessToken, attributes) const uuid = res.body.video.uuid await waitJobs(servers) - await checkMyVideoImportIsFinished(baseParams, name, uuid, getYoutubeVideoUrl(), true, 'presence') + await checkMyVideoImportIsFinished(baseParams, name, uuid, getGoodVideoUrl(), true, 'presence') }) }) -- cgit v1.2.3