aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/notifications/user-notifications.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-07-30 09:43:12 +0200
committerChocobozzz <chocobozzz@cpy.re>2020-07-31 11:32:04 +0200
commitb488ba1e26b803ac6c637e8b11bdd444ca4c803f (patch)
tree0a9ce01fcfb26ecddd8a0dccf997514818b8a72f /server/tests/api/notifications/user-notifications.ts
parentb9fe9a7ffdf80d81c5580ccccfeb989051fd9d8a (diff)
downloadPeerTube-b488ba1e26b803ac6c637e8b11bdd444ca4c803f.tar.gz
PeerTube-b488ba1e26b803ac6c637e8b11bdd444ca4c803f.tar.zst
PeerTube-b488ba1e26b803ac6c637e8b11bdd444ca4c803f.zip
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
Diffstat (limited to 'server/tests/api/notifications/user-notifications.ts')
-rw-r--r--server/tests/api/notifications/user-notifications.ts10
1 files changed, 5 insertions, 5 deletions
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 {
24 prepareNotificationsTest 24 prepareNotificationsTest
25} from '../../../../shared/extra-utils/users/user-notifications' 25} from '../../../../shared/extra-utils/users/user-notifications'
26import { addUserSubscription, removeUserSubscription } from '../../../../shared/extra-utils/users/user-subscriptions' 26import { addUserSubscription, removeUserSubscription } from '../../../../shared/extra-utils/users/user-subscriptions'
27import { getBadVideoUrl, getYoutubeVideoUrl, importVideo } from '../../../../shared/extra-utils/videos/video-imports' 27import { getBadVideoUrl, getGoodVideoUrl, importVideo } from '../../../../shared/extra-utils/videos/video-imports'
28import { UserNotification, UserNotificationType } from '../../../../shared/models/users' 28import { UserNotification, UserNotificationType } from '../../../../shared/models/users'
29import { VideoPrivacy } from '../../../../shared/models/videos' 29import { VideoPrivacy } from '../../../../shared/models/videos'
30 30
@@ -213,7 +213,7 @@ describe('Test user notifications', function () {
213 name, 213 name,
214 channelId, 214 channelId,
215 privacy: VideoPrivacy.PUBLIC, 215 privacy: VideoPrivacy.PUBLIC,
216 targetUrl: getYoutubeVideoUrl() 216 targetUrl: getGoodVideoUrl()
217 } 217 }
218 const res = await importVideo(servers[0].url, servers[0].accessToken, attributes) 218 const res = await importVideo(servers[0].url, servers[0].accessToken, attributes)
219 const uuid = res.body.video.uuid 219 const uuid = res.body.video.uuid
@@ -284,7 +284,7 @@ describe('Test user notifications', function () {
284 name, 284 name,
285 channelId, 285 channelId,
286 privacy: VideoPrivacy.PUBLIC, 286 privacy: VideoPrivacy.PUBLIC,
287 targetUrl: getYoutubeVideoUrl(), 287 targetUrl: getGoodVideoUrl(),
288 waitTranscoding: true 288 waitTranscoding: true
289 } 289 }
290 const res = await importVideo(servers[1].url, servers[1].accessToken, attributes) 290 const res = await importVideo(servers[1].url, servers[1].accessToken, attributes)
@@ -371,13 +371,13 @@ describe('Test user notifications', function () {
371 name, 371 name,
372 channelId, 372 channelId,
373 privacy: VideoPrivacy.PRIVATE, 373 privacy: VideoPrivacy.PRIVATE,
374 targetUrl: getYoutubeVideoUrl() 374 targetUrl: getGoodVideoUrl()
375 } 375 }
376 const res = await importVideo(servers[0].url, servers[0].accessToken, attributes) 376 const res = await importVideo(servers[0].url, servers[0].accessToken, attributes)
377 const uuid = res.body.video.uuid 377 const uuid = res.body.video.uuid
378 378
379 await waitJobs(servers) 379 await waitJobs(servers)
380 await checkMyVideoImportIsFinished(baseParams, name, uuid, getYoutubeVideoUrl(), true, 'presence') 380 await checkMyVideoImportIsFinished(baseParams, name, uuid, getGoodVideoUrl(), true, 'presence')
381 }) 381 })
382 }) 382 })
383 383