package testutils

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

Index

Functions

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

Version
v24.0.0-rc.2+incompatible
Published
May 5, 2023
Platform
darwin/amd64
Imports
1 packages
Last checked
2 hours ago

Tools for package owners.