# README
Updating the trace format and tests when adjusting the framework
Some things in the test framework should stay consistent, in particular with respect to the trace format. When adding or modifying actions, please follow these guidelines:
- Add a case for your action to
main.go
- Add a case for your action to
json_utils.go/UnmarshalMapToActionType
- Add a generator for your action to
action_rapid_test.go
and add the generator toGetActionGen
If the chain state from state.go
is modified, the ChainStateWithProposalTypes
in json_utils.go/MarshalJSON
should be updated.
When adding a new proposal type:
- add a case for your proposal type to
json_utils.go/UnmarshalProposalWithType
- add a generator for your proposal type in
state_rapid_test.go
and add it to theGetProposalGen
function
Regenerating Traces
The traces in tracehandler_testdata
are generated by the test trace_handlers_test.go/TestWriteExamples
.
You can regenerate them by running make e2e-traces
in the root of the repo.
Running against traces
To run a test trace in the e2e tests, run go run . --test-file $TRACEFILE::$TESTCONFIG
.
See --help
for more details.