ref-fvm
ref-fvm copied to clipboard
Improve testing framework
The current integration testing framework:
https://github.com/filecoin-project/ref-fvm/blob/7c44970d968c8c49c4eedd5168eb16b08d095f26/testing/integration/src/tester.rs#L51-L72
Has some warts:
- There's no distinct "builder" versus "tester". This means the executor/state-tree get stashed in options. We should have:
- A
TesterBuilderfor setting up the executor. - A
TestBuilder::build()method to create the finalTester.
- A
- Modifying the state-tree after instantiating the executor is painful (none of the helper functions like
create_account,set_state, etc. work). Ideally, those functions would work on the fully instantiated tester (i.e., work through the instantiatedexecutor) so they could be called at any time. - We could use some additional helpers for sending messages, constructing new actors, etc.
- Right now, we construct many of these actors by manually constructing their state. Instead, we should construct them by invoking the actor's constructor (i.e., sending a message with method-number 1).
(this list is non-exhaustive).
Just for noting:
- Adding support for
arbitrary=> future fuzzing