Skip to content

Commit

Permalink
docs: Add more details to the test framework README (#1343)
Browse files Browse the repository at this point in the history
* Add more details to the test framework README

* Add regnerate_traces file

* Add make target for e2e traces

* Remove regenerate-traces script
  • Loading branch information
p-offtermatt authored Oct 9, 2023
1 parent 54e5220 commit c25b4c0
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -183,3 +183,10 @@ build-docs:
@cd docs && ./build.sh

.PHONY: build-docs

###############################################################################
### Test Traces ###
###############################################################################

e2e-traces:
cd tests/e2e; go test -timeout 30s -run ^TestWriteExamples -v
13 changes: 12 additions & 1 deletion tests/e2e/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,15 @@ If the chain state from `state.go` is modified, the `ChainStateWithProposalTypes

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
* 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.

0 comments on commit c25b4c0

Please sign in to comment.