Skip to content

Latest commit

 

History

History
71 lines (49 loc) · 2.24 KB

testing.md

File metadata and controls

71 lines (49 loc) · 2.24 KB

Testing and Performance

简体中文 | Docs Index

Required Checks

GOWORK=off GOTOOLCHAIN=local go test ./... -count=1
GOWORK=off GOTOOLCHAIN=local go vet ./...
gofmt -l .
git diff --check

Focused Behavior Checks

Run focused tests while working on a small behavior change:

GOWORK=off GOTOOLCHAIN=local go test ./... -run 'TestName' -count=1

Discovered Test Entry Points

This inventory is generated from the current test sources in this repository to catch stale coverage descriptions.

Total discovered entry points: 15.

Tests (15)

  • TestHTTPConnectClientWritesRequestAndEmitsEvent
  • TestHTTPConnectRejectsOversizedHeaderBeforeActivation
  • TestHTTPConnectRequestAndResponse
  • TestParseHAProxyV1AndV2
  • TestProxyClientsActivateOnlyAfterHandshake
  • TestProxyClientsDoNotActivateAfterRejection
  • TestSOCKS4ClientRejectsHandshakeFailure
  • TestSOCKS4ClientWritesConnectAndEmitsEvent
  • TestSOCKS4ConnectHelpers
  • TestSOCKS5ClientRejectsHandshakeFailure
  • TestSOCKS5ClientUsernamePasswordAuth
  • TestSOCKS5ClientWritesGreetingConnectAndEmitsEvent
  • TestSOCKS5CommandHelpersEncodeBindAndUDPAssociate
  • TestSOCKS5GreetingConnectAndReply
  • TestSOCKS5UsernamePasswordAuthHelpers

Fuzz Targets (0)

  • No Fuzz targets are currently declared.

Examples (0)

  • No Example functions are currently declared.

Race Checks

GOWORK=off GOTOOLCHAIN=local go test -race ./... -count=1

Race checks are most valuable for core, transport, handler, resolver, observability, examples, and benchmark modules. Platform-specific transports may require native host capabilities.

Benchmarks

Microbenchmarks live exclusively in gnalloy.org/benchmarks. Run them there with gnalloy-microbench.

Report ns/op, B/op, allocs/op, throughput, and p99 latency separately. Include host and OS details with every result.

Pressure Testing

Pressure tests should run against a realistic assembled stack. Use gnalloy.org/benchmarks for repeatable matrices and load clients. Keep warmup and measurement phases separate.

CI

The repository validation workflow runs formatting, tests, and vet on Linux, macOS, and Windows for pushes and pull requests.