]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - shared/extra-utils/mock-servers/mock-object-storage.ts
Wait mock server termination
[github/Chocobozzz/PeerTube.git] / shared / extra-utils / mock-servers / mock-object-storage.ts
index f1c5a612388136a4fdce3f06028a7b1bb2d703ef..b6071b2f2977364d42b3ee153a6a7ecb96a46d48 100644 (file)
@@ -4,6 +4,7 @@ import { Server } from 'http'
 import { pipeline } from 'stream'
 import { randomInt } from '@shared/core-utils'
 import { ObjectStorageCommand } from '../server'
+import { terminateServer } from './utils'
 
 export class MockObjectStorage {
   private server: Server
@@ -37,6 +38,6 @@ export class MockObjectStorage {
   }
 
   terminate () {
-    if (this.server) this.server.close()
+    return terminateServer(this.server)
   }
 }