diff options
author | Chocobozzz <me@florianbigard.com> | 2018-09-11 16:27:07 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-09-13 14:05:49 +0200 |
commit | c48e82b5e0478434de30626d14594a97f2402e7c (patch) | |
tree | a78e5272bd0fe4f5b41831e571e02d05f1515b82 /server/tests/utils | |
parent | a651038487faa838bda3ce04695b08bc65baff70 (diff) | |
download | PeerTube-c48e82b5e0478434de30626d14594a97f2402e7c.tar.gz PeerTube-c48e82b5e0478434de30626d14594a97f2402e7c.tar.zst PeerTube-c48e82b5e0478434de30626d14594a97f2402e7c.zip |
Basic video redundancy implementation
Diffstat (limited to 'server/tests/utils')
-rw-r--r-- | server/tests/utils/server/follows.ts | 1 | ||||
-rw-r--r-- | server/tests/utils/server/redundancy.ts | 17 |
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 @@ | |||
1 | import * as request from 'supertest' | 1 | import * as request from 'supertest' |
2 | import { wait } from '../miscs/miscs' | ||
3 | import { ServerInfo } from './servers' | 2 | import { ServerInfo } from './servers' |
4 | import { waitJobs } from './jobs' | 3 | import { 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 @@ | |||
1 | import { makePutBodyRequest } from '../requests/requests' | ||
2 | |||
3 | async 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 | |||
15 | export { | ||
16 | updateRedundancy | ||
17 | } | ||