From e4a0c3547ed886871f8b3d51c6b4ffdb181a8b9c Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Fri, 30 Nov 2018 16:32:23 +0200 Subject: [PATCH] Improve blocksdir functional test. A new node should not create an unused `blocks` directory in the root of the data directory when `-testnet` or `-regtest` is specified. --- test/functional/feature_blocksdir.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/functional/feature_blocksdir.py b/test/functional/feature_blocksdir.py index c170f510c88df..3a4889bbe9cf3 100755 --- a/test/functional/feature_blocksdir.py +++ b/test/functional/feature_blocksdir.py @@ -18,6 +18,8 @@ def set_test_params(self): def run_test(self): self.stop_node(0) + assert os.path.isdir(os.path.join(self.nodes[0].datadir, "regtest", "blocks")) + assert not os.path.isdir(os.path.join(self.nodes[0].datadir, "blocks")) shutil.rmtree(self.nodes[0].datadir) initialize_datadir(self.options.tmpdir, 0) self.log.info("Starting with nonexistent blocksdir ...")