e2e

command
v3.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 8, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

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 to GetActionGen

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 the GetProposalGen 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.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL