Testing¶
Lint¶
make lintruns the module-standard linter config. Under the hood, this usesgolangci-lintand its configuration at/.golangci.yml.
Run tests¶
The Makefile at the root of the project includes many commands that can be useful for testing.
make is not required
Please keep in mind that while you can use make to run tests, you don’t have to. You can also use plain old go test (and go build) as you would in any Go project.
make testruns all package tests which are, for the most part, shared with go-ethereum.make test-coregethruns a suite of tests that are specific to CoreGeth.
Test generation¶
CoreGeth is capable of generating some sets of tests used in the tests package, which are originally (and still largely) driven by the ethereum/tests suite.
make tests-generateruns test(s) generation for thestateanddifficultysubsections of this suite, extending the ethereum/tests version of the controls to include configurations for Ethereum Classic chain configurations at various points in Ethereum Classic hardfork history.
Flaky (spuriously erroring) tests¶
Especially when run in CI environments, some tests can be expected to fail more-or-less randomly.
Last update: 2025-01-20