Skip to content

Commit 459807d

Browse files
committed
test: remove strict restrictions on rpc_deprecated
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.
1 parent dfb7d58 commit 459807d

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)