aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/utils
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/utils')
-rw-r--r--server/tests/utils/server/follows.ts1
-rw-r--r--server/tests/utils/server/redundancy.ts17
2 files changed, 17 insertions, 1 deletions
diff --git a/server/tests/utils/server/follows.ts b/server/tests/utils/server/follows.ts
index d21fb5e58..8a65a958b 100644
--- a/server/tests/utils/server/follows.ts
+++ b/server/tests/utils/server/follows.ts
@@ -1,5 +1,4 @@
1import * as request from 'supertest' 1import * as request from 'supertest'
2import { wait } from '../miscs/miscs'
3import { ServerInfo } from './servers' 2import { ServerInfo } from './servers'
4import { waitJobs } from './jobs' 3import { waitJobs } from './jobs'
5 4
diff --git a/server/tests/utils/server/redundancy.ts b/server/tests/utils/server/redundancy.ts
new file mode 100644
index 000000000..c39ff2c8b
--- /dev/null
+++ b/server/tests/utils/server/redundancy.ts
@@ -0,0 +1,17 @@
1import { makePutBodyRequest } from '../requests/requests'
2
3async function updateRedundancy (url: string, accessToken: string, host: string, redundancyAllowed: boolean, expectedStatus = 204) {
4 const path = '/api/v1/server/redundancy/' + host
5
6 return makePutBodyRequest({
7 url,
8 path,
9 token: accessToken,
10 fields: { redundancyAllowed },
11 statusCodeExpected: expectedStatus
12 })
13}
14
15export {
16 updateRedundancy
17}