aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/activitypub/fetch.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api/activitypub/fetch.ts')
-rw-r--r--server/tests/api/activitypub/fetch.ts9
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
3import { expect } from 'chai' 3import { expect } from 'chai'
4import { SQLCommand } from '@server/tests/shared'
4import { 5import {
5 cleanupTests, 6 cleanupTests,
6 createMultipleServers, 7 createMultipleServers,
@@ -12,6 +13,7 @@ import {
12 13
13describe('Test ActivityPub fetcher', function () { 14describe('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})