Skip to content

Commit 51db25b

Browse files
committed
fix: proto file path for tests
1 parent 033054d commit 51db25b

File tree

4 files changed

+14
-8
lines changed

4 files changed

+14
-8
lines changed

cfg/config_test.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
"events": {
5959
"kafka": {
6060
"provider": "kafka",
61-
"groupId": "restore-scheduling-srv",
61+
"groupId": "restore-scheduling-srv-test",
6262
"kafka": {
6363
"clientId": "restore-scheduling-srv",
6464
"brokers": [

test/grpc_acs.spec.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ const acsSubject = {
8585
};
8686
const acsEnv = 'true';
8787
let acsEnabled = true;
88-
let testSuffix = 'with ACS Enabled';
88+
let testSuffix = 'withACSEnabled';
8989

9090
interface MethodWithOutput {
9191
method: string;
@@ -145,7 +145,7 @@ const startACSGrpcMockServer = async (methodWithOutput: MethodWithOutput[]) => {
145145
};
146146
try {
147147
mockServerACS.addService(PROTO_PATH, PKG_NAME, SERVICE_NAME, implementations, {
148-
includeDirs: ['node_modules/@restorecommerce/protos/'],
148+
includeDirs: PROTO_ROOT ? [PROTO_ROOT] : [],
149149
keepCase: true,
150150
longs: String,
151151
enums: String,
@@ -160,7 +160,8 @@ const startACSGrpcMockServer = async (methodWithOutput: MethodWithOutput[]) => {
160160
return mockServerACS;
161161
};
162162

163-
const IDS_PROTO_PATH = 'io/restorecommerce/user.proto';
163+
const IDS_PROTO_PATH = './io/restorecommerce/user.proto';
164+
const IDS_PROTO_ROOT = './test/protos/'
164165
const IDS_PKG_NAME = 'io.restorecommerce.user';
165166
const IDS_SERVICE_NAME = 'UserService';
166167

@@ -179,7 +180,7 @@ const startIDSGrpcMockServer = async (methodWithOutput: MethodWithOutput[]) => {
179180
};
180181
try {
181182
mockServerIDS.addService(IDS_PROTO_PATH, IDS_PKG_NAME, IDS_SERVICE_NAME, implementations, {
182-
includeDirs: ['node_modules/@restorecommerce/protos/'],
183+
includeDirs: IDS_PROTO_ROOT ? [IDS_PROTO_ROOT] : [],
183184
keepCase: true,
184185
longs: String,
185186
enums: String,

test/kafka_acs.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ const acsSubject = {
7676
]
7777
};
7878
const acsEnv = 'true';
79-
let testSuffix = 'with ACS Enabled';
79+
let testSuffix = 'withACSEnabled';
8080

8181
interface MethodWithOutput {
8282
method: string;
@@ -122,7 +122,7 @@ const startACSGrpcMockServer = async (methodWithOutput: MethodWithOutput[]) => {
122122
};
123123
try {
124124
mockServerACS.addService(PROTO_PATH, PKG_NAME, SERVICE_NAME, implementations, {
125-
includeDirs: ['node_modules/@restorecommerce/protos/'],
125+
includeDirs: PROTO_ROOT ? [PROTO_ROOT] : [],
126126
keepCase: true,
127127
longs: String,
128128
enums: String,
@@ -157,7 +157,7 @@ const startIDSGrpcMockServer = async (methodWithOutput: MethodWithOutput[]) => {
157157
};
158158
try {
159159
mockServerIDS.addService(IDS_PROTO_PATH, IDS_PKG_NAME, IDS_SERVICE_NAME, implementations, {
160-
includeDirs: ['node_modules/@restorecommerce/protos/'],
160+
includeDirs: PROTO_ROOT ? [PROTO_ROOT] : [],
161161
keepCase: true,
162162
longs: String,
163163
enums: String,

tsconfig.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
{
22
"extends": "./node_modules/@restorecommerce/dev/tsconfig.json",
3+
"compilerOptions": {
4+
"sourceMap": true,
5+
"inlineSourceMap": false,
6+
"inlineSources": false
7+
},
38
"include": [
49
"./src/**/*.ts"
510
],

0 commit comments

Comments
 (0)