Documentation
¶
Overview ¶
Package test contains functions that implement common functionality between tests. The code (non-test) in this package intentionally does not take any dependendies outside the vim25 tree.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyContainerRuntimeDefaults ¶ added in v0.55.0
func ApplyContainerRuntimeDefaults(spec *types.VirtualMachineConfigSpec) error
ApplyContainerRuntimeDefaults adds runtime-appropriate ExtraConfig defaults to spec. It is a no-op when the current runtime requires no special treatment.
An error is returned when the spec already contains an explicit value for a key that the runtime default would change. An exact value match is treated as a silent no-op: the caller already expressed the same intent. A differing value is an error because silently overriding explicit test intent would mask problems.
func ContainerNetworkFromSpec ¶ added in v0.55.0
func ContainerNetworkFromSpec(spec *types.VirtualMachineConfigSpec) string
ContainerNetworkFromSpec returns the RUN.network value from spec's ExtraConfig, or "" when not set. After ApplyContainerRuntimeDefaults, this yields the bridge name that was configured for rootless podman, or "" on runtimes that use the default bridge (e.g. root Docker). Pass the result to any probe container that must reach the VM container by IP.
func IsRootlessPodman ¶ added in v0.55.0
func IsRootlessPodman() bool
IsRootlessPodman returns true when the docker CLI is backed by rootless podman. Rootless podman has restrictions such as the inability to bind-mount system paths like /sys/class/dmi/id.
func NewAuthenticatedClient ¶
NewAuthenticatedClient creates a new vim25.Client, authenticates the user specified in the test URL, and returns it.
Types ¶
This section is empty.