mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
cc02894a50
This way we won't vendor test related functions in docker anymore. It also moves netns related functions to a new ns package to be able to call the ns init function in tests. I think this also helps with the overall package isolation. Signed-off-by: David Calavera <david.calavera@gmail.com>
10 lines
290 B
Go
10 lines
290 B
Go
package testutils
|
|
|
|
import "flag"
|
|
|
|
var runningInContainer = flag.Bool("incontainer", false, "Indicates if the test is running in a container")
|
|
|
|
// IsRunningInContainer returns whether the test is running inside a container.
|
|
func IsRunningInContainer() bool {
|
|
return (*runningInContainer)
|
|
}
|