diff options
Diffstat (limited to 'server/tests/plugins/filter-hooks.ts')
-rw-r--r-- | server/tests/plugins/filter-hooks.ts | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/server/tests/plugins/filter-hooks.ts b/server/tests/plugins/filter-hooks.ts index b1f83d201..27b72cf7d 100644 --- a/server/tests/plugins/filter-hooks.ts +++ b/server/tests/plugins/filter-hooks.ts | |||
@@ -632,6 +632,51 @@ describe('Test plugin filter hooks', function () { | |||
632 | 632 | ||
633 | }) | 633 | }) |
634 | 634 | ||
635 | describe('Job queue filters', function () { | ||
636 | let videoUUID: string | ||
637 | |||
638 | before(async function () { | ||
639 | this.timeout(120_000) | ||
640 | |||
641 | const { uuid } = await servers[0].videos.quickUpload({ name: 'studio' }) | ||
642 | |||
643 | const video = await servers[0].videos.get({ id: uuid }) | ||
644 | expect(video.duration).at.least(2) | ||
645 | videoUUID = video.uuid | ||
646 | |||
647 | await waitJobs(servers) | ||
648 | |||
649 | await servers[0].config.enableStudio() | ||
650 | }) | ||
651 | |||
652 | it('Should run filter:job-queue.process.params', async function () { | ||
653 | this.timeout(120_000) | ||
654 | |||
655 | await servers[0].videoStudio.createEditionTasks({ | ||
656 | videoId: videoUUID, | ||
657 | tasks: [ | ||
658 | { | ||
659 | name: 'add-intro', | ||
660 | options: { | ||
661 | file: 'video_very_short_240p.mp4' | ||
662 | } | ||
663 | } | ||
664 | ] | ||
665 | }) | ||
666 | |||
667 | await waitJobs(servers) | ||
668 | |||
669 | await servers[0].servers.waitUntilLog('Run hook filter:job-queue.process.params', 1, false) | ||
670 | |||
671 | const video = await servers[0].videos.get({ id: videoUUID }) | ||
672 | expect(video.duration).at.most(2) | ||
673 | }) | ||
674 | |||
675 | it('Should run filter:job-queue.process.result', async function () { | ||
676 | await servers[0].servers.waitUntilLog('Run hook filter:job-queue.process.result', 1, false) | ||
677 | }) | ||
678 | }) | ||
679 | |||
635 | after(async function () { | 680 | after(async function () { |
636 | await cleanupTests(servers) | 681 | await cleanupTests(servers) |
637 | }) | 682 | }) |