diff options
author | Chocobozzz <me@florianbigard.com> | 2021-07-07 11:51:09 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-07-20 15:27:17 +0200 |
commit | 65e6e2602c0d5521f3a6740f7469bb92830ecb53 (patch) | |
tree | f89024ffff1dafb0281ee2fe028e89b95101bd44 /server/tests/api/check-params/search.ts | |
parent | bc8090411ddaa8d742ce4de3c83f9dba7bc18e2a (diff) | |
download | PeerTube-65e6e2602c0d5521f3a6740f7469bb92830ecb53.tar.gz PeerTube-65e6e2602c0d5521f3a6740f7469bb92830ecb53.tar.zst PeerTube-65e6e2602c0d5521f3a6740f7469bb92830ecb53.zip |
Introduce config command
Diffstat (limited to 'server/tests/api/check-params/search.ts')
-rw-r--r-- | server/tests/api/check-params/search.ts | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/server/tests/api/check-params/search.ts b/server/tests/api/check-params/search.ts index 20ad46cff..4a2fc1197 100644 --- a/server/tests/api/check-params/search.ts +++ b/server/tests/api/check-params/search.ts | |||
@@ -1,28 +1,27 @@ | |||
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 'mocha' | 3 | import 'mocha' |
4 | import { HttpStatusCode } from '@shared/core-utils' | ||
4 | import { | 5 | import { |
6 | checkBadCountPagination, | ||
7 | checkBadSortPagination, | ||
8 | checkBadStartPagination, | ||
5 | cleanupTests, | 9 | cleanupTests, |
6 | flushAndRunServer, | 10 | flushAndRunServer, |
7 | immutableAssign, | 11 | immutableAssign, |
8 | makeGetRequest, | 12 | makeGetRequest, |
9 | ServerInfo, | 13 | ServerInfo, |
10 | updateCustomSubConfig, | ||
11 | setAccessTokensToServers | 14 | setAccessTokensToServers |
12 | } from '../../../../shared/extra-utils' | 15 | } from '@shared/extra-utils' |
13 | import { | ||
14 | checkBadCountPagination, | ||
15 | checkBadSortPagination, | ||
16 | checkBadStartPagination | ||
17 | } from '../../../../shared/extra-utils/requests/check-api-params' | ||
18 | import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes' | ||
19 | 16 | ||
20 | function updateSearchIndex (server: ServerInfo, enabled: boolean, disableLocalSearch = false) { | 17 | function updateSearchIndex (server: ServerInfo, enabled: boolean, disableLocalSearch = false) { |
21 | return updateCustomSubConfig(server.url, server.accessToken, { | 18 | return server.configCommand.updateCustomSubConfig({ |
22 | search: { | 19 | newConfig: { |
23 | searchIndex: { | 20 | search: { |
24 | enabled, | 21 | searchIndex: { |
25 | disableLocalSearch | 22 | enabled, |
23 | disableLocalSearch | ||
24 | } | ||
26 | } | 25 | } |
27 | } | 26 | } |
28 | }) | 27 | }) |