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.
This commit is contained in:
Alex Potsides 2021-03-27 12:15:35 +00:00 committed by GitHub
parent a7128f07ec
commit c4cae29ef3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -268,7 +268,10 @@ describe('Nat Manager (TCP)', () => {
natManager natManager
} = await createNatManager([ } = await createNatManager([
`/ip4/${addr}/tcp/0` `/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 // use the actual nat manager client not the stub
delete natManager._client delete natManager._client