github.com/jfrazelle/docker@v1.1.2-0.20210712172922-bf78e25fe508/libnetwork/testutils/context_windows.go (about)

     1  package testutils
     2  
     3  import "testing"
     4  
     5  // SetupTestOSContext joins a new network namespace, and returns its associated
     6  // teardown function.
     7  //
     8  // Example usage:
     9  //
    10  //     defer SetupTestOSContext(t)()
    11  //
    12  func SetupTestOSContext(t *testing.T) func() {
    13  	return func() {}
    14  }