Skip to content

Commit ad0eee5

Browse files
committed
Merge bitcoin/bitcoin#32139: test: remove strict restrictions on rpc_deprecated test
459807d test: remove strict restrictions on rpc_deprecated (Pol Espinasa) Pull request description: Removed the wallet restrictions for `rpc_deprecated.py` and added specific test case for the current deprecated rpc. `skip_test_if_missing_module` will skip the whole test when the wallet is missing, even if a part of the test is non-wallet related. This PR ensures that other tests not related to wallet can be ran and only this specific test will be skipped if there's no wallet For more context check bitcoin/bitcoin#31278 (comment) ACKs for top commit: maflcko: lgtm ACK 459807d rkrux: ACK 459807d Tree-SHA512: 922b0fafe8fb5bd88a677ce8be5c3fe2fdd4d0aadcd32cc11738a714cd6f765f07e7e7158c829f8338db0d46a15c030437a1ea09a3187c072bebebb4ca53ad85
2 parents 24d5033 + 459807d commit ad0eee5

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

test/functional/rpc_deprecated.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@ def set_test_params(self):
1515
self.setup_clean_chain = True
1616
self.extra_args = [[]]
1717

18-
19-
def skip_test_if_missing_module(self):
20-
self.skip_if_no_wallet()
21-
2218
def run_test(self):
2319
# This test should be used to verify the errors of the currently
2420
# deprecated RPC methods (without the -deprecatedrpc flag) until
@@ -31,8 +27,14 @@ def run_test(self):
3127
# at least one other functional test that still tests the RPCs
3228
# functionality using the respective -deprecatedrpc flag.
3329

34-
self.log.info("Test settxfee RPC")
35-
assert_raises_rpc_error(-32, 'settxfee is deprecated and will be fully removed in v31.0.', self.nodes[0].rpc.settxfee, 0.01)
30+
# Please don't delete nor modify this comment
31+
self.log.info("Tests for deprecated RPC methods (if any)")
32+
33+
if self.is_wallet_compiled():
34+
self.log.info("Tests for deprecated wallet-related RPC methods (if any)")
35+
self.log.info("Test settxfee RPC deprecation")
36+
self.nodes[0].createwallet("settxfeerpc")
37+
assert_raises_rpc_error(-32, 'settxfee is deprecated and will be fully removed in v31.0.', self.nodes[0].rpc.settxfee, 0.01)
3638

3739
if __name__ == '__main__':
3840
DeprecatedRpcTest(__file__).main()

0 commit comments

Comments
 (0)