Skip to content

Commit 437dfe1

Browse files
committedFeb 16, 2023
Merge bitcoin/bitcoin#26714: test: add coverage for unparsable -maxuploadtarget
7a83aa0 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
2 parents 98042a0 + 7a83aa0 commit 437dfe1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed
 

‎test/functional/feature_maxuploadtarget.py

+3
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,9 @@ def run_test(self):
164164
assert_equal(len(peer_info), 1) # node is still connected
165165
assert_equal(peer_info[0]['permissions'], ['download'])
166166

167+
self.log.info("Test passing an unparsable value to -maxuploadtarget throws an error")
168+
self.stop_node(0)
169+
self.nodes[0].assert_start_raises_init_error(extra_args=["-maxuploadtarget=abc"], expected_msg="Error: Unable to parse -maxuploadtarget: 'abc'")
167170

168171
if __name__ == '__main__':
169172
MaxUploadTest().main()

0 commit comments

Comments
 (0)
Please sign in to comment.