netns test: use netns ips from config

This commit is contained in:
Erik Arvstedt 2020-09-27 12:43:31 +02:00
parent ac95fe7c82
commit 5a565dff66
No known key found for this signature in database
GPG Key ID: 33312B944DD97846
2 changed files with 3 additions and 16 deletions

View File

@ -101,6 +101,7 @@ let testEnv = rec {
netns = {
imports = [ scenarios.secureNode ];
nix-bitcoin.netns-isolation.enable = true;
test.data.netns = config.nix-bitcoin.netns-isolation.netns;
tests.netns-isolation = true;
# This test is rather slow and unaffected by netns settings

View File

@ -319,23 +319,9 @@ def _():
if "netns-isolation" in enabled_tests:
netns_ips = {
"bitcoind": "169.254.1.12",
"clightning": "169.254.1.13",
"lnd": "169.254.1.14",
"liquidd": "169.254.1.15",
"electrs": "169.254.1.16",
"spark-wallet": "169.254.1.17",
"lightning-charge": "169.254.1.18",
"nanopos": "169.254.1.19",
"nginx": "169.254.1.21",
"lightning-loop": "169.254.1.22",
"nbxplorer": "169.254.1.23",
"btcpayserver": "169.254.1.24",
}
def ip(netns):
return netns_ips[netns]
def ip(name):
return test_data["netns"][name]["address"]
else: