diff --git a/test/functional/rpc_whitelist.py b/test/functional/rpc_whitelist.py index a35c89fadd2..b103289fab3 100755 --- a/test/functional/rpc_whitelist.py +++ b/test/functional/rpc_whitelist.py @@ -33,6 +33,7 @@ class RPCWhitelistTest(BitcoinTestFramework): def set_test_params(self): self.num_nodes = 1 + self.supports_cli = False def run_test(self): # 0 => Username diff --git a/test/functional/wallet_encryption.py b/test/functional/wallet_encryption.py index 10f2c3c81d4..b54852b7c33 100755 --- a/test/functional/wallet_encryption.py +++ b/test/functional/wallet_encryption.py @@ -90,17 +90,18 @@ class WalletEncryptionTest(BitcoinTestFramework): assert_equal(actual_time, expected_time) self.nodes[0].walletlock() - # Test passphrase with null characters - passphrase_with_nulls = "Phrase\0With\0Nulls" - self.nodes[0].walletpassphrasechange(passphrase2, passphrase_with_nulls) - # walletpassphrasechange should not stop at null characters - assert_raises_rpc_error(-14, "wallet passphrase entered was incorrect", self.nodes[0].walletpassphrase, passphrase_with_nulls.partition("\0")[0], 10) - assert_raises_rpc_error(-14, "The wallet passphrase entered was incorrect", self.nodes[0].walletpassphrasechange, passphrase_with_nulls.partition("\0")[0], "abc") - assert_raises_rpc_error(-14, "wallet passphrase entered is incorrect. It contains a null character (ie - a zero byte)", self.nodes[0].walletpassphrase, passphrase_with_nulls + "\0", 10) - assert_raises_rpc_error(-14, "The old wallet passphrase entered is incorrect. It contains a null character (ie - a zero byte)", self.nodes[0].walletpassphrasechange, passphrase_with_nulls + "\0", "abc") - with WalletUnlock(self.nodes[0], passphrase_with_nulls): - sig = self.nodes[0].signmessage(address, msg) - assert self.nodes[0].verifymessage(address, sig, msg) + if not self.options.usecli: # can't be done with the test framework for cli since subprocess.Popen doesn't allow null characters + # Test passphrase with null characters + passphrase_with_nulls = "Phrase\0With\0Nulls" + self.nodes[0].walletpassphrasechange(passphrase2, passphrase_with_nulls) + # walletpassphrasechange should not stop at null characters + assert_raises_rpc_error(-14, "wallet passphrase entered was incorrect", self.nodes[0].walletpassphrase, passphrase_with_nulls.partition("\0")[0], 10) + assert_raises_rpc_error(-14, "The wallet passphrase entered was incorrect", self.nodes[0].walletpassphrasechange, passphrase_with_nulls.partition("\0")[0], "abc") + assert_raises_rpc_error(-14, "wallet passphrase entered is incorrect. It contains a null character (ie - a zero byte)", self.nodes[0].walletpassphrase, passphrase_with_nulls + "\0", 10) + assert_raises_rpc_error(-14, "The old wallet passphrase entered is incorrect. It contains a null character (ie - a zero byte)", self.nodes[0].walletpassphrasechange, passphrase_with_nulls + "\0", "abc") + with WalletUnlock(self.nodes[0], passphrase_with_nulls): + sig = self.nodes[0].signmessage(address, msg) + assert self.nodes[0].verifymessage(address, sig, msg) self.log.info("Test that wallets without private keys cannot be encrypted") self.nodes[0].createwallet(wallet_name="noprivs", disable_private_keys=True) diff --git a/test/functional/wallet_fundrawtransaction.py b/test/functional/wallet_fundrawtransaction.py index a3b19847335..2a0af8efe00 100755 --- a/test/functional/wallet_fundrawtransaction.py +++ b/test/functional/wallet_fundrawtransaction.py @@ -49,6 +49,7 @@ class RawTransactionsTest(BitcoinTestFramework): # whitelist peers to speed up tx relay / mempool sync self.noban_tx_relay = True self.rpc_timeout = 90 # to prevent timeouts in `test_transaction_too_large` + self.supports_cli = False def skip_test_if_missing_module(self): self.skip_if_no_wallet() diff --git a/test/functional/wallet_send.py b/test/functional/wallet_send.py index 067df43e50a..21761775c53 100755 --- a/test/functional/wallet_send.py +++ b/test/functional/wallet_send.py @@ -29,6 +29,7 @@ class WalletSendTest(BitcoinTestFramework): self.num_nodes = 2 # whitelist peers to speed up tx relay / mempool sync self.noban_tx_relay = True + self.supports_cli = False self.extra_args = [ ["-walletrbf=1"], ["-walletrbf=1"]