Documentation
¶
Overview ¶
Package testnetwork keeps real Windows socket tests out of random go-build executables while preserving their full effect in the fixed-path harness.
Index ¶
- func AssertOSNetwork()
- func OSNetworkEnabled() bool
- func OSNetworkEnabledFor(goos string, runnerAuthorized bool) bool
- func RequireOSNetwork(t skipper)
- func StableHarness() bool
- func StableHarnessFor(goos string, runnerAuthorized bool) bool
- func StartGuardedProcess(cmd *exec.Cmd) error
- func VerifyAuthorizedExecutable(path string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertOSNetwork ¶
func AssertOSNetwork()
AssertOSNetwork protects asynchronous helper owners that no longer have a testing.T available. The parent constructor gates first for a normal skip; this assertion makes direct or future reuse fail closed instead of dialing.
func OSNetworkEnabled ¶
func OSNetworkEnabled() bool
OSNetworkEnabled reports whether this exact process owns a live runner capability. A copied environment label is insufficient on Windows.
func OSNetworkEnabledFor ¶
OSNetworkEnabledFor keeps platform selection pure without exposing a public authorization string. On Windows, the caller must already have verified the runner-issued process capability.
func RequireOSNetwork ¶
func RequireOSNetwork(t skipper)
RequireOSNetwork classifies a test at the resource-ownership boundary. Keeping the gate in shared listener/peer/process constructors also protects future test cases that reuse those constructors.
func StableHarness ¶
func StableHarness() bool
StableHarness reports whether this exact process may use the fixed namespace.
func StableHarnessFor ¶
StableHarnessFor prevents non-Windows runs from adopting fixed artifact paths.
func StartGuardedProcess ¶
StartGuardedProcess closes the wrapper-crash gap for process-owning tests. The Windows implementation verifies the child hash and registers it with the live runner guard before returning ownership to the test.
func VerifyAuthorizedExecutable ¶
VerifyAuthorizedExecutable binds a child launch to the runner's immutable program manifest before the child can inherit any fixed-path identity.
Types ¶
This section is empty.