netns-bitcoind: allow RPC access from main netns

This commit is contained in:
Erik Arvstedt
2020-10-29 21:21:27 +01:00
parent 0e2ff948d3
commit 58d24e735d
5 changed files with 14 additions and 26 deletions
+1 -1
View File
@@ -145,7 +145,7 @@ let testEnv = rec {
services.bitcoind.regtest = true;
systemd.services.bitcoind.postStart = mkAfter ''
cli=${config.services.bitcoind.cliBase}/bin/bitcoin-cli
cli=${config.services.bitcoind.cli}/bin/bitcoin-cli
address=$($cli getnewaddress)
$cli generatetoaddress 10 $address
'';
+5 -4
View File
@@ -259,10 +259,11 @@ def _():
assert_unreachable("bitcoind", ["btcpayserver", "spark-wallet", "lightning-loop"])
assert_unreachable("btcpayserver", ["bitcoind", "lightning-loop", "liquidd"])
# netns-exec should drop capabilities
assert_full_match(
"su operator -c 'netns-exec nb-bitcoind capsh --print | grep Current '", "Current: =\n"
)
if "joinmarket" in enabled_tests:
# netns-exec should drop capabilities
assert_full_match(
"su operator -c 'netns-exec nb-joinmarket capsh --print | grep Current'", "Current: =\n"
)
if "clightning" in enabled_tests:
# netns-exec should fail for unauthorized namespaces