MCPcopy Create free account
hub / github.com/containerd/nerdctl / RequireExecutable

Function RequireExecutable

pkg/testutil/testutil.go:665–669  ·  view source on GitHub ↗

RequireExecutable skips tests when executable `name` is not present in PATH.

(t testing.TB, name string)

Source from the content-addressed store, hash-verified

663
664// RequireExecutable skips tests when executable `name` is not present in PATH.
665func RequireExecutable(t testing.TB, name string) {
666 if _, err := exec.LookPath(name); err != nil {
667 t.Skipf("required executable doesn't exist in PATH: %s", name)
668 }
669}
670
671const Namespace = "nerdctl-test"
672

Callers 2

TestRunWithInitFunction · 0.92

Calls

no outgoing calls

Tested by 2

TestRunWithInitFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…