test(planner): extract repeated literals to satisfy goconst#381
Conversation
The buildRunningPlan-guard tests pushed "validator-0-key", "validator-0-nodekey", and "1000000usei" over goconst's occurrence threshold on the new lines. Hoist the key-secret names to package-level test constants, reuse the existing testAccountBalance, and name the RolloutComplete reason in the envtest. No behavior change. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
PR SummaryLow Risk Overview In In Reviewed by Cursor Bugbot for commit f112105. Bugbot is set up for automated code reviews on this repo. Configure here. |
Follow-up to #380. The buildRunningPlan-guard tests added new occurrences of
validator-0-key,validator-0-nodekey, and1000000useithat pushed those literals over goconst's threshold on the new lines, so thelintjob went red on main (test / test-integration / verify-generated were green and #380 auto-merged on the required checks).Fix: hoist the key-secret names to package-level test constants (
testSigningKeySecret,testNodeKeySecret), reuse the existingtestAccountBalance, and name theRolloutCompletereason in the envtest (reasonRolloutComplete). No behavior change; planner unit tests and the BYO-validator envtest still pass.