package testutils
import "github.com/dotcloud/docker/libnetwork/testutils"
Index ¶
- func AssertSocketSameNetNS(t testing.TB, conn syscall.Conn)
- func SetupTestOSContext(t *testing.T) func()
- type Logger
- type OSContext
Functions ¶
func AssertSocketSameNetNS ¶
AssertSocketSameNetNS is a no-op on platforms other than Linux.
func SetupTestOSContext ¶
SetupTestOSContext joins the current goroutine to a new network namespace, and returns its associated teardown function.
Example usage:
defer SetupTestOSContext(t)()
Types ¶
type Logger ¶
Logger is used to log non-fatal messages during tests.
type OSContext ¶
type OSContext struct{}
func SetupTestOSContextEx ¶
func (*OSContext) Cleanup ¶
func (*OSContext) Go ¶
Go starts running fn in a new goroutine inside the test OS context.
func (*OSContext) Set ¶
Source Files ¶
context.go context_windows.go sanity_notlinux.go
- Version
- v24.0.6+incompatible
- Published
- Aug 29, 2023
- Platform
- windows/amd64
- Imports
- 2 packages
- Last checked
- 5 seconds ago –
Tools for package owners.