Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var PortAllocator = portal.New( new(fatalTester), portal.WithAddress("127.0.0.1"), )
PortAllocator is used to acquire unused ports for testing real network listeners.
var TinyChroot = map[string]string{
"/usr/bin/sleep": "/bin/sleep",
"/usr/bin/dash": "/bin/sh",
"/usr/bin/bash": "/bin/bash",
"/usr/bin/cat": "/bin/cat",
"/usr/bin/stty": "/usr/bin/stty",
"/usr/bin/head": "/usr/bin/head",
"/usr/bin/mktemp": "/usr/bin/mktemp",
"/usr/bin/echo": "/usr/bin/echo",
"/usr/bin/touch": "/usr/bin/touch",
"/usr/bin/stat": "/usr/bin/stat",
"/etc/ld.so.cache": "/etc/ld.so.cache",
"/etc/ld.so.conf": "/etc/ld.so.conf",
"/etc/ld.so.conf.d": "/etc/ld.so.conf.d",
"/etc/passwd": "/etc/passwd",
"/etc/resolv.conf": "/etc/resolv.conf",
"/lib": "/lib",
"/lib32": "/lib32",
"/lib64": "/lib64",
"/usr/lib/jvm": "/usr/lib/jvm",
"/run/resolvconf": "/run/resolvconf",
"/run/systemd/resolve": "/run/systemd/resolve",
}
TinyChroot is useful for testing, where we do not use anything other than trivial /bin commands like sleep and sh. Copying a minimal chroot helps in environments like GHA with very poor [network] disk performance.
Note that you cannot chroot a symlink.
Do not modify this value.
Functions ¶
func Parallel ¶
Parallel runs t in parallel, unless CI is set to a true value.
In CI (CircleCI / GitHub Actions) we get better performance by running tests in serial while not restricting GOMAXPROCS.
func SkipTestWithoutRootAccess ¶
SkipTestWithoutRootAccess will skip test t if it's not running in CI environment and test is not running with Root access.
Types ¶
This section is empty.