aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/search/search-videos.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api/search/search-videos.ts')
-rw-r--r--server/tests/api/search/search-videos.ts22
1 files changed, 10 insertions, 12 deletions
diff --git a/server/tests/api/search/search-videos.ts b/server/tests/api/search/search-videos.ts
index 7dc89c447..af74b26a7 100644
--- a/server/tests/api/search/search-videos.ts
+++ b/server/tests/api/search/search-videos.ts
@@ -2,23 +2,20 @@
2 2
3import 'mocha' 3import 'mocha'
4import * as chai from 'chai' 4import * as chai from 'chai'
5import { VideoPrivacy } from '@shared/models'
6import { 5import {
7 cleanupTests, 6 cleanupTests,
8 createLive, 7 createVideoCaption,
9 flushAndRunServer, 8 flushAndRunServer,
10 immutableAssign, 9 immutableAssign,
11 SearchCommand, 10 SearchCommand,
12 sendRTMPStreamInVideo,
13 ServerInfo, 11 ServerInfo,
14 setAccessTokensToServers, 12 setAccessTokensToServers,
15 setDefaultVideoChannel, 13 setDefaultVideoChannel,
16 stopFfmpeg, 14 stopFfmpeg,
17 uploadVideo, 15 uploadVideo,
18 wait, 16 wait
19 waitUntilLivePublished 17} from '@shared/extra-utils'
20} from '../../../../shared/extra-utils' 18import { VideoPrivacy } from '@shared/models'
21import { createVideoCaption } from '../../../../shared/extra-utils/videos/video-captions'
22 19
23const expect = chai.expect 20const expect = chai.expect
24 21
@@ -502,12 +499,13 @@ describe('Test videos search', function () {
502 } 499 }
503 500
504 { 501 {
505 const liveOptions = { name: 'live', privacy: VideoPrivacy.PUBLIC, channelId: server.videoChannel.id } 502 const liveCommand = server.liveCommand
506 const resLive = await createLive(server.url, server.accessToken, liveOptions) 503
507 const liveVideoId = resLive.body.video.uuid 504 const liveAttributes = { name: 'live', privacy: VideoPrivacy.PUBLIC, channelId: server.videoChannel.id }
505 const live = await liveCommand.createLive({ fields: liveAttributes })
508 506
509 const ffmpegCommand = await sendRTMPStreamInVideo(server.url, server.accessToken, liveVideoId) 507 const ffmpegCommand = await liveCommand.sendRTMPStreamInVideo({ videoId: live.id })
510 await waitUntilLivePublished(server.url, server.accessToken, liveVideoId) 508 await liveCommand.waitUntilLivePublished({ videoId: live.id })
511 509
512 const body = await command.advancedVideoSearch({ search: { isLive: true } }) 510 const body = await command.advancedVideoSearch({ search: { isLive: true } })
513 511