package testutils

import "github.com/dotcloud/docker/libnetwork/testutils"

Index

Functions

func AssertSocketSameNetNS

func AssertSocketSameNetNS(t testing.TB, conn syscall.Conn)

AssertSocketSameNetNS is a no-op on platforms other than Linux.

func SetupTestOSContext

func SetupTestOSContext(t *testing.T) func()

SetupTestOSContext joins the current goroutine to a new network namespace, and returns its associated teardown function.

Example usage:

defer SetupTestOSContext(t)()

Types

type Logger

type Logger interface {
	Logf(format string, args ...any)
}

Logger is used to log non-fatal messages during tests.

Source Files

context.go sanity_notlinux.go

Version
v24.0.6+incompatible
Published
Aug 29, 2023
Platform
js/wasm
Imports
2 packages
Last checked
9 seconds ago

Tools for package owners.