context_windows.go 270 B

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