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-object-storage.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-object-storage.ts')
-rw-r--r-- | shared/extra-utils/mock-servers/mock-object-storage.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/shared/extra-utils/mock-servers/mock-object-storage.ts b/shared/extra-utils/mock-servers/mock-object-storage.ts index f1c5a6123..b6071b2f2 100644 --- a/shared/extra-utils/mock-servers/mock-object-storage.ts +++ b/shared/extra-utils/mock-servers/mock-object-storage.ts | |||
@@ -4,6 +4,7 @@ import { Server } from 'http' | |||
4 | import { pipeline } from 'stream' | 4 | import { pipeline } from 'stream' |
5 | import { randomInt } from '@shared/core-utils' | 5 | import { randomInt } from '@shared/core-utils' |
6 | import { ObjectStorageCommand } from '../server' | 6 | import { ObjectStorageCommand } from '../server' |
7 | import { terminateServer } from './utils' | ||
7 | 8 | ||
8 | export class MockObjectStorage { | 9 | export class MockObjectStorage { |
9 | private server: Server | 10 | private server: Server |
@@ -37,6 +38,6 @@ export class MockObjectStorage { | |||
37 | } | 38 | } |
38 | 39 | ||
39 | terminate () { | 40 | terminate () { |
40 | if (this.server) this.server.close() | 41 | return terminateServer(this.server) |
41 | } | 42 | } |
42 | } | 43 | } |