aboutsummaryrefslogtreecommitdiff
path: root/test/functional/feature_blocksdir.py
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2019-07-31 14:11:32 -0400
committerMarcoFalke <falke.marco@gmail.com>2019-07-31 17:00:25 -0400
commitfa8a1d7ba30040f8c74f93fc41a61276c255a6a6 (patch)
treeb5a686fcc62909c549c5a38f86d81678123b2dad /test/functional/feature_blocksdir.py
parent68f546635d5de2ccfedadeabc7bc79e12e5eca6a (diff)
test: Adapt test framework for chains other than "regtest"
Co-Authored-By: Jorge Timón <jtimon@jtimon.cc>
Diffstat (limited to 'test/functional/feature_blocksdir.py')
-rwxr-xr-xtest/functional/feature_blocksdir.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/functional/feature_blocksdir.py b/test/functional/feature_blocksdir.py
index 3a4889bbe9..6f01f97ea2 100755
--- a/test/functional/feature_blocksdir.py
+++ b/test/functional/feature_blocksdir.py
@@ -18,10 +18,10 @@ class BlocksdirTest(BitcoinTestFramework):
def run_test(self):
self.stop_node(0)
- assert os.path.isdir(os.path.join(self.nodes[0].datadir, "regtest", "blocks"))
+ assert os.path.isdir(os.path.join(self.nodes[0].datadir, self.chain, "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)
+ initialize_datadir(self.options.tmpdir, 0, self.chain)
self.log.info("Starting with nonexistent blocksdir ...")
blocksdir_path = os.path.join(self.options.tmpdir, 'blocksdir')
self.nodes[0].assert_start_raises_init_error(["-blocksdir=" + blocksdir_path], 'Error: Specified blocks directory "{}" does not exist.'.format(blocksdir_path))
@@ -30,8 +30,8 @@ class BlocksdirTest(BitcoinTestFramework):
self.start_node(0, ["-blocksdir=" + blocksdir_path])
self.log.info("mining blocks..")
self.nodes[0].generatetoaddress(10, self.nodes[0].get_deterministic_priv_key().address)
- assert os.path.isfile(os.path.join(blocksdir_path, "regtest", "blocks", "blk00000.dat"))
- assert os.path.isdir(os.path.join(self.nodes[0].datadir, "regtest", "blocks", "index"))
+ assert os.path.isfile(os.path.join(blocksdir_path, self.chain, "blocks", "blk00000.dat"))
+ assert os.path.isdir(os.path.join(self.nodes[0].datadir, self.chain, "blocks", "index"))
if __name__ == '__main__':