Skip to content

Commit d21261c

Browse files
ci: Fix running Test Suite
ci: Fix running Test Suite
2 parents e748408 + b871368 commit d21261c

File tree

6 files changed

+12
-8
lines changed

6 files changed

+12
-8
lines changed

.github/workflows/test-e2e.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ jobs:
2828
- 8883:8883
2929
# - 8084:8084 // this port is already used?
3030
- 18083:18083
31+
mongodb:
32+
image: mongo
33+
ports:
34+
- 27017:27017
3135
steps:
3236
- uses: actions/checkout@v2
3337

src/implementation/Client/DaprClient.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export default class DaprClient {
5858

5959
// Validation on port
6060
if (!/^[0-9]+$/.test(this.daprPort)) {
61-
throw new Error('DAPR_CLIENT_INCORRECT_PORT');
61+
throw new Error('DAPR_INCORRECT_SIDECAR_PORT');
6262
}
6363

6464
// Builder

src/implementation/Client/HTTPClient/HTTPClient.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import fetch from "node-fetch";
22
import { CommunicationProtocolEnum } from "../../..";
33
import IClient from "../../../interfaces/Client/IClient";
4-
import http from "node:http";
5-
import https from "node:https";
4+
import http from "http";
5+
import https from "https";
66
import { DaprClientOptions } from "../../../types/DaprClientOptions";
77

88
export default class HTTPClient implements IClient {

src/implementation/Server/DaprServer.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@ export default class DaprServer {
5858

5959
// Validation on port
6060
if (!/^[0-9]+$/.test(this.serverPort)) {
61-
throw new Error('DAPR_SERVER_INCORRECT_SERVER_PORT');
61+
throw new Error('DAPR_INCORRECT_SERVER_PORT');
6262
}
6363

6464
if (!/^[0-9]+$/.test(this.daprPort)) {
65-
throw new Error('DAPR_SERVER_INCORRECT_SIDECAR_PORT');
65+
throw new Error('DAPR_INCORRECT_SIDECAR_PORT');
6666
}
6767

6868
// Builder

test/unit/main/DaprClient.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ describe('DaprClient', () => {
1515
const client = new DaprClient(host, host);
1616
} catch (e) {
1717
const msg = (e as Error).message;
18-
expect(msg).toEqual("DAPR_CLIENT_INCORRECT_PORT");
18+
expect(msg).toEqual("DAPR_INCORRECT_SIDECAR_PORT");
1919
}
2020
});
2121
});

test/unit/main/DaprServer.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ describe('DaprServer', () => {
1515
const server = new DaprServer(host, host);
1616
} catch (e) {
1717
const msg = (e as Error).message;
18-
expect(msg).toEqual("DAPR_SERVER_INCORRECT_SERVER_PORT");
18+
expect(msg).toEqual("DAPR_INCORRECT_SERVER_PORT");
1919
}
2020
});
2121

@@ -24,7 +24,7 @@ describe('DaprServer', () => {
2424
const server = new DaprServer(host, port, host, host);
2525
} catch (e) {
2626
const msg = (e as Error).message;
27-
expect(msg).toEqual("DAPR_SERVER_INCORRECT_SIDECAR_PORT");
27+
expect(msg).toEqual("DAPR_INCORRECT_SIDECAR_PORT");
2828
}
2929
});
3030
});

0 commit comments

Comments
 (0)