Skip to content

Commit

Permalink
Change ports for tests
Browse files Browse the repository at this point in the history
That seems to fix a timing issue.
  • Loading branch information
KristjanESPERANTO committed Sep 5, 2023
1 parent 8340fc4 commit e0b3b01
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion tests/configs/empty_ipWhiteList.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
* MIT Licensed.
*/
let config = {
ipWhitelist: []
ipWhitelist: [],
port: 8282
};

/*************** DO NOT EDIT THE LINE BELOW ***************/
Expand Down
3 changes: 2 additions & 1 deletion tests/configs/noIpWhiteList.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
* MIT Licensed.
*/
let config = require(`${process.cwd()}/tests/configs/default.js`).configFactory({
ipWhitelist: ["x.x.x.x"]
ipWhitelist: ["x.x.x.x"],
port: 8181
});

/*************** DO NOT EDIT THE LINE BELOW ***************/
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/ipWhitelist_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ describe("ipWhitelist directive configuration", () => {
});

it("should return 403", async () => {
const res = await fetch("http://localhost:8080");
const res = await fetch("http://localhost:8181");
expect(res.status).toBe(403);
});
});
Expand All @@ -25,7 +25,7 @@ describe("ipWhitelist directive configuration", () => {
});

it("should return 200", async () => {
const res = await fetch("http://localhost:8080");
const res = await fetch("http://localhost:8282");
expect(res.status).toBe(200);
});
});
Expand Down

0 comments on commit e0b3b01

Please sign in to comment.