diff options
Diffstat (limited to 'server/tests/api/check-params/live.ts')
-rw-r--r-- | server/tests/api/check-params/live.ts | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/server/tests/api/check-params/live.ts b/server/tests/api/check-params/live.ts index c171b1f81..32233c9da 100644 --- a/server/tests/api/check-params/live.ts +++ b/server/tests/api/check-params/live.ts | |||
@@ -2,9 +2,10 @@ | |||
2 | 2 | ||
3 | import 'mocha' | 3 | import 'mocha' |
4 | import { omit } from 'lodash' | 4 | import { omit } from 'lodash' |
5 | import { join } from 'path' | ||
6 | import { LiveVideo, VideoPrivacy } from '@shared/models' | 5 | import { LiveVideo, VideoPrivacy } from '@shared/models' |
6 | import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes' | ||
7 | import { | 7 | import { |
8 | buildAbsoluteFixturePath, | ||
8 | cleanupTests, | 9 | cleanupTests, |
9 | createUser, | 10 | createUser, |
10 | flushAndRunServer, | 11 | flushAndRunServer, |
@@ -24,7 +25,6 @@ import { | |||
24 | userLogin, | 25 | userLogin, |
25 | waitUntilLivePublished | 26 | waitUntilLivePublished |
26 | } from '../../../../shared/extra-utils' | 27 | } from '../../../../shared/extra-utils' |
27 | import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes' | ||
28 | 28 | ||
29 | describe('Test video lives API validator', function () { | 29 | describe('Test video lives API validator', function () { |
30 | const path = '/api/v1/videos/live' | 30 | const path = '/api/v1/videos/live' |
@@ -180,7 +180,7 @@ describe('Test video lives API validator', function () { | |||
180 | it('Should fail with an incorrect thumbnail file', async function () { | 180 | it('Should fail with an incorrect thumbnail file', async function () { |
181 | const fields = baseCorrectParams | 181 | const fields = baseCorrectParams |
182 | const attaches = { | 182 | const attaches = { |
183 | thumbnailfile: join(__dirname, '..', '..', 'fixtures', 'video_short.mp4') | 183 | thumbnailfile: buildAbsoluteFixturePath('video_short.mp4') |
184 | } | 184 | } |
185 | 185 | ||
186 | await makeUploadRequest({ url: server.url, path, token: server.accessToken, fields, attaches }) | 186 | await makeUploadRequest({ url: server.url, path, token: server.accessToken, fields, attaches }) |
@@ -189,7 +189,7 @@ describe('Test video lives API validator', function () { | |||
189 | it('Should fail with a big thumbnail file', async function () { | 189 | it('Should fail with a big thumbnail file', async function () { |
190 | const fields = baseCorrectParams | 190 | const fields = baseCorrectParams |
191 | const attaches = { | 191 | const attaches = { |
192 | thumbnailfile: join(__dirname, '..', '..', 'fixtures', 'preview-big.png') | 192 | thumbnailfile: buildAbsoluteFixturePath('preview-big.png') |
193 | } | 193 | } |
194 | 194 | ||
195 | await makeUploadRequest({ url: server.url, path, token: server.accessToken, fields, attaches }) | 195 | await makeUploadRequest({ url: server.url, path, token: server.accessToken, fields, attaches }) |
@@ -198,7 +198,7 @@ describe('Test video lives API validator', function () { | |||
198 | it('Should fail with an incorrect preview file', async function () { | 198 | it('Should fail with an incorrect preview file', async function () { |
199 | const fields = baseCorrectParams | 199 | const fields = baseCorrectParams |
200 | const attaches = { | 200 | const attaches = { |
201 | previewfile: join(__dirname, '..', '..', 'fixtures', 'video_short.mp4') | 201 | previewfile: buildAbsoluteFixturePath('video_short.mp4') |
202 | } | 202 | } |
203 | 203 | ||
204 | await makeUploadRequest({ url: server.url, path, token: server.accessToken, fields, attaches }) | 204 | await makeUploadRequest({ url: server.url, path, token: server.accessToken, fields, attaches }) |
@@ -207,7 +207,7 @@ describe('Test video lives API validator', function () { | |||
207 | it('Should fail with a big preview file', async function () { | 207 | it('Should fail with a big preview file', async function () { |
208 | const fields = baseCorrectParams | 208 | const fields = baseCorrectParams |
209 | const attaches = { | 209 | const attaches = { |
210 | previewfile: join(__dirname, '..', '..', 'fixtures', 'preview-big.png') | 210 | previewfile: buildAbsoluteFixturePath('preview-big.png') |
211 | } | 211 | } |
212 | 212 | ||
213 | await makeUploadRequest({ url: server.url, path, token: server.accessToken, fields, attaches }) | 213 | await makeUploadRequest({ url: server.url, path, token: server.accessToken, fields, attaches }) |