Skip to content

Commit 4578d66

Browse files
committed
Include interface for connection manager
1 parent 6ba15fe commit 4578d66

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ node_modules/
22
dist/
33
.tmp
44
logs/
5-
src/Contexts/Mooc/Courses/infrastructure/courses.*
5+
src/Contexts/Mooc/Courses/infrastructure/persistence/courses.*
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export interface ConnectionManager {
2+
connect(): Promise<void>;
3+
close(): Promise<void>;
4+
}

tests/apps/mooc_backend/features/step_definitions/controller.steps.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { Given, Then, AfterAll } from 'cucumber';
33
import request from 'supertest';
44
import app from '../../../../../src/apps/mooc_backend/app';
55
import container from '../../../../../src/apps/mooc_backend/config/dependency-injection';
6+
import { ConnectionManager } from '../../../../../src/Contexts/Shared/infrastructure/persistence/ConnectionManager';
67

78
let _request: request.Test;
89
let _response: request.Response;
@@ -26,6 +27,6 @@ Then('the response should be empty', () => {
2627
});
2728

2829
AfterAll(async () => {
29-
const connectionManager = container.get('Mooc.ConnectionManager');
30+
const connectionManager: Promise<ConnectionManager> = container.get('Mooc.ConnectionManager');
3031
await (await connectionManager).close();
3132
});

0 commit comments

Comments
 (0)