Integration test with multichain and teardown

+1 vote
I need to do some integration tests with multichain. However I can't see a way to do a proper teardown through the API to, for example, remove Streams (besides destroying the docker image, that is). Is there any clean way to clean up and delete streams for testing?

asked Nov 2, 2018 by Rydra

1 Answer

0 votes

Blockchains are designed not to forget, so you cannot "teardown" a stream per se.

In most cases, if your purpose is testing, you should create a new blockchain for each test. This is quite simple to automate using multichain-util (and its command line parameters) and multichaind with the initprivkey and shortoutput runtime parameters (if you need them).

You can delete a blockchain by stopping the node and removing the ~/.multichain/[chain-name] directory.

answered Nov 5, 2018 by MultiChain