import { pipeline } from 'stream'
import { randomInt } from '@shared/core-utils'
import { ObjectStorageCommand } from '../server'
+import { terminateServer } from './utils'
export class MockObjectStorage {
private server: Server
)
})
- const port = 42301 + randomInt(1, 100)
+ const port = 44000 + randomInt(1, 1000)
this.server = app.listen(port, () => res(port))
})
}
terminate () {
- if (this.server) this.server.close()
+ return terminateServer(this.server)
}
}