72c4a7b496
libnetwork does different stuff depending on if you are running the tests in a container or not... without telling it we are in a container a bunch of the tests actually fail. Signed-off-by: Brian Goff <cpuguy83@gmail.com>
11 lines
207 B
Go
11 lines
207 B
Go
package testutils
|
|
|
|
import (
|
|
"os"
|
|
)
|
|
|
|
// IsRunningInContainer returns whether the test is running inside a container.
|
|
func IsRunningInContainer() bool {
|
|
_, err := os.Stat("/.dockerenv")
|
|
return err == nil
|
|
}
|