aboutsummaryrefslogtreecommitdiff
path: root/test/functional/feature_maxuploadtarget.py
diff options
context:
space:
mode:
authormerge-script <90386131+bitcoin-core-merge-script@users.noreply.github.com>2023-02-16 15:17:54 +0100
committermerge-script <90386131+bitcoin-core-merge-script@users.noreply.github.com>2023-02-16 15:17:54 +0100
commit437dfe1c26e752c280014a30f809e62c684ad99e (patch)
treebab64c12eedeb5b7ea7e9cb3e75d94c6908f8816 /test/functional/feature_maxuploadtarget.py
parent98042a0456931ce362949cc40b43d9637b2aa1b1 (diff)
parent7a83aa0982dbe1c5e89b904f636840cb2ef56357 (diff)
downloadbitcoin-437dfe1c26e752c280014a30f809e62c684ad99e.tar.xz
Merge bitcoin/bitcoin#26714: test: add coverage for unparsable `-maxuploadtarget`
7a83aa0982dbe1c5e89b904f636840cb2ef56357 test: add coverage for unparsable `-maxuploadtarget` (brunoerg) Pull request description: This PR adds test coverage for the following error: https://github.com/bitcoin/bitcoin/blob/7386da7a0b08cd2df8ba88dae1fab9d36424b15c/src/init.cpp#L1096-L1099 Top commit has no ACKs. Tree-SHA512: c115b2b4d2d0eb2316bf9fafd7e0046aa18c9650062779b3a82d6145d188765bff5317f4ca5f79607732fde6d83e1f67756ac20a12c98d060ee68d8acc20c76e
Diffstat (limited to 'test/functional/feature_maxuploadtarget.py')
-rwxr-xr-xtest/functional/feature_maxuploadtarget.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/functional/feature_maxuploadtarget.py b/test/functional/feature_maxuploadtarget.py
index 28a8959e93..c551c0b449 100755
--- a/test/functional/feature_maxuploadtarget.py
+++ b/test/functional/feature_maxuploadtarget.py
@@ -164,6 +164,9 @@ class MaxUploadTest(BitcoinTestFramework):
assert_equal(len(peer_info), 1) # node is still connected
assert_equal(peer_info[0]['permissions'], ['download'])
+ self.log.info("Test passing an unparsable value to -maxuploadtarget throws an error")
+ self.stop_node(0)
+ self.nodes[0].assert_start_raises_init_error(extra_args=["-maxuploadtarget=abc"], expected_msg="Error: Unable to parse -maxuploadtarget: 'abc'")
if __name__ == '__main__':
MaxUploadTest().main()