Skip to content

Commit f25b580

Browse files
committed
Revert "ci(test): which platform/archs break with localhost over 127.0.0.1"
This reverts commit 776d2d5.
1 parent 0cf9b27 commit f25b580

File tree

4 files changed

+13
-4
lines changed

4 files changed

+13
-4
lines changed

.github/workflows/node.js.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,13 @@ jobs:
3333
uses: actions/setup-node@v3
3434
with:
3535
node-version: ${{ matrix.node-version }}
36+
# - run: | # https://github.com/nodejs/node-gyp/blob/main/docs/Updating-npm-bundled-node-gyp.md
37+
# npm -v
38+
# npm explore npm/node_modules/@npmcli/run-script -g -- npm_config_global=false npm install node-gyp@latest
39+
# if: matrix.node-version == '15' && runner.os == 'MacOS'
40+
# - run: |
41+
# npm -v
42+
# where node
43+
# cd "C:\\Program Files\nodejs\\"
44+
# npm install node-gyp@latest
3645
- run: ./scripts/ci/test.sh

consumer/orderClient.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const request = require("superagent");
22
const { Order } = require("./order");
33

4-
const hostname = "localhost"
4+
const hostname = "127.0.0.1"
55

66
const fetchOrders = () => {
77
return request.get(`http://${hostname}:${process.env.API_PORT}/orders`).then(

pact.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const provider = new Pact({
1616
logLevel: "info",
1717
consumer: consumerName,
1818
provider: providerName,
19-
host: "localhost"
19+
host: "127.0.0.1"
2020
});
2121

2222
// used to kill any left over mock server instances in case of errors

provider/provider.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ let port;
88
let opts;
99
let app;
1010

11-
const hostname = "localhost"
11+
const hostname = "127.0.0.1"
1212

1313
// Verify that the provider meets all consumer expectations
1414
describe("Pact Verification", () => {
@@ -94,7 +94,7 @@ describe("Pact Verification", () => {
9494
}
9595
}
9696

97-
app = server.listen('3000', 'localhost', () => {
97+
app = server.listen('3000', '127.0.0.1', () => {
9898
console.log(`Provider service listening on http://localhost:${port}`);
9999
});
100100
});

0 commit comments

Comments
 (0)