Skip to content

Commit

Permalink
rpcwhitelist: add feature test
Browse files Browse the repository at this point in the history
  • Loading branch information
nixbitcoin committed Jul 20, 2020
1 parent 88c7348 commit 8c36372
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/test-script.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,14 @@ def assert_running(unit):
assert_running("bitcoind")
machine.wait_until_succeeds("bitcoin-cli getnetworkinfo")
assert_matches("su operator -c 'bitcoin-cli getnetworkinfo' | jq", '"version"')
# Test RPC Whitelist
machine.wait_until_succeeds("su operator -c 'bitcoin-cli help'")
machine.fail(
"bitcoin-cli -rpcuser=publicrpc -rpcpassword=$(cat /secrets/bitcoin-rpcpassword-public) help"
)
machine.wait_until_succeeds(
log_has_string("bitcoind", "RPC User publicrpc not allowed to call method help")
)

assert_running("electrs")
machine.wait_for_open_port(4224) # prometeus metrics provider
Expand Down

0 comments on commit 8c36372

Please sign in to comment.