aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/extra-utils/miscs
diff options
context:
space:
mode:
Diffstat (limited to 'shared/extra-utils/miscs')
-rw-r--r--shared/extra-utils/miscs/miscs.ts15
1 files changed, 11 insertions, 4 deletions
diff --git a/shared/extra-utils/miscs/miscs.ts b/shared/extra-utils/miscs/miscs.ts
index 2239d5bcc..caf09c01f 100644
--- a/shared/extra-utils/miscs/miscs.ts
+++ b/shared/extra-utils/miscs/miscs.ts
@@ -64,19 +64,25 @@ async function testImage (url: string, imageName: string, imagePath: string, ext
64} 64}
65 65
66function buildAbsoluteFixturePath (path: string, customCIPath = false) { 66function buildAbsoluteFixturePath (path: string, customCIPath = false) {
67 if (isAbsolute(path)) { 67 if (isAbsolute(path)) return path
68 return path
69 }
70 68
71 if (customCIPath) { 69 if (customCIPath) {
72 if (process.env.GITLAB_CI) return join(root(), 'cached-fixtures', path) 70 if (process.env.GITLAB_CI) return join(root(), 'cached-fixtures', path)
73 71
74 if (process.env.TRAVIS) return join(process.env.HOME, 'fixtures', path) 72 return join(process.env.HOME, 'fixtures', path)
75 } 73 }
76 74
77 return join(root(), 'server', 'tests', 'fixtures', path) 75 return join(root(), 'server', 'tests', 'fixtures', path)
78} 76}
79 77
78function areHttpImportTestsDisabled () {
79 const disabled = process.env.DISABLE_HTTP_IMPORT_TESTS === 'true'
80
81 if (disabled) console.log('Import tests are disabled')
82
83 return disabled
84}
85
80async function generateHighBitrateVideo () { 86async function generateHighBitrateVideo () {
81 const tempFixturePath = buildAbsoluteFixturePath('video_high_bitrate_1080p.mp4', true) 87 const tempFixturePath = buildAbsoluteFixturePath('video_high_bitrate_1080p.mp4', true)
82 88
@@ -131,6 +137,7 @@ async function generateVideoWithFramerate (fps = 60) {
131export { 137export {
132 dateIsValid, 138 dateIsValid,
133 wait, 139 wait,
140 areHttpImportTestsDisabled,
134 buildServerDirectory, 141 buildServerDirectory,
135 webtorrentAdd, 142 webtorrentAdd,
136 immutableAssign, 143 immutableAssign,