diff options
author | Sebastian Falbesoner <sebastian.falbesoner@gmail.com> | 2021-08-11 20:29:03 +0200 |
---|---|---|
committer | Sebastian Falbesoner <sebastian.falbesoner@gmail.com> | 2021-08-16 16:36:48 +0200 |
commit | e2ff385e138562fb3e1cc63bdd58715a2d8bad98 (patch) | |
tree | 36878f0a488d49f8617806e37a4c8075e11cba8e /test/functional/feature_pruning.py | |
parent | 77e23ca945030d557559a7391cb8bd368693548c (diff) |
test: check for invalid `-prune` parameters
Diffstat (limited to 'test/functional/feature_pruning.py')
-rwxr-xr-x | test/functional/feature_pruning.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/functional/feature_pruning.py b/test/functional/feature_pruning.py index cedb7b57ca..e9aae4733b 100755 --- a/test/functional/feature_pruning.py +++ b/test/functional/feature_pruning.py @@ -127,6 +127,24 @@ class PruneTest(BitcoinTestFramework): self.sync_blocks(self.nodes[0:5]) + def test_invalid_command_line_options(self): + self.nodes[0].assert_start_raises_init_error( + expected_msg='Error: Prune cannot be configured with a negative value.', + extra_args=['-prune=-1'], + ) + self.nodes[0].assert_start_raises_init_error( + expected_msg='Error: Prune configured below the minimum of 550 MiB. Please use a higher number.', + extra_args=['-prune=549'], + ) + self.nodes[0].assert_start_raises_init_error( + expected_msg='Error: Prune mode is incompatible with -txindex.', + extra_args=['-prune=550', '-txindex'], + ) + self.nodes[0].assert_start_raises_init_error( + expected_msg='Error: Prune mode is incompatible with -coinstatsindex.', + extra_args=['-prune=550', '-coinstatsindex'], + ) + def test_height_min(self): assert os.path.isfile(os.path.join(self.prunedir, "blk00000.dat")), "blk00000.dat is missing, pruning too early" self.log.info("Success") @@ -453,6 +471,9 @@ class PruneTest(BitcoinTestFramework): self.log.info("Test wallet re-scan") self.wallet_test() + self.log.info("Test invalid pruning command line options") + self.test_invalid_command_line_options() + self.log.info("Done") if __name__ == '__main__': |