go-ethereum/params
Arran Schlosberg 08490a9b76
test: branch properties of main and release/* (#145)
## Why this should be merged

Safer release process by enforcing invariants of `release/*` branches as
automated in #137 to fulfil #25.

## How this works

New test for `go_tooling` CI job.

If the PR target branch is `main` then only the `params.ReleaseType` is
checked. If the target is neither `main` nor a release branch then the
test is skipped. The checks performed on `release/*` branches are
described in the test.

## How this was tested

Locally against a dummy release branch with deliberate problems created
by (a) including this PR's changes in the final commit and (b) not
updating the libevm version.

```
$ go test -v ./... --target_branch="release/v1.13.14-0.1.0.rc.3"
=== RUN   TestCherryPicksFormat
--- PASS: TestCherryPicksFormat (0.39s)
=== RUN   TestBranchProperties
=== RUN   TestBranchProperties/branch_name
    release_test.go:172: 
                Error Trace:    .../ava-labs/libevm/libevm/tooling/release/release_test.go:172
                Error:          Not equal: 
                                expected: "release/v1.13.14-0.1.0.beta"
                                actual  : "release/v1.13.14-0.1.0.rc.3"
                            
                                Diff:
                                --- Expected
                                +++ Actual
                                @@ -1 +1 @@
                                -release/v1.13.14-0.1.0.beta
                                +release/v1.13.14-0.1.0.rc.3
                Test:           TestBranchProperties/branch_name
    release_test.go:175: On release branch; params.LibEVMReleaseType = "beta", which is unsuitable for release branches
=== RUN   TestBranchProperties/commit_history
    release_test.go:192: Forked from "main" at commit 4c6e50e7d1 (chore: module-renaming workflow inverts between `libevm` and `geth` (#152))
    release_test.go:314: ### History since fork from default branch (8 commits):
    release_test.go:316: internal/build, rpc: add missing HTTP response body Close() calls (#29223) by Shiming Zhang <wzshiming@hotmail.com>
    release_test.go:316: core/state: fix bug in statedb.Copy and remove unnecessary preallocation (#29563) by Aaron Chen <aaronchen.lisp@gmail.com>
    release_test.go:316: params: print time value instead of pointer in ConfigCompatError (#29514) by Nathan <Nathan.l@nodereal.io>
    release_test.go:316: eth/gasprice: add query limit for FeeHistory to defend DDOS attack (#29644) by Nathan <Nathan.l@nodereal.io>
    release_test.go:316: core/state/snapshot: add a missing lock (#30001) by maskpp <maskpp266@gmail.com>
    release_test.go:316: crypto: add IsOnCurve check (#31100) by Felix Lange <fjl@twurst.com>
    release_test.go:316: internal/ethapi: fix panic in debug methods (#31157) by Sina M <1591639+s1na@users.noreply.github.com>
    release_test.go:316: x by Arran Schlosberg <me@arranschlosberg.com>
=== RUN   TestBranchProperties/commit_history/cherry_picked_commits
    release_test.go:314: ### Expected cherry-picks (7 commits):
    release_test.go:316: internal/build, rpc: add missing HTTP response body Close() calls (#29223) by Shiming Zhang <wzshiming@hotmail.com>
    release_test.go:316: core/state: fix bug in statedb.Copy and remove unnecessary preallocation (#29563) by Aaron Chen <aaronchen.lisp@gmail.com>
    release_test.go:316: params: print time value instead of pointer in ConfigCompatError (#29514) by Nathan <Nathan.l@nodereal.io>
    release_test.go:316: eth/gasprice: add query limit for FeeHistory to defend DDOS attack (#29644) by Nathan <Nathan.l@nodereal.io>
    release_test.go:316: core/state/snapshot: add a missing lock (#30001) by maskpp <maskpp266@gmail.com>
    release_test.go:316: crypto: add IsOnCurve check (#31100) by Felix Lange <fjl@twurst.com>
    release_test.go:316: internal/ethapi: fix panic in debug methods (#31157) by Sina M <1591639+s1na@users.noreply.github.com>
=== RUN   TestBranchProperties/commit_history/final_commit
    release_test.go:365: Modified disallowed file "go.yml"
    release_test.go:365: Modified disallowed file "go.mod"
    release_test.go:365: Modified disallowed file "go.sum"
    release_test.go:365: Modified disallowed file "release_test.go"
--- FAIL: TestBranchProperties (2.07s)
    --- FAIL: TestBranchProperties/branch_name (0.00s)
    --- FAIL: TestBranchProperties/commit_history (2.07s)
        --- PASS: TestBranchProperties/commit_history/cherry_picked_commits (1.81s)
        --- FAIL: TestBranchProperties/commit_history/final_commit (0.01s)
FAIL
FAIL    github.com/ava-labs/libevm/libevm/tooling/release       2.712s
FAIL
```
2025-03-17 16:55:39 +00:00
..
forks eth/catalyst: add timestamp checks to fcu and new payload and improve param checks (#28230) 2024-01-23 16:02:08 +01:00
bootnodes.go [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00
config.go Merge branch 'auto-rename-module_source-2bd6bd01d2e8561dd7fc21b631f4a34ac16627a1_workflow-c1fc594f020d23958b641a4e5a856b6e52c49d3bece94b95594864db16c1b0fc-main' into arr4n/rename-module 2024-10-17 13:07:28 +11:00
config.libevm.go chore: logging (#151) 2025-02-24 16:53:21 +00:00
config.libevm_test.go refactor!: consolidate params and types payload access (#84) 2024-12-09 18:32:15 +00:00
config_test.go [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00
dao.go [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00
denomination.go build: upgrade to go 1.19 (#25726) 2022-09-10 13:25:40 +02:00
example.libevm_test.go refactor!: consolidate params and types payload access (#84) 2024-12-09 18:32:15 +00:00
hooks.libevm.go refactor: consolidate once-only registration of extras (#85) 2024-12-09 17:43:59 +00:00
hooks.libevm_test.go refactor!: consolidate params and types payload access (#84) 2024-12-09 18:32:15 +00:00
json.libevm.go feat(params): UnmarshalChainJSONConfig and MarshalChainConfigJSON (#92) 2025-01-12 18:35:14 +01:00
json.libevm_test.go feat(params): UnmarshalChainJSONConfig and MarshalChainConfigJSON (#92) 2025-01-12 18:35:14 +01:00
network_params.go les: historical data garbage collection (#19570) 2020-07-13 11:02:54 +02:00
protocol_params.go [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00
version.go params: release Geth v1.13.14 2024-02-27 13:50:30 +02:00
version.libevm.go test: branch properties of main and release/* (#145) 2025-03-17 16:55:39 +00:00
version.libevm_test.go test: branch properties of main and release/* (#145) 2025-03-17 16:55:39 +00:00