cardano-node icon indicating copy to clipboard operation
cardano-node copied to clipboard

cardano-testnet: Towards removing the TestnetRuntime data type

Open MarcFontaine opened this issue 3 years ago • 0 comments

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:

  • TestnetRuntime is just a record/product type. A sum type would be needed to support different testnet setups.
  • TestnetRuntime is growing bigger and bigger.
  • The same TestnetRuntime is 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 TestnetRuntime and just read data from the file system.

This PR is WIP towards removing TestnetRuntime. The idea is tests are called directly inside testnet.

MarcFontaine avatar Mar 13 '23 16:03 MarcFontaine