tailscale/wgengine
Brad Fitzpatrick 4bb6f35c1f ipn/ipnlocal: consolidate test-only LocalBackend methods behind ForTest
Move all the FooForTest methods on LocalBackend to instead be
methods on a new unexported forTest type which is then given out
to callers in other packages via an exported ForTest method
(panicking in non-test contexts) that returns that unexported type.

This is unusual style (exported returning unexported) but declutters
godoc and makes call sites both more explicit and easier to read
without the "ForTest" suffix polluting the symbols. Now FooForTest()
changes into ForTest().Foo().

This was motivated by a pending change moving a bunch of code out of
LocalBackend into other packages that required adding more ForTest
methods to LocalBackend to keep the tests (now in other packages)
working. Instead, do this refactor now so the future change is prettier.

Updates #12614
Updates #cleanup

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
Change-Id: Ib25e6d76d48dc8622ac3a955e0b1220d582e63a8
2026-06-27 16:11:42 -07:00
..
bench wgengine: replace Engine.SetNetworkMap with SetSelfNode 2026-06-24 15:03:55 -07:00
filter net/tstun, wgengine/filter: track UDP flow state for injected packets 2026-06-22 15:57:37 -07:00
magicsock wgengine/magicsock: consider VNI as part of peer relay handshake suppression 2026-06-23 13:09:52 -07:00
netlog wgengine/netlog: stop using netmap.NetworkMap type, use LocalBackend 2026-06-17 15:11:57 -07:00
netstack ipn/ipnlocal: consolidate test-only LocalBackend methods behind ForTest 2026-06-27 16:11:42 -07:00
router wgengine/router/osrouter,util/linuxfw: remove orphaned tailnet addrs (#20199) 2026-06-24 13:41:36 -07:00
wgcfg go.mod,wgengine/magicsock: pull wireguard-go fix for roaming endpoints (#20118) 2026-06-12 10:50:35 -07:00
wgint all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
wglog wgengine/wglog: stop using netmap.NetworkMap here too 2026-06-23 09:06:37 -07:00
winnet all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
mem_ios.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
pendopen_omit.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
pendopen.go feature/conn25: recreate transit IP mappings when connector loses them 2026-06-17 13:50:51 -04:00
userspace_ext_test.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
userspace_test.go wgengine: replace Engine.SetNetworkMap with SetSelfNode 2026-06-24 15:03:55 -07:00
userspace.go wgengine: replace Engine.SetNetworkMap with SetSelfNode 2026-06-24 15:03:55 -07:00
wgengine.go wgengine: replace Engine.SetNetworkMap with SetSelfNode 2026-06-24 15:03:55 -07:00