testdocker

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package testdocker is a test's docker half of the setup: whether a daemon is reachable, and a directory it can bind-mount. A package rather than a _test.go file because seven packages carried their own copies.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MountableDir

func MountableDir(t testing.TB) string

MountableDir is a temp directory the daemon can actually see. When it runs in a VM (Docker Desktop, colima) only some host paths are shared into it: the home directory is, macOS's $TMPDIR (/var/folders/...) is not — and an unshared bind mount is not an error, docker mounts an EMPTY directory, so a step succeeds and produces nothing. A real run is under the same constraint; see docs/infra.md on TMPDIR.

func Require

func Require(t testing.TB)

Require skips the calling test unless a usable daemon is reachable. Not opt-in: a test guarding a shipped feature does not get to be optional, and one that was is how a containerized placed step shipped not working. A test that BIND-MOUNTS needs MountableDir as well.

Types

This section is empty.

Jump to

Keyboard shortcuts

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