mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-04 00:26:05 +00:00
Modify healthcheck.test
This commit is contained in:
@@ -1,11 +1,16 @@
|
|||||||
import { server } from '../src/app';
|
import { Server } from 'http';
|
||||||
|
import main from '../src';
|
||||||
import { describe, expect, it, beforeAll, afterAll } from '@jest/globals';
|
import { describe, expect, it, beforeAll, afterAll } from '@jest/globals';
|
||||||
import supertest from 'supertest';
|
import supertest from 'supertest';
|
||||||
import { setUpHealthEndpoint } from '../src/services/health';
|
import { setUpHealthEndpoint } from '../src/services/health';
|
||||||
|
|
||||||
const requestWithSupertest = supertest(server);
|
let requestWithSupertest: supertest.SuperTest<supertest.Test>;
|
||||||
|
let server: Server;
|
||||||
|
|
||||||
describe('Healthcheck endpoint', () => {
|
describe('Healthcheck endpoint', () => {
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
|
server = await main;
|
||||||
|
requestWithSupertest = supertest(server);
|
||||||
setUpHealthEndpoint(server);
|
setUpHealthEndpoint(server);
|
||||||
});
|
});
|
||||||
afterAll(async () => {
|
afterAll(async () => {
|
||||||
|
|||||||
@@ -169,6 +169,7 @@ const main = async () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
setUpHealthEndpoint(server);
|
setUpHealthEndpoint(server);
|
||||||
|
return server;
|
||||||
}
|
}
|
||||||
|
|
||||||
main();
|
export default main();
|
||||||
Reference in New Issue
Block a user