From df091b9b509f0b10e4315c0bfa2da0cc0c31c22f Mon Sep 17 00:00:00 2001 From: Amiti Uttarwar Date: Wed, 12 Aug 2020 15:50:19 -0700 Subject: [PATCH] [refactor] Rename test file to allow any getpeerinfo deprecations. Simple rename/restructure to allow for upcoming test additions. --- ...e_deprecation.py => rpc_getpeerinfo_deprecation.py} | 10 ++++++---- test/functional/test_runner.py | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) rename test/functional/{rpc_getpeerinfo_banscore_deprecation.py => rpc_getpeerinfo_deprecation.py} (76%) diff --git a/test/functional/rpc_getpeerinfo_banscore_deprecation.py b/test/functional/rpc_getpeerinfo_deprecation.py similarity index 76% rename from test/functional/rpc_getpeerinfo_banscore_deprecation.py rename to test/functional/rpc_getpeerinfo_deprecation.py index b830248e1e..a4c2f7ccf8 100755 --- a/test/functional/rpc_getpeerinfo_banscore_deprecation.py +++ b/test/functional/rpc_getpeerinfo_deprecation.py @@ -2,23 +2,25 @@ # Copyright (c) 2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. -"""Test deprecation of getpeerinfo RPC banscore field.""" +"""Test deprecation of getpeerinfo RPC fields.""" from test_framework.test_framework import BitcoinTestFramework -class GetpeerinfoBanscoreDeprecationTest(BitcoinTestFramework): +class GetpeerinfoDeprecationTest(BitcoinTestFramework): def set_test_params(self): self.num_nodes = 2 self.extra_args = [[], ["-deprecatedrpc=banscore"]] def run_test(self): + self.test_banscore_deprecation() + + def test_banscore_deprecation(self): self.log.info("Test getpeerinfo by default no longer returns a banscore field") assert "banscore" not in self.nodes[0].getpeerinfo()[0].keys() self.log.info("Test getpeerinfo returns banscore with -deprecatedrpc=banscore") assert "banscore" in self.nodes[1].getpeerinfo()[0].keys() - if __name__ == "__main__": - GetpeerinfoBanscoreDeprecationTest().main() + GetpeerinfoDeprecationTest().main() diff --git a/test/functional/test_runner.py b/test/functional/test_runner.py index 6c3d50df93..c8cf173d5f 100755 --- a/test/functional/test_runner.py +++ b/test/functional/test_runner.py @@ -251,7 +251,7 @@ 'feature_config_args.py', 'feature_settings.py', 'rpc_getdescriptorinfo.py', - 'rpc_getpeerinfo_banscore_deprecation.py', + 'rpc_getpeerinfo_deprecation.py', 'rpc_help.py', 'feature_help.py', 'feature_shutdown.py',