From a5cd3dd15c518bc13322dbfbc7f461862232112a Mon Sep 17 00:00:00 2001 From: TERRIER Bastien Date: Wed, 12 Jun 2019 14:28:40 +0200 Subject: [PATCH] fix: app.close() afterAll e2e tests (#229) --- src/controllers/application.controller.e2e.spec.ts | 4 ++++ src/controllers/cron.controller.e2e.spec.ts | 4 ++++ src/controllers/documentation.controller.e2e.spec.ts | 4 ++++ src/remote-config/utils.e2e.spec.ts | 4 ++++ src/webhook/webhook.interceptor.e2e.spec.ts | 4 ++++ src/webhook/whiteList.interceptor.e2e.spec.ts | 4 ++++ 6 files changed, 24 insertions(+) diff --git a/src/controllers/application.controller.e2e.spec.ts b/src/controllers/application.controller.e2e.spec.ts index 1e050a3a..cec8d1a5 100644 --- a/src/controllers/application.controller.e2e.spec.ts +++ b/src/controllers/application.controller.e2e.spec.ts @@ -31,4 +31,8 @@ describe('ApplicationController (e2e)', () => { '

Have a look at our documentation for more informations.

', ); }); + + afterAll(async () => { + await app.close(); + }); }); diff --git a/src/controllers/cron.controller.e2e.spec.ts b/src/controllers/cron.controller.e2e.spec.ts index 16f96ebc..ef835201 100644 --- a/src/controllers/cron.controller.e2e.spec.ts +++ b/src/controllers/cron.controller.e2e.spec.ts @@ -20,4 +20,8 @@ describe('CronController', () => { .post('/cron') .expect(HttpStatus.PRECONDITION_FAILED); }); + + afterAll(async () => { + await app.close(); + }); }); diff --git a/src/controllers/documentation.controller.e2e.spec.ts b/src/controllers/documentation.controller.e2e.spec.ts index 11f9fb74..c8909213 100644 --- a/src/controllers/documentation.controller.e2e.spec.ts +++ b/src/controllers/documentation.controller.e2e.spec.ts @@ -38,4 +38,8 @@ describe('/doc (e2e)', () => { .get('/doc/schema') .expect(200); }); + + afterAll(async () => { + await app.close(); + }); }); diff --git a/src/remote-config/utils.e2e.spec.ts b/src/remote-config/utils.e2e.spec.ts index b22a7ce0..240adf53 100644 --- a/src/remote-config/utils.e2e.spec.ts +++ b/src/remote-config/utils.e2e.spec.ts @@ -28,4 +28,8 @@ describe('getAppRules (e2e)', () => { }) .expect(200); }); + + afterAll(async () => { + await app.close(); + }); }); diff --git a/src/webhook/webhook.interceptor.e2e.spec.ts b/src/webhook/webhook.interceptor.e2e.spec.ts index da45b9cb..a1447c88 100644 --- a/src/webhook/webhook.interceptor.e2e.spec.ts +++ b/src/webhook/webhook.interceptor.e2e.spec.ts @@ -25,4 +25,8 @@ describe('/webhook (POST) - In WhiteList', () => { .post('/webhook') .expect(HttpStatus.PRECONDITION_FAILED); }); + + afterAll(async () => { + await app.close(); + }); }); diff --git a/src/webhook/whiteList.interceptor.e2e.spec.ts b/src/webhook/whiteList.interceptor.e2e.spec.ts index ecec3368..a017f9bc 100644 --- a/src/webhook/whiteList.interceptor.e2e.spec.ts +++ b/src/webhook/whiteList.interceptor.e2e.spec.ts @@ -25,4 +25,8 @@ describe('/webhook (POST) - Not in WhiteList', () => { .post('/webhook') .expect(HttpStatus.UNAUTHORIZED); }); + + afterAll(async () => { + await app.close(); + }); });