Skip to content

fix(ci): run Go tests across all packages#3910

Merged
piotr-roslaniec merged 9 commits intofeature/decouple-firewall-allowlistfrom
fix/ci-gotestsum-missing-packages
Mar 27, 2026
Merged

fix(ci): run Go tests across all packages#3910
piotr-roslaniec merged 9 commits intofeature/decouple-firewall-allowlistfrom
fix/ci-gotestsum-missing-packages

Conversation

@piotr-roslaniec
Copy link
Collaborator

Summary

  • CI has been silently running 0 tests because gotestsum -- -timeout 15m (without ./...) only tests the root package, which has no test files
  • Fix: add explicit ./... so all subpackages are tested
  • Also fix peers_test.go placeholder hostnames to match actual config/_peers/testnet values — this test failure was hidden by the above bug

Root cause

gotestsum's default ./... package pattern only applies when no args are passed after --. With -- -timeout 15m, gotestsum forwards args directly to go test, which defaults to . (current directory only). CI log confirms: DONE 0 tests in 8.107s.

Test plan

  • CI should now run all Go tests (expect 100+ tests instead of 0)
  • TestResolvePeers/sepolia_network should pass with corrected hostnames

🤖 Generated with Claude Code

gotestsum's default `./...` package pattern only applies when no args
are passed after `--`. With `-- -timeout 15m`, it forwards args directly
to `go test`, which defaults to `.` (root package only). The root
package has no test files, so CI has been silently running 0 tests.
@piotr-roslaniec piotr-roslaniec force-pushed the fix/ci-gotestsum-missing-packages branch from 16fafed to 3830ab7 Compare March 25, 2026 09:23
Replace placeholder hostnames with actual values from config/_peers/testnet.
Remove TestConnectedWellknownPeersCountMetricName and TestMetricConstants
which only assert that string constants equal themselves. The compiler
already ensures rename safety. Keep the callable integration test which
validates the function exists and executes without panicking.
…d var

Change EmptyAllowList from an exported mutable package-level var to an
exported function returning the package-level singleton. This prevents
external code from accidentally mutating the shared empty allowlist.
Add a note that connected_wellknown_peers_count was previously named
connected_bootstrap_count, so operators can update Prometheus queries
and Grafana dashboards accordingly.
Specify concrete removal version so the deprecated flag does not linger
indefinitely.
Add a TODO comment noting that at least one additional mainnet peer
across a different operator/ASN should be added before production
rollout to avoid a single point of failure for initial peer discovery.
@piotr-roslaniec piotr-roslaniec force-pushed the fix/ci-gotestsum-missing-packages branch from 0eacdc5 to 834b63a Compare March 25, 2026 09:57
Go 1.24 vet rejects non-constant format strings in fmt.Errorf. This
pre-existing issue was hidden because CI was not running tests.
Copy link
Member

@lrsaturnino lrsaturnino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@piotr-roslaniec piotr-roslaniec merged commit 16ace1b into feature/decouple-firewall-allowlist Mar 27, 2026
15 checks passed
@piotr-roslaniec piotr-roslaniec deleted the fix/ci-gotestsum-missing-packages branch March 27, 2026 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants