diff options
Diffstat (limited to 'server/tests/api/check-params/metrics.ts')
-rw-r--r-- | server/tests/api/check-params/metrics.ts | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/server/tests/api/check-params/metrics.ts b/server/tests/api/check-params/metrics.ts index 25443401d..302bef4f5 100644 --- a/server/tests/api/check-params/metrics.ts +++ b/server/tests/api/check-params/metrics.ts | |||
@@ -38,6 +38,7 @@ describe('Test metrics API validators', function () { | |||
38 | fps: 30, | 38 | fps: 30, |
39 | resolutionChanges: 1, | 39 | resolutionChanges: 1, |
40 | errors: 2, | 40 | errors: 2, |
41 | p2pEnabled: true, | ||
41 | downloadedBytesP2P: 0, | 42 | downloadedBytesP2P: 0, |
42 | downloadedBytesHTTP: 0, | 43 | downloadedBytesHTTP: 0, |
43 | uploadedBytesP2P: 0, | 44 | uploadedBytesP2P: 0, |
@@ -145,7 +146,13 @@ describe('Test metrics API validators', function () { | |||
145 | }) | 146 | }) |
146 | }) | 147 | }) |
147 | 148 | ||
148 | it('Should fail with an invalid p2pEnabled', async function () { | 149 | it('Should fail with a missing/invalid p2pEnabled', async function () { |
150 | await makePostBodyRequest({ | ||
151 | url: server.url, | ||
152 | path, | ||
153 | fields: omit(baseParams, [ 'p2pEnabled' ]) | ||
154 | }) | ||
155 | |||
149 | await makePostBodyRequest({ | 156 | await makePostBodyRequest({ |
150 | url: server.url, | 157 | url: server.url, |
151 | path, | 158 | path, |
@@ -157,7 +164,7 @@ describe('Test metrics API validators', function () { | |||
157 | await makePostBodyRequest({ | 164 | await makePostBodyRequest({ |
158 | url: server.url, | 165 | url: server.url, |
159 | path, | 166 | path, |
160 | fields: { ...baseParams, totalPeers: 'toto' } | 167 | fields: { ...baseParams, p2pPeers: 'toto' } |
161 | }) | 168 | }) |
162 | }) | 169 | }) |
163 | 170 | ||