testnetwork

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 13, 2026 License: Apache-2.0 Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

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

func OSNetworkEnabledFor(goos string, runnerAuthorized bool) bool

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

func StableHarnessFor(goos string, runnerAuthorized bool) bool

StableHarnessFor prevents non-Windows runs from adopting fixed artifact paths.

func StartGuardedProcess

func StartGuardedProcess(cmd *exec.Cmd) error

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

func VerifyAuthorizedExecutable(path string) error

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL