aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/videos/video-blacklist.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/videos/video-blacklist.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/videos/video-blacklist.ts')
-rw-r--r--server/tests/api/videos/video-blacklist.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/server/tests/api/videos/video-blacklist.ts b/server/tests/api/videos/video-blacklist.ts
index a8500627b..52cac20d9 100644
--- a/server/tests/api/videos/video-blacklist.ts
+++ b/server/tests/api/videos/video-blacklist.ts
@@ -1,8 +1,8 @@
1/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ 1/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
2 2
3import 'mocha'
3import * as chai from 'chai' 4import * as chai from 'chai'
4import { orderBy } from 'lodash' 5import { orderBy } from 'lodash'
5import 'mocha'
6import { 6import {
7 addVideoToBlacklist, 7 addVideoToBlacklist,
8 cleanupTests, 8 cleanupTests,
@@ -25,10 +25,10 @@ import {
25} from '../../../../shared/extra-utils/index' 25} from '../../../../shared/extra-utils/index'
26import { doubleFollow } from '../../../../shared/extra-utils/server/follows' 26import { doubleFollow } from '../../../../shared/extra-utils/server/follows'
27import { waitJobs } from '../../../../shared/extra-utils/server/jobs' 27import { waitJobs } from '../../../../shared/extra-utils/server/jobs'
28import { VideoBlacklist, VideoBlacklistType } from '../../../../shared/models/videos' 28import { getGoodVideoUrl, getMagnetURI, importVideo } from '../../../../shared/extra-utils/videos/video-imports'
29import { UserAdminFlag } from '../../../../shared/models/users/user-flag.model'
30import { User, UserRole } from '../../../../shared/models/users' 29import { User, UserRole } from '../../../../shared/models/users'
31import { getMagnetURI, getYoutubeVideoUrl, importVideo } from '../../../../shared/extra-utils/videos/video-imports' 30import { UserAdminFlag } from '../../../../shared/models/users/user-flag.model'
31import { VideoBlacklist, VideoBlacklistType } from '../../../../shared/models/videos'
32 32
33const expect = chai.expect 33const expect = chai.expect
34 34
@@ -424,7 +424,7 @@ describe('Test video blacklist', function () {
424 this.timeout(15000) 424 this.timeout(15000)
425 425
426 const attributes = { 426 const attributes = {
427 targetUrl: getYoutubeVideoUrl(), 427 targetUrl: getGoodVideoUrl(),
428 name: 'URL import', 428 name: 'URL import',
429 channelId: channelOfUserWithoutFlag 429 channelId: channelOfUserWithoutFlag
430 } 430 }