ci

package
v1.3.0-rc.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 2, 2022 License: MPL-2.0 Imports: 3 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
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

func Parallel(t *testing.T)

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 SkipSlow

func SkipSlow(t *testing.T, reason string)

SkipSlow skips a slow test unless NOMAD_SLOW_TEST is set to a true value.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL