netns test: remove strict dependency on clightning, electrs
This allows the netns test to be run with a reduced service set for debugging.
This commit is contained in:
parent
bae1b7f413
commit
9a931483b9
|
@ -259,15 +259,16 @@ def _():
|
||||||
assert_unreachable("bitcoind", ["btcpayserver", "spark-wallet", "lightning-loop"])
|
assert_unreachable("bitcoind", ["btcpayserver", "spark-wallet", "lightning-loop"])
|
||||||
assert_unreachable("btcpayserver", ["bitcoind", "lightning-loop", "liquidd"])
|
assert_unreachable("btcpayserver", ["bitcoind", "lightning-loop", "liquidd"])
|
||||||
|
|
||||||
# test that netns-exec can't be run for unauthorized namespace
|
# netns-exec should drop capabilities
|
||||||
machine.fail("netns-exec nb-electrs ip a")
|
|
||||||
|
|
||||||
# test that netns-exec drops capabilities
|
|
||||||
assert_full_match(
|
assert_full_match(
|
||||||
"su operator -c 'netns-exec nb-bitcoind capsh --print | grep Current '", "Current: =\n"
|
"su operator -c 'netns-exec nb-bitcoind capsh --print | grep Current '", "Current: =\n"
|
||||||
)
|
)
|
||||||
|
|
||||||
# test that netns-exec can not be executed by users that are not operator
|
if "clightning" in enabled_tests:
|
||||||
|
# netns-exec should fail for unauthorized namespaces
|
||||||
|
machine.fail("netns-exec nb-clightning ip a")
|
||||||
|
|
||||||
|
# netns-exec should only be executable by the operator user
|
||||||
machine.fail("sudo -u clightning netns-exec nb-bitcoind ip a")
|
machine.fail("sudo -u clightning netns-exec nb-bitcoind ip a")
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user