diff options
author | Chocobozzz <me@florianbigard.com> | 2023-04-21 15:00:01 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2023-05-09 08:57:34 +0200 |
commit | d102de1b38f2877463529c3b27bd35ffef4fd8bf (patch) | |
tree | 31fa0bdf26ad7a2ee46d600d804a6f03260266c8 /server/tests/api/activitypub/fetch.ts | |
parent | 2fe978744e5b74eb824e4d79c1bb9b840169f125 (diff) | |
download | PeerTube-d102de1b38f2877463529c3b27bd35ffef4fd8bf.tar.gz PeerTube-d102de1b38f2877463529c3b27bd35ffef4fd8bf.tar.zst PeerTube-d102de1b38f2877463529c3b27bd35ffef4fd8bf.zip |
Add runner server tests
Diffstat (limited to 'server/tests/api/activitypub/fetch.ts')
-rw-r--r-- | server/tests/api/activitypub/fetch.ts | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/server/tests/api/activitypub/fetch.ts b/server/tests/api/activitypub/fetch.ts index f0caea507..3899a6a49 100644 --- a/server/tests/api/activitypub/fetch.ts +++ b/server/tests/api/activitypub/fetch.ts | |||
@@ -1,6 +1,7 @@ | |||
1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ | 1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ |
2 | 2 | ||
3 | import { expect } from 'chai' | 3 | import { expect } from 'chai' |
4 | import { SQLCommand } from '@server/tests/shared' | ||
4 | import { | 5 | import { |
5 | cleanupTests, | 6 | cleanupTests, |
6 | createMultipleServers, | 7 | createMultipleServers, |
@@ -12,6 +13,7 @@ import { | |||
12 | 13 | ||
13 | describe('Test ActivityPub fetcher', function () { | 14 | describe('Test ActivityPub fetcher', function () { |
14 | let servers: PeerTubeServer[] | 15 | let servers: PeerTubeServer[] |
16 | let sqlCommandServer1: SQLCommand | ||
15 | 17 | ||
16 | // --------------------------------------------------------------- | 18 | // --------------------------------------------------------------- |
17 | 19 | ||
@@ -34,15 +36,17 @@ describe('Test ActivityPub fetcher', function () { | |||
34 | const { uuid } = await servers[0].videos.upload({ attributes: { name: 'bad video root' } }) | 36 | const { uuid } = await servers[0].videos.upload({ attributes: { name: 'bad video root' } }) |
35 | await servers[0].videos.upload({ token: userAccessToken, attributes: { name: 'video user' } }) | 37 | await servers[0].videos.upload({ token: userAccessToken, attributes: { name: 'video user' } }) |
36 | 38 | ||
39 | sqlCommandServer1 = new SQLCommand(servers[0]) | ||
40 | |||
37 | { | 41 | { |
38 | const to = servers[0].url + '/accounts/user1' | 42 | const to = servers[0].url + '/accounts/user1' |
39 | const value = servers[1].url + '/accounts/user1' | 43 | const value = servers[1].url + '/accounts/user1' |
40 | await servers[0].sql.setActorField(to, 'url', value) | 44 | await sqlCommandServer1.setActorField(to, 'url', value) |
41 | } | 45 | } |
42 | 46 | ||
43 | { | 47 | { |
44 | const value = servers[2].url + '/videos/watch/' + uuid | 48 | const value = servers[2].url + '/videos/watch/' + uuid |
45 | await servers[0].sql.setVideoField(uuid, 'url', value) | 49 | await sqlCommandServer1.setVideoField(uuid, 'url', value) |
46 | } | 50 | } |
47 | }) | 51 | }) |
48 | 52 | ||
@@ -72,6 +76,7 @@ describe('Test ActivityPub fetcher', function () { | |||
72 | after(async function () { | 76 | after(async function () { |
73 | this.timeout(20000) | 77 | this.timeout(20000) |
74 | 78 | ||
79 | await sqlCommandServer1.cleanup() | ||
75 | await cleanupTests(servers) | 80 | await cleanupTests(servers) |
76 | }) | 81 | }) |
77 | }) | 82 | }) |