diff options
Diffstat (limited to 'shared/extra-utils/server')
-rw-r--r-- | shared/extra-utils/server/config.ts | 1 | ||||
-rw-r--r-- | shared/extra-utils/server/follows.ts | 26 | ||||
-rw-r--r-- | shared/extra-utils/server/servers.ts | 4 |
3 files changed, 20 insertions, 11 deletions
diff --git a/shared/extra-utils/server/config.ts b/shared/extra-utils/server/config.ts index deb77e9c0..a5f5989e0 100644 --- a/shared/extra-utils/server/config.ts +++ b/shared/extra-utils/server/config.ts | |||
@@ -91,6 +91,7 @@ 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, |
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 @@ | |||
1 | import * as request from 'supertest' | 1 | import * as request from 'supertest' |
2 | import { ServerInfo } from './servers' | 2 | import { ServerInfo } from './servers' |
3 | import { waitJobs } from './jobs' | 3 | import { waitJobs } from './jobs' |
4 | import { makeGetRequest, makePostBodyRequest } from '..' | 4 | import { makePostBodyRequest } from '../requests/requests' |
5 | 5 | ||
6 | function getFollowersListPaginationAndSort (url: string, start: number, count: number, sort: string, search?: string) { | 6 | function 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 | |||
42 | function getFollowingListPaginationAndSort (url: string, start: number, count: number, sort: string, search?: string) { | 46 | function 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 | ||
248 | async function checkDirectoryIsEmpty (server: ServerInfo, directory: string) { | 248 | async 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 | ||
286 | async function waitUntilLog (server: ServerInfo, str: string, count = 1) { | 286 | async 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) |