diff options
author | kevkevin <oapallikunnel@gmail.com> | 2024-05-06 16:24:40 -0500 |
---|---|---|
committer | kevkevin <oapallikunnel@gmail.com> | 2024-05-06 17:11:22 -0500 |
commit | ee67bba76cca2355541f99bb731f58479981b29e (patch) | |
tree | ceba8029c7b7e4fa85dde4cad4870e5babdb38ab /test/functional | |
parent | 1ffbd96349820cae7f076ae3253d8a9d28155fd2 (diff) |
test: added test coverage to loadtxoutset
The functional test coverage did not cover the rpc error of Couldn't
open file for loadtxoutset and this test adds coverage for it
Diffstat (limited to 'test/functional')
-rwxr-xr-x | test/functional/feature_assumeutxo.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/functional/feature_assumeutxo.py b/test/functional/feature_assumeutxo.py index 19cbbcffdb..a65a11a9b5 100755 --- a/test/functional/feature_assumeutxo.py +++ b/test/functional/feature_assumeutxo.py @@ -152,6 +152,12 @@ class AssumeutxoTest(BitcoinTestFramework): self.restart_node(2, extra_args=self.extra_args[2]) + def test_invalid_file_path(self): + self.log.info("Test bitcoind should fail when file path is invalid.") + node = self.nodes[0] + path = node.datadir_path / node.chain / "invalid" / "path" + assert_raises_rpc_error(-8, "Couldn't open file {} for reading.".format(path), node.loadtxoutset, path) + def run_test(self): """ Bring up two (disconnected) nodes, mine some new blocks on the first, @@ -236,6 +242,7 @@ class AssumeutxoTest(BitcoinTestFramework): self.test_invalid_mempool_state(dump_output['path']) self.test_invalid_snapshot_scenarios(dump_output['path']) self.test_invalid_chainstate_scenarios() + self.test_invalid_file_path() self.log.info(f"Loading snapshot into second node from {dump_output['path']}") loaded = n1.loadtxoutset(dump_output['path']) |