mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
check http server setup before start
This commit is contained in:
parent
255d3c3abc
commit
8880af1428
2 changed files with 7 additions and 1 deletions
|
@ -607,3 +607,9 @@ test('registers onRequest interceptor several times', async () => {
|
|||
doRegister();
|
||||
expect(doRegister).not.toThrowError();
|
||||
});
|
||||
|
||||
test('throws an error if starts without set up', async () => {
|
||||
await expect(server.start(config)).rejects.toThrowErrorMatchingInlineSnapshot(
|
||||
`"Http server is not setup up yet"`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -92,7 +92,7 @@ export class HttpServer {
|
|||
|
||||
public async start(config: HttpConfig) {
|
||||
if (this.server === undefined) {
|
||||
throw new Error('server is not setup up yet');
|
||||
throw new Error('Http server is not setup up yet');
|
||||
}
|
||||
this.log.debug('starting http server');
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue