# 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.
# Functions
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
UnmarshalMapToActionType takes a JSON object and an action type and marshals into an object of the corresponding action.
UnmarshalProposalWithType takes a JSON object and a proposal type and marshals into an object of the corresponding proposal.
# Constants
No description provided by the author
No description provided by the author
No description provided by the author
# Variables
No description provided by the author
No description provided by the author
# Structs
Attributes that are unique to a chain.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
JSONParser is a simple parser that reads steps by unmarshalling from a file.
JSONWriter is a simple writer that marshals the array of Step objects.
No description provided by the author
No description provided by the author
No description provided by the author
stores a proposal as a raw json, together with its type.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
TODO: Split out TestConfig and system wide config like localsdkpath.
No description provided by the author
No description provided by the author
No description provided by the author
Attributes that are unique to a validator.
No description provided by the author
# Interfaces
No description provided by the author
TraceParser provides an interface for parsers that read sequences of Steps from files.
TraceWriter is an interface for writers that write steps to files.
# Type aliases
TODO: Determine if user defined type (wrapping a primitive string) is desired in long run.
No description provided by the author
No description provided by the author
No description provided by the author
The list of test cases to be executed.
TODO: Determine if user defined type (wrapping a primitive string) is desired in long run.