diff options
Diffstat (limited to 'server/tests/api/videos')
-rw-r--r-- | server/tests/api/videos/channel-import-videos.ts | 43 | ||||
-rw-r--r-- | server/tests/api/videos/video-channel-syncs.ts | 2 |
2 files changed, 43 insertions, 2 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 | }) |
diff --git a/server/tests/api/videos/video-channel-syncs.ts b/server/tests/api/videos/video-channel-syncs.ts index 865b25f04..91291524d 100644 --- a/server/tests/api/videos/video-channel-syncs.ts +++ b/server/tests/api/videos/video-channel-syncs.ts | |||
@@ -220,7 +220,7 @@ describe('Test channel synchronizations', function () { | |||
220 | expect(total).to.equal(0) | 220 | expect(total).to.equal(0) |
221 | }) | 221 | }) |
222 | 222 | ||
223 | // FIXME: youtube-dl doesn't work when speicifying a port after the hostname | 223 | // FIXME: youtube-dl/yt-dlp doesn't work when speicifying a port after the hostname |
224 | // it('Should import a remote PeerTube channel', async function () { | 224 | // it('Should import a remote PeerTube channel', async function () { |
225 | // this.timeout(240_000) | 225 | // this.timeout(240_000) |
226 | 226 | ||