package testutils

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

Index

Functions

func IsRunningInContainer

func IsRunningInContainer() bool

IsRunningInContainer returns whether the test is running inside a container.

func SetupTestOSContext

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

SetupTestOSContext joins a new network namespace, and returns its associated teardown function.

Example usage:

defer SetupTestOSContext(t)()

Source Files

context_windows.go net.go

Version
v23.0.7+incompatible
Published
Sep 6, 2023
Platform
windows/amd64
Imports
2 packages
Last checked
11 minutes ago

Tools for package owners.