diff options
author | Chocobozzz <me@florianbigard.com> | 2021-07-16 10:42:24 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-07-20 15:27:18 +0200 |
commit | c0e8b12e7fd554ba4d2ceb0c4900804c6a4c63ea (patch) | |
tree | baf29753ac5d4598643e3bee719f8df0cc36c59d /server/tests/api/redundancy | |
parent | 08642a765ea514a00f159db898edf14c376fbe6c (diff) | |
download | PeerTube-c0e8b12e7fd554ba4d2ceb0c4900804c6a4c63ea.tar.gz PeerTube-c0e8b12e7fd554ba4d2ceb0c4900804c6a4c63ea.tar.zst PeerTube-c0e8b12e7fd554ba4d2ceb0c4900804c6a4c63ea.zip |
Refactor requests
Diffstat (limited to 'server/tests/api/redundancy')
-rw-r--r-- | server/tests/api/redundancy/redundancy-constraints.ts | 2 | ||||
-rw-r--r-- | server/tests/api/redundancy/redundancy.ts | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/server/tests/api/redundancy/redundancy-constraints.ts b/server/tests/api/redundancy/redundancy-constraints.ts index 217691fb6..71b93901e 100644 --- a/server/tests/api/redundancy/redundancy-constraints.ts +++ b/server/tests/api/redundancy/redundancy-constraints.ts | |||
@@ -117,7 +117,7 @@ describe('Test redundancy constraints', function () { | |||
117 | } | 117 | } |
118 | } | 118 | } |
119 | } | 119 | } |
120 | await await killallServers([ localServer ]) | 120 | await killallServers([ localServer ]) |
121 | await localServer.run(config) | 121 | await localServer.run(config) |
122 | 122 | ||
123 | await uploadWrapper('video 2 server 2') | 123 | await uploadWrapper('video 2 server 2') |
diff --git a/server/tests/api/redundancy/redundancy.ts b/server/tests/api/redundancy/redundancy.ts index 9d5d96efd..921a48856 100644 --- a/server/tests/api/redundancy/redundancy.ts +++ b/server/tests/api/redundancy/redundancy.ts | |||
@@ -5,7 +5,7 @@ import * as chai from 'chai' | |||
5 | import { readdir } from 'fs-extra' | 5 | import { readdir } from 'fs-extra' |
6 | import * as magnetUtil from 'magnet-uri' | 6 | import * as magnetUtil from 'magnet-uri' |
7 | import { join } from 'path' | 7 | import { join } from 'path' |
8 | import { HttpStatusCode } from '@shared/core-utils' | 8 | import { HttpStatusCode } from '@shared/models' |
9 | import { | 9 | import { |
10 | checkSegmentHash, | 10 | checkSegmentHash, |
11 | checkVideoFilesWereRemoved, | 11 | checkVideoFilesWereRemoved, |
@@ -129,13 +129,13 @@ async function check2Webseeds (videoUUID?: string) { | |||
129 | 129 | ||
130 | await makeGetRequest({ | 130 | await makeGetRequest({ |
131 | url: servers[0].url, | 131 | url: servers[0].url, |
132 | statusCodeExpected: HttpStatusCode.OK_200, | 132 | expectedStatus: HttpStatusCode.OK_200, |
133 | path: '/static/redundancy/' + `${videoUUID}-${file.resolution.id}.mp4`, | 133 | path: '/static/redundancy/' + `${videoUUID}-${file.resolution.id}.mp4`, |
134 | contentType: null | 134 | contentType: null |
135 | }) | 135 | }) |
136 | await makeGetRequest({ | 136 | await makeGetRequest({ |
137 | url: servers[1].url, | 137 | url: servers[1].url, |
138 | statusCodeExpected: HttpStatusCode.OK_200, | 138 | expectedStatus: HttpStatusCode.OK_200, |
139 | path: `/static/webseed/${videoUUID}-${file.resolution.id}.mp4`, | 139 | path: `/static/webseed/${videoUUID}-${file.resolution.id}.mp4`, |
140 | contentType: null | 140 | contentType: null |
141 | }) | 141 | }) |