aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/search
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api/search')
-rw-r--r--server/tests/api/search/search-activitypub-video-channels.ts8
-rw-r--r--server/tests/api/search/search-channels.ts4
2 files changed, 5 insertions, 7 deletions
diff --git a/server/tests/api/search/search-activitypub-video-channels.ts b/server/tests/api/search/search-activitypub-video-channels.ts
index 3cba2b019..bcc21381c 100644
--- a/server/tests/api/search/search-activitypub-video-channels.ts
+++ b/server/tests/api/search/search-activitypub-video-channels.ts
@@ -4,13 +4,11 @@ import 'mocha'
4import * as chai from 'chai' 4import * as chai from 'chai'
5import { 5import {
6 cleanupTests, 6 cleanupTests,
7 createUser,
8 flushAndRunMultipleServers, 7 flushAndRunMultipleServers,
9 getVideoChannelVideos, 8 getVideoChannelVideos,
10 SearchCommand, 9 SearchCommand,
11 ServerInfo, 10 ServerInfo,
12 setAccessTokensToServers, 11 setAccessTokensToServers,
13 updateMyUser,
14 updateVideo, 12 updateVideo,
15 uploadVideo, 13 uploadVideo,
16 wait, 14 wait,
@@ -35,7 +33,7 @@ describe('Test ActivityPub video channels search', function () {
35 await setAccessTokensToServers(servers) 33 await setAccessTokensToServers(servers)
36 34
37 { 35 {
38 await createUser({ url: servers[0].url, accessToken: servers[0].accessToken, username: 'user1_server1', password: 'password' }) 36 await servers[0].usersCommand.create({ username: 'user1_server1', password: 'password' })
39 const channel = { 37 const channel = {
40 name: 'channel1_server1', 38 name: 'channel1_server1',
41 displayName: 'Channel 1 server 1' 39 displayName: 'Channel 1 server 1'
@@ -45,7 +43,7 @@ describe('Test ActivityPub video channels search', function () {
45 43
46 { 44 {
47 const user = { username: 'user1_server2', password: 'password' } 45 const user = { username: 'user1_server2', password: 'password' }
48 await createUser({ url: servers[1].url, accessToken: servers[1].accessToken, username: user.username, password: user.password }) 46 await servers[1].usersCommand.create({ username: user.username, password: user.password })
49 userServer2Token = await servers[1].loginCommand.getAccessToken(user) 47 userServer2Token = await servers[1].loginCommand.getAccessToken(user)
50 48
51 const channel = { 49 const channel = {
@@ -171,7 +169,7 @@ describe('Test ActivityPub video channels search', function () {
171 channelName: 'channel1_server2', 169 channelName: 'channel1_server2',
172 attributes: { displayName: 'channel updated' } 170 attributes: { displayName: 'channel updated' }
173 }) 171 })
174 await updateMyUser({ url: servers[1].url, accessToken: userServer2Token, displayName: 'user updated' }) 172 await servers[1].usersCommand.updateMe({ token: userServer2Token, displayName: 'user updated' })
175 173
176 await waitJobs(servers) 174 await waitJobs(servers)
177 // Expire video channel 175 // Expire video channel
diff --git a/server/tests/api/search/search-channels.ts b/server/tests/api/search/search-channels.ts
index 6c9ee73ce..4d2104708 100644
--- a/server/tests/api/search/search-channels.ts
+++ b/server/tests/api/search/search-channels.ts
@@ -2,7 +2,7 @@
2 2
3import 'mocha' 3import 'mocha'
4import * as chai from 'chai' 4import * as chai from 'chai'
5import { cleanupTests, createUser, flushAndRunServer, SearchCommand, ServerInfo, setAccessTokensToServers } from '@shared/extra-utils' 5import { cleanupTests, flushAndRunServer, SearchCommand, ServerInfo, setAccessTokensToServers } from '@shared/extra-utils'
6import { VideoChannel } from '@shared/models' 6import { VideoChannel } from '@shared/models'
7 7
8const expect = chai.expect 8const expect = chai.expect
@@ -19,7 +19,7 @@ describe('Test channels search', function () {
19 await setAccessTokensToServers([ server ]) 19 await setAccessTokensToServers([ server ])
20 20
21 { 21 {
22 await createUser({ url: server.url, accessToken: server.accessToken, username: 'user1', password: 'password' }) 22 await server.usersCommand.create({ username: 'user1', password: 'password' })
23 const channel = { 23 const channel = {
24 name: 'squall_channel', 24 name: 'squall_channel',
25 displayName: 'Squall channel' 25 displayName: 'Squall channel'