From c4cae29ef3d761ce809d6dfcd7c4b43af7200a57 Mon Sep 17 00:00:00 2001 From: Alex Potsides Date: Sat, 27 Mar 2021 12:15:35 +0000 Subject: [PATCH] chore: do not look up external IP during test (#906) The NAT manager test will throw if the current computer is behind a double NAT as at runtime it won't be possible to map external ports. We don't care about that during the test so configure a fake external IP so the test will still test the shut-down functionality on a computer that is behind a double NAT. --- test/nat-manager/nat-manager.node.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/nat-manager/nat-manager.node.js b/test/nat-manager/nat-manager.node.js index 557f266a..55acb0ba 100644 --- a/test/nat-manager/nat-manager.node.js +++ b/test/nat-manager/nat-manager.node.js @@ -268,7 +268,10 @@ describe('Nat Manager (TCP)', () => { natManager } = await createNatManager([ `/ip4/${addr}/tcp/0` - ]) + ], { + // so we don't try to look up the current computer's external address + externalIp: '184.12.31.4' + }) // use the actual nat manager client not the stub delete natManager._client