github.com/pwn-term/docker@v0.0.0-20210616085119-6e977cce2565/libnetwork/testutils/context_windows.go (about) 1 package testutils 2 3 import ( 4 "os" 5 "testing" 6 ) 7 8 // SetupTestOSContext joins a new network namespace, and returns its associated 9 // teardown function. 10 // 11 // Example usage: 12 // 13 // defer SetupTestOSContext(t)() 14 // 15 func SetupTestOSContext(t *testing.T) func() { 16 return func() { 17 } 18 } 19 20 // RunningOnCircleCI returns true if being executed on libnetwork Circle CI setup 21 func RunningOnCircleCI() bool { 22 return os.Getenv("CIRCLECI") != "" 23 }