From 34caef7fc0710623c6894549423813d53f65b303 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 10 Dec 2020 16:38:12 +0100 Subject: Add joblog at the end of ci --- server/controllers/api/search.ts | 8 ++++---- server/tests/api/live/live.ts | 2 ++ server/tests/api/notifications/moderation-notifications.ts | 4 ++-- server/tests/api/search/search-index.ts | 6 +++--- 4 files changed, 11 insertions(+), 9 deletions(-) (limited to 'server') diff --git a/server/controllers/api/search.ts b/server/controllers/api/search.ts index 353fd171b..7e1b7b230 100644 --- a/server/controllers/api/search.ts +++ b/server/controllers/api/search.ts @@ -85,8 +85,6 @@ function searchVideoChannels (req: express.Request, res: express.Response) { } async function searchVideoChannelsIndex (query: VideoChannelsSearchQuery, res: express.Response) { - logger.debug('Doing channels search on search index.') - const result = await buildMutedForSearchIndex(res) const body = Object.assign(query, result) @@ -94,6 +92,8 @@ async function searchVideoChannelsIndex (query: VideoChannelsSearchQuery, res: e const url = sanitizeUrl(CONFIG.SEARCH.SEARCH_INDEX.URL) + '/api/v1/search/video-channels' try { + logger.debug('Doing video channels search index request on %s.', url, { body }) + const searchIndexResult = await doRequest>({ uri: url, body, json: true }) return res.json(searchIndexResult.body) @@ -166,8 +166,6 @@ function searchVideos (req: express.Request, res: express.Response) { } async function searchVideosIndex (query: VideosSearchQuery, res: express.Response) { - logger.debug('Doing videos search on search index.') - const result = await buildMutedForSearchIndex(res) const body: VideosSearchQuery = Object.assign(query, result) @@ -186,6 +184,8 @@ async function searchVideosIndex (query: VideosSearchQuery, res: express.Respons const url = sanitizeUrl(CONFIG.SEARCH.SEARCH_INDEX.URL) + '/api/v1/search/videos' try { + logger.debug('Doing videos search index request on %s.', url, { body }) + const searchIndexResult = await doRequest>({ uri: url, body, json: true }) return res.json(searchIndexResult.body) diff --git a/server/tests/api/live/live.ts b/server/tests/api/live/live.ts index 6a1f6e759..918792081 100644 --- a/server/tests/api/live/live.ts +++ b/server/tests/api/live/live.ts @@ -413,6 +413,8 @@ describe('Test live', function () { await testVideoResolutions(liveVideoId, resolutions) await stopFfmpeg(command) + await waitUntilLiveEnded(servers[0].url, servers[0].accessToken, liveVideoId) + await waitJobs(servers) await waitUntilLivePublished(servers[0].url, servers[0].accessToken, liveVideoId) diff --git a/server/tests/api/notifications/moderation-notifications.ts b/server/tests/api/notifications/moderation-notifications.ts index e7aa5d987..24c91a365 100644 --- a/server/tests/api/notifications/moderation-notifications.ts +++ b/server/tests/api/notifications/moderation-notifications.ts @@ -502,7 +502,7 @@ describe('Test moderation notifications', function () { }) it('Should send notification to moderators on new video with auto-blacklist', async function () { - this.timeout(20000) + this.timeout(40000) videoName = 'video with auto-blacklist ' + uuidv4() const resVideo = await uploadVideo(servers[0].url, userAccessToken, { name: videoName }) @@ -525,7 +525,7 @@ describe('Test moderation notifications', function () { }) it('Should send video published and unblacklist after video unblacklisted', async function () { - this.timeout(20000) + this.timeout(40000) await removeVideoFromBlacklist(servers[0].url, servers[0].accessToken, videoUUID) diff --git a/server/tests/api/search/search-index.ts b/server/tests/api/search/search-index.ts index 40065d162..849a8a893 100644 --- a/server/tests/api/search/search-index.ts +++ b/server/tests/api/search/search-index.ts @@ -105,7 +105,7 @@ describe('Test videos search', function () { describe('Videos search', async function () { it('Should make a simple search and not have results', async function () { - const res = await searchVideo(server.url, 'a'.repeat(500)) + const res = await searchVideo(server.url, 'djidane'.repeat(50)) expect(res.body.total).to.equal(0) expect(res.body.data).to.have.lengthOf(0) @@ -216,7 +216,7 @@ describe('Test videos search', function () { { await updateCustomSubConfig(server.url, server.accessToken, { instance: { defaultNSFWPolicy: 'display' } }) - const res = await searchVideo(server.url, 'NSFW search index') + const res = await searchVideo(server.url, 'NSFW search index', '-match') const video = res.body.data[0] as Video expect(res.body.data).to.have.length.greaterThan(0) @@ -228,7 +228,7 @@ describe('Test videos search', function () { { await updateCustomSubConfig(server.url, server.accessToken, { instance: { defaultNSFWPolicy: 'do_not_list' } }) - const res = await searchVideo(server.url, 'NSFW search index') + const res = await searchVideo(server.url, 'NSFW search index', '-match') try { expect(res.body.data).to.have.lengthOf(0) -- cgit v1.2.3