mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
65860255c6
Fixed issues highlighted by the new checks Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
23 lines
436 B
Go
23 lines
436 B
Go
package testutils
|
|
|
|
import (
|
|
"os"
|
|
"testing"
|
|
)
|
|
|
|
// SetupTestOSContext joins a new network namespace, and returns its associated
|
|
// teardown function.
|
|
//
|
|
// Example usage:
|
|
//
|
|
// defer SetupTestOSContext(t)()
|
|
//
|
|
func SetupTestOSContext(t *testing.T) func() {
|
|
return func() {
|
|
}
|
|
}
|
|
|
|
// RunningOnCircleCI returns true if being executed on libnetwork Circle CI setup
|
|
func RunningOnCircleCI() bool {
|
|
return os.Getenv("CIRCLECI") != ""
|
|
}
|