aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/extra-utils/server
diff options
context:
space:
mode:
Diffstat (limited to 'shared/extra-utils/server')
-rw-r--r--shared/extra-utils/server/config.ts4
-rw-r--r--shared/extra-utils/server/follows.ts26
-rw-r--r--shared/extra-utils/server/servers.ts4
3 files changed, 22 insertions, 12 deletions
diff --git a/shared/extra-utils/server/config.ts b/shared/extra-utils/server/config.ts
index deb77e9c0..2b7965bc2 100644
--- a/shared/extra-utils/server/config.ts
+++ b/shared/extra-utils/server/config.ts
@@ -91,13 +91,15 @@ function updateCustomSubConfig (url: string, token: string, newConfig: any) {
91 transcoding: { 91 transcoding: {
92 enabled: true, 92 enabled: true,
93 allowAdditionalExtensions: true, 93 allowAdditionalExtensions: true,
94 allowAudioFiles: true,
94 threads: 1, 95 threads: 1,
95 resolutions: { 96 resolutions: {
96 '240p': false, 97 '240p': false,
97 '360p': true, 98 '360p': true,
98 '480p': true, 99 '480p': true,
99 '720p': false, 100 '720p': false,
100 '1080p': false 101 '1080p': false,
102 '2160p': false
101 }, 103 },
102 hls: { 104 hls: {
103 enabled: false 105 enabled: false
diff --git a/shared/extra-utils/server/follows.ts b/shared/extra-utils/server/follows.ts
index 1505804de..0379bb109 100644
--- a/shared/extra-utils/server/follows.ts
+++ b/shared/extra-utils/server/follows.ts
@@ -1,17 +1,21 @@
1import * as request from 'supertest' 1import * as request from 'supertest'
2import { ServerInfo } from './servers' 2import { ServerInfo } from './servers'
3import { waitJobs } from './jobs' 3import { waitJobs } from './jobs'
4import { makeGetRequest, makePostBodyRequest } from '..' 4import { makePostBodyRequest } from '../requests/requests'
5 5
6function getFollowersListPaginationAndSort (url: string, start: number, count: number, sort: string, search?: string) { 6function getFollowersListPaginationAndSort (url: string, start: number, count: number, sort: string, search?: string) {
7 const path = '/api/v1/server/followers' 7 const path = '/api/v1/server/followers'
8 8
9 const query = {
10 start,
11 count,
12 sort,
13 search
14 }
15
9 return request(url) 16 return request(url)
10 .get(path) 17 .get(path)
11 .query({ start }) 18 .query(query)
12 .query({ count })
13 .query({ sort })
14 .query({ search })
15 .set('Accept', 'application/json') 19 .set('Accept', 'application/json')
16 .expect(200) 20 .expect(200)
17 .expect('Content-Type', /json/) 21 .expect('Content-Type', /json/)
@@ -42,12 +46,16 @@ function rejectFollower (url: string, token: string, follower: string, statusCod
42function getFollowingListPaginationAndSort (url: string, start: number, count: number, sort: string, search?: string) { 46function getFollowingListPaginationAndSort (url: string, start: number, count: number, sort: string, search?: string) {
43 const path = '/api/v1/server/following' 47 const path = '/api/v1/server/following'
44 48
49 const query = {
50 start,
51 count,
52 sort,
53 search
54 }
55
45 return request(url) 56 return request(url)
46 .get(path) 57 .get(path)
47 .query({ start }) 58 .query(query)
48 .query({ count })
49 .query({ sort })
50 .query({ search })
51 .set('Accept', 'application/json') 59 .set('Accept', 'application/json')
52 .expect(200) 60 .expect(200)
53 .expect('Content-Type', /json/) 61 .expect('Content-Type', /json/)
diff --git a/shared/extra-utils/server/servers.ts b/shared/extra-utils/server/servers.ts
index ed41bfa48..4c7d6862a 100644
--- a/shared/extra-utils/server/servers.ts
+++ b/shared/extra-utils/server/servers.ts
@@ -246,7 +246,7 @@ async function checkTmpIsEmpty (server: ServerInfo) {
246} 246}
247 247
248async function checkDirectoryIsEmpty (server: ServerInfo, directory: string) { 248async function checkDirectoryIsEmpty (server: ServerInfo, directory: string) {
249 const testDirectory = 'test' + server.serverNumber 249 const testDirectory = 'test' + server.internalServerNumber
250 250
251 const directoryPath = join(root(), testDirectory, directory) 251 const directoryPath = join(root(), testDirectory, directory)
252 252
@@ -284,7 +284,7 @@ function cleanupTests (servers: ServerInfo[]) {
284} 284}
285 285
286async function waitUntilLog (server: ServerInfo, str: string, count = 1) { 286async function waitUntilLog (server: ServerInfo, str: string, count = 1) {
287 const logfile = join(root(), 'test' + server.serverNumber, 'logs/peertube.log') 287 const logfile = join(root(), 'test' + server.internalServerNumber, 'logs/peertube.log')
288 288
289 while (true) { 289 while (true) {
290 const buf = await readFile(logfile) 290 const buf = await readFile(logfile)