X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=shared%2Fextra-utils%2Fmiscs%2Ftests.ts;h=5b543027816a6f0e94c9ab1582c296be24c44ae3;hb=e3c9ea722629a7d2b5656299ea51aec8c903b8ae;hp=3dfb2487edf07449ea14ceab74876cd9f881dce1;hpb=c4fa01f7c45b66b112ebd08abce744b7c4041feb;p=github%2FChocobozzz%2FPeerTube.git diff --git a/shared/extra-utils/miscs/tests.ts b/shared/extra-utils/miscs/tests.ts index 3dfb2487e..5b5430278 100644 --- a/shared/extra-utils/miscs/tests.ts +++ b/shared/extra-utils/miscs/tests.ts @@ -2,6 +2,9 @@ import { stat } from 'fs-extra' import { basename, isAbsolute, join, resolve } from 'path' const FIXTURE_URLS = { + peertube_long: 'https://peertube2.cpy.re/videos/watch/122d093a-1ede-43bd-bd34-59d2931ffc5e', + peertube_short: 'https://peertube2.cpy.re/w/3fbif9S3WmtTP8gGsC5HBd', + youtube: 'https://www.youtube.com/watch?v=msX3jv1XdvM', /** @@ -28,7 +31,9 @@ const FIXTURE_URLS = { badVideo: 'https://download.cpy.re/peertube/bad_video.mp4', goodVideo: 'https://download.cpy.re/peertube/good_video.mp4', - video4K: 'https://download.cpy.re/peertube/4k_file.txt' + goodVideo720: 'https://download.cpy.re/peertube/good_video_720.mp4', + + file4K: 'https://download.cpy.re/peertube/4k_file.txt' } function parallelTests () { @@ -42,7 +47,15 @@ function isGithubCI () { function areHttpImportTestsDisabled () { const disabled = process.env.DISABLE_HTTP_IMPORT_TESTS === 'true' - if (disabled) console.log('Import tests are disabled') + if (disabled) console.log('DISABLE_HTTP_IMPORT_TESTS env set to "true" so import tests are disabled') + + return disabled +} + +function areObjectStorageTestsDisabled () { + const disabled = process.env.ENABLE_OBJECT_STORAGE_TESTS !== 'true' + + if (disabled) console.log('ENABLE_OBJECT_STORAGE_TESTS env is not set to "true" so object storage tests are disabled') return disabled } @@ -89,6 +102,7 @@ export { buildAbsoluteFixturePath, getFileSize, buildRequestStub, + areObjectStorageTestsDisabled, wait, root }