dockertest

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package dockertest provides an in-memory fake of the read-only Docker API used by StackSentry, for tests that must not depend on a Docker daemon.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Fake

type Fake struct {
	PingErr, VersionErr, InfoErr, ListErr, InspectErr, ImageErr, DiskUsageErr error

	Version    client.ServerVersionResult
	SystemInfo system.Info
	Containers []container.Summary
	Inspect    map[string]container.InspectResponse
	Images     []image.Summary
	Usage      client.DiskUsageResult

	// ImageFilters records the filters of the last ImageList call.
	ImageFilters client.Filters
	// Closed is set by Close.
	Closed bool
}

Fake implements docker.API. A non-nil error field makes the corresponding call fail.

func (*Fake) Close

func (f *Fake) Close() error

Close implements docker.API.

func (*Fake) ContainerInspect

ContainerInspect implements docker.API.

func (*Fake) ContainerList

ContainerList implements docker.API.

func (*Fake) DiskUsage

DiskUsage implements docker.API.

func (*Fake) ImageList

ImageList implements docker.API.

func (*Fake) Info

Info implements docker.API.

func (*Fake) Ping

Ping implements docker.API.

func (*Fake) ServerVersion

ServerVersion implements docker.API.

Jump to

Keyboard shortcuts

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