integration

package
v0.0.0-...-bd1a880 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockDockerManager

type MockDockerManager struct {
	mock.Mock
	// Add fields to store mock data if needed, e.g., for containers
	// MockContainers map[string]*docker_internal.MockContainer // Example if needed
	MockVolumes map[string]*MockVolume // Move inside struct
}

MockDockerManager implements the docker.Manager interface for integration tests

func (*MockDockerManager) AddMockVolume

func (m *MockDockerManager) AddMockVolume(mv *MockVolume)

AddMockVolume adds a mock volume for testing

func (*MockDockerManager) Close

func (m *MockDockerManager) Close() error

func (*MockDockerManager) GetClient

func (m *MockDockerManager) GetClient() (*client.Client, error)

func (*MockDockerManager) GetConfig

func (*MockDockerManager) GetVolume

func (m *MockDockerManager) GetVolume(name string) (*MockVolume, error)

GetVolume retrieves a mock volume by name

func (*MockDockerManager) GetWithContext

func (m *MockDockerManager) GetWithContext(ctx context.Context) (*client.Client, error)

func (*MockDockerManager) IsClosed

func (m *MockDockerManager) IsClosed() bool

func (*MockDockerManager) IsInitialized

func (m *MockDockerManager) IsInitialized() bool

func (*MockDockerManager) Ping

func (m *MockDockerManager) Ping(ctx context.Context) (types.Ping, error)

func (*MockDockerManager) PruneVolumes

func (m *MockDockerManager) PruneVolumes() ([]string, int64)

PruneVolumes simulates pruning volumes

func (*MockDockerManager) RemoveVolume

func (m *MockDockerManager) RemoveVolume(name string) error

RemoveVolume removes a mock volume by name

type MockVolume

type MockVolume struct {
	Name       string
	Driver     string
	Mountpoint string
	CreatedAt  string
	Labels     map[string]string
	InUse      bool
}

MockVolume is a simplified mock for testing volume operations

Jump to

Keyboard shortcuts

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