diff options
author | Chocobozzz <me@florianbigard.com> | 2021-09-06 08:13:11 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-09-06 08:13:11 +0200 |
commit | 70430c2796b6c0455a863edc62760a3d45951fc5 (patch) | |
tree | 7620d5a8db0c9b6cbf5a11d1c794875402828789 /shared/extra-utils/mock-servers/mock-plugin-blocklist.ts | |
parent | 6d210220be0875d63461829d83c6e3a59d05cf7a (diff) | |
download | PeerTube-70430c2796b6c0455a863edc62760a3d45951fc5.tar.gz PeerTube-70430c2796b6c0455a863edc62760a3d45951fc5.tar.zst PeerTube-70430c2796b6c0455a863edc62760a3d45951fc5.zip |
Wait mock server termination
Diffstat (limited to 'shared/extra-utils/mock-servers/mock-plugin-blocklist.ts')
-rw-r--r-- | shared/extra-utils/mock-servers/mock-plugin-blocklist.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/shared/extra-utils/mock-servers/mock-plugin-blocklist.ts b/shared/extra-utils/mock-servers/mock-plugin-blocklist.ts index 6f66bf4f0..6a71532b5 100644 --- a/shared/extra-utils/mock-servers/mock-plugin-blocklist.ts +++ b/shared/extra-utils/mock-servers/mock-plugin-blocklist.ts | |||
@@ -1,6 +1,7 @@ | |||
1 | import express, { Request, Response } from 'express' | 1 | import express, { Request, Response } from 'express' |
2 | import { Server } from 'http' | 2 | import { Server } from 'http' |
3 | import { randomInt } from '@shared/core-utils' | 3 | import { randomInt } from '@shared/core-utils' |
4 | import { terminateServer } from './utils' | ||
4 | 5 | ||
5 | type BlocklistResponse = { | 6 | type BlocklistResponse = { |
6 | data: { | 7 | data: { |
@@ -32,6 +33,6 @@ export class MockBlocklist { | |||
32 | } | 33 | } |
33 | 34 | ||
34 | terminate () { | 35 | terminate () { |
35 | if (this.server) this.server.close() | 36 | return terminateServer(this.server) |
36 | } | 37 | } |
37 | } | 38 | } |