From 5a565dff6607a26698c93e18e8218a02eb618565 Mon Sep 17 00:00:00 2001 From: Erik Arvstedt Date: Sun, 27 Sep 2020 12:43:31 +0200 Subject: [PATCH] netns test: use netns ips from config --- test/tests.nix | 1 + test/tests.py | 18 ++---------------- 2 files changed, 3 insertions(+), 16 deletions(-) diff --git a/test/tests.nix b/test/tests.nix index cd29bc0..3e90c0d 100644 --- a/test/tests.nix +++ b/test/tests.nix @@ -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 diff --git a/test/tests.py b/test/tests.py index be591a0..6d1f2e3 100644 --- a/test/tests.py +++ b/test/tests.py @@ -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: