Skip to content

Commit ec3c1cc

Browse files
committed
fix: correct localhost-test resolving on linux machines
1 parent a9449bc commit ec3c1cc

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"prepublishOnly": "npm run build",
3939
"local-proxy": "node ./dist/run_locally.js",
4040
"test": "nyc cross-env NODE_OPTIONS=--insecure-http-parser mocha",
41-
"test:docker": "docker build --tag proxy-chain-tests --file test/Dockerfile . && docker run proxy-chain-tests",
41+
"test:docker": "docker build --tag proxy-chain-tests --file test/Dockerfile . && docker run --add-host localhost-test:127.0.0.1 proxy-chain-tests",
4242
"test:docker:all": "bash scripts/test-docker-all.sh",
4343
"lint": "eslint .",
4444
"lint:fix": "eslint . --fix"

scripts/test-docker-all.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
echo "Starting parallel Docker tests for Node 14, 16, and 18..."
44

55
# Run builds in parallel, capture PIDs.
6-
docker build --build-arg NODE_IMAGE=node:14.21.3-bullseye --tag proxy-chain-tests:node14 --file test/Dockerfile . && docker run proxy-chain-tests:node14 &
6+
docker build --build-arg NODE_IMAGE=node:14.21.3-bullseye --tag proxy-chain-tests:node14 --file test/Dockerfile . && docker run --add-host localhost-test:127.0.0.1 proxy-chain-tests:node14 &
77
pid14=$!
8-
docker build --build-arg NODE_IMAGE=node:16.20.2-bookworm --tag proxy-chain-tests:node16 --file test/Dockerfile . && docker run proxy-chain-tests:node16 &
8+
docker build --build-arg NODE_IMAGE=node:16.20.2-bookworm --tag proxy-chain-tests:node16 --file test/Dockerfile . && docker run --add-host localhost-test:127.0.0.1 proxy-chain-tests:node16 &
99
pid16=$!
10-
docker build --build-arg NODE_IMAGE=node:18.20.8-bookworm --tag proxy-chain-tests:node18 --file test/Dockerfile . && docker run proxy-chain-tests:node18 &
10+
docker build --build-arg NODE_IMAGE=node:18.20.8-bookworm --tag proxy-chain-tests:node18 --file test/Dockerfile . && docker run --add-host localhost-test:127.0.0.1 proxy-chain-tests:node18 &
1111
pid18=$!
1212

1313
# Wait for all and capture exit codes.

0 commit comments

Comments
 (0)