Skip to content

Commit

Permalink
Fix HTTP status error unit test for Kibana 7.16 (#4734)
Browse files Browse the repository at this point in the history
Fix HttpServer configuration parameters
  • Loading branch information
asteriscos authored Oct 24, 2022
1 parent af92d95 commit a5da0a8
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion server/routes/wazuh-api-http-status.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ import {
} from '../../common/constants';
import { execSync } from 'child_process';
import fs from 'fs';
import moment from 'moment';
import { of } from 'rxjs';

const loggingService = loggingSystemMock.create();
const logger = loggingService.get();
Expand Down Expand Up @@ -52,8 +54,12 @@ beforeAll(async () => {
allowFromAnyIp: true,
ipAllowlist: [],
},
cors: {
enabled: false,
},
shutdownTimeout: moment.duration(500, 'ms'),
} as any;
server = new HttpServer(loggingService, 'tests');
server = new HttpServer(loggingService, 'tests', of(config.shutdownTimeout));
const router = new Router('', logger, enhanceWithContext);
const { registerRouter, server: innerServerTest, ...rest } = await server.setup(config);
innerServer = innerServerTest;
Expand Down

0 comments on commit a5da0a8

Please sign in to comment.