aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/videos/channel-import-videos.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api/videos/channel-import-videos.ts')
-rw-r--r--server/tests/api/videos/channel-import-videos.ts43
1 files changed, 42 insertions, 1 deletions
diff --git a/server/tests/api/videos/channel-import-videos.ts b/server/tests/api/videos/channel-import-videos.ts
index 7cfd02fbb..a66f88a0e 100644
--- a/server/tests/api/videos/channel-import-videos.ts
+++ b/server/tests/api/videos/channel-import-videos.ts
@@ -109,6 +109,45 @@ describe('Test videos import in a channel', function () {
109 } 109 }
110 }) 110 })
111 111
112 it('Should limit max amount of videos synced on full sync', async function () {
113 this.timeout(240_000)
114
115 await server.kill()
116 await server.run({
117 import: {
118 video_channel_synchronization: {
119 full_sync_videos_limit: 1
120 }
121 }
122 })
123
124 const { id } = await server.channels.create({ attributes: { name: 'channel3' } })
125 const channel3Id = id
126
127 const { videoChannelSync } = await server.channelSyncs.create({
128 attributes: {
129 externalChannelUrl: FIXTURE_URLS.youtubeChannel,
130 videoChannelId: channel3Id
131 }
132 })
133 const syncId = videoChannelSync.id
134
135 await waitJobs(server)
136
137 await server.channels.importVideos({
138 channelName: 'channel3',
139 externalChannelUrl: FIXTURE_URLS.youtubeChannel,
140 videoChannelSyncId: syncId
141 })
142
143 await waitJobs(server)
144
145 const { total, data } = await server.videos.listByChannel({ handle: 'channel3' })
146
147 expect(total).to.equal(1)
148 expect(data).to.have.lengthOf(1)
149 })
150
112 after(async function () { 151 after(async function () {
113 await server?.kill() 152 await server?.kill()
114 }) 153 })
@@ -116,5 +155,7 @@ describe('Test videos import in a channel', function () {
116 } 155 }
117 156
118 runSuite('yt-dlp') 157 runSuite('yt-dlp')
119 runSuite('youtube-dl') 158
159 // FIXME: With recent changes on youtube, youtube-dl doesn't fetch live replays which means the test suite fails
160 // runSuite('youtube-dl')
120}) 161})