cardano-node
cardano-node copied to clipboard
cardano-testnet: Towards removing the TestnetRuntime data type
The current scheme for tests is:
test1 = do
testnetRuntime <- testnet ...
test1Core testnetRunTime
test2 = do
testnetRuntime <- testnet ...
test2Core testnetRuntime
testnet starts a cluster and returns a TestnetRuntime which is passed to the actual test.
Problems:
-
TestnetRuntimeis just a record/product type. A sum type would be needed to support different testnet setups. -
TestnetRuntimeis growing bigger and bigger. - The same
TestnetRuntimeis passed to every test, even though each test uses only parts of the data. - It is not easy to track which data is used where.
- There are cases where tests by-pass
TestnetRuntimeand just read data from the file system.
This PR is WIP towards removing TestnetRuntime.
The idea is tests are called directly inside testnet.