diff options
author | Chocobozzz <me@florianbigard.com> | 2023-03-16 14:24:50 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2023-03-16 14:24:50 +0100 |
commit | 47d883de2efbc2e8b5f6f94ae18c15224cbe982b (patch) | |
tree | 7e89efd42cd7f70656ef9443d0f1e0ae1fc1a659 /server/tests/plugins | |
parent | 016b887802aebdb1bada121aa2102f0e0f6e0997 (diff) | |
parent | c3441b0320f632e22318261bcd614d10187de22d (diff) | |
download | PeerTube-47d883de2efbc2e8b5f6f94ae18c15224cbe982b.tar.gz PeerTube-47d883de2efbc2e8b5f6f94ae18c15224cbe982b.tar.zst PeerTube-47d883de2efbc2e8b5f6f94ae18c15224cbe982b.zip |
Merge branch 'release/5.1.0' into develop
Diffstat (limited to 'server/tests/plugins')
-rw-r--r-- | server/tests/plugins/action-hooks.ts | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/server/tests/plugins/action-hooks.ts b/server/tests/plugins/action-hooks.ts index a266ae7f1..98228f79d 100644 --- a/server/tests/plugins/action-hooks.ts +++ b/server/tests/plugins/action-hooks.ts | |||
@@ -4,6 +4,7 @@ import { ServerHookName, VideoPlaylistPrivacy, VideoPrivacy } from '@shared/mode | |||
4 | import { | 4 | import { |
5 | cleanupTests, | 5 | cleanupTests, |
6 | createMultipleServers, | 6 | createMultipleServers, |
7 | doubleFollow, | ||
7 | killallServers, | 8 | killallServers, |
8 | PeerTubeServer, | 9 | PeerTubeServer, |
9 | PluginsCommand, | 10 | PluginsCommand, |
@@ -36,6 +37,8 @@ describe('Test plugin action hooks', function () { | |||
36 | enabled: true | 37 | enabled: true |
37 | } | 38 | } |
38 | }) | 39 | }) |
40 | |||
41 | await doubleFollow(servers[0], servers[1]) | ||
39 | }) | 42 | }) |
40 | 43 | ||
41 | describe('Application hooks', function () { | 44 | describe('Application hooks', function () { |
@@ -231,6 +234,27 @@ describe('Test plugin action hooks', function () { | |||
231 | }) | 234 | }) |
232 | }) | 235 | }) |
233 | 236 | ||
237 | describe('Activity Pub hooks', function () { | ||
238 | let videoUUID: string | ||
239 | |||
240 | it('Should run action:activity-pub.remote-video.created', async function () { | ||
241 | this.timeout(30000) | ||
242 | |||
243 | const { uuid } = await servers[1].videos.quickUpload({ name: 'remote video' }) | ||
244 | videoUUID = uuid | ||
245 | |||
246 | await servers[0].servers.waitUntilLog('action:activity-pub.remote-video.created - AP remote video - video remote video') | ||
247 | }) | ||
248 | |||
249 | it('Should run action:activity-pub.remote-video.updated', async function () { | ||
250 | this.timeout(30000) | ||
251 | |||
252 | await servers[1].videos.update({ id: videoUUID, attributes: { name: 'remote video updated' } }) | ||
253 | |||
254 | await servers[0].servers.waitUntilLog('action:activity-pub.remote-video.updated - AP remote video - video remote video') | ||
255 | }) | ||
256 | }) | ||
257 | |||
234 | after(async function () { | 258 | after(async function () { |
235 | await cleanupTests(servers) | 259 | await cleanupTests(servers) |
236 | }) | 260 | }) |