Skip to content

Commit df091b9

Browse files
committed
[refactor] Rename test file to allow any getpeerinfo deprecations.
Simple rename/restructure to allow for upcoming test additions.
1 parent 395acfa commit df091b9

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

test/functional/rpc_getpeerinfo_banscore_deprecation.py renamed to test/functional/rpc_getpeerinfo_deprecation.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,25 @@
22
# Copyright (c) 2020 The Bitcoin Core developers
33
# Distributed under the MIT software license, see the accompanying
44
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
5-
"""Test deprecation of getpeerinfo RPC banscore field."""
5+
"""Test deprecation of getpeerinfo RPC fields."""
66

77
from test_framework.test_framework import BitcoinTestFramework
88

99

10-
class GetpeerinfoBanscoreDeprecationTest(BitcoinTestFramework):
10+
class GetpeerinfoDeprecationTest(BitcoinTestFramework):
1111
def set_test_params(self):
1212
self.num_nodes = 2
1313
self.extra_args = [[], ["-deprecatedrpc=banscore"]]
1414

1515
def run_test(self):
16+
self.test_banscore_deprecation()
17+
18+
def test_banscore_deprecation(self):
1619
self.log.info("Test getpeerinfo by default no longer returns a banscore field")
1720
assert "banscore" not in self.nodes[0].getpeerinfo()[0].keys()
1821

1922
self.log.info("Test getpeerinfo returns banscore with -deprecatedrpc=banscore")
2023
assert "banscore" in self.nodes[1].getpeerinfo()[0].keys()
2124

22-
2325
if __name__ == "__main__":
24-
GetpeerinfoBanscoreDeprecationTest().main()
26+
GetpeerinfoDeprecationTest().main()

test/functional/test_runner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@
251251
'feature_config_args.py',
252252
'feature_settings.py',
253253
'rpc_getdescriptorinfo.py',
254-
'rpc_getpeerinfo_banscore_deprecation.py',
254+
'rpc_getpeerinfo_deprecation.py',
255255
'rpc_help.py',
256256
'feature_help.py',
257257
'feature_shutdown.py',

0 commit comments

Comments
 (0)