volumetestutils

package
v1.4.2-0...-b0dc111 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2015 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFakeVolume

func NewFakeVolume(name string) volume.Volume

NewFakeVolume creates a new fake volume for testing

Types

type FakeDriver

type FakeDriver struct{}

FakeDriver is a driver that generates fake volumes

func (FakeDriver) Create

func (FakeDriver) Create(name string, opts map[string]string) (volume.Volume, error)

Create initializes a fake volume. It returns an error if the options include an "error" key with a message

func (FakeDriver) Name

func (FakeDriver) Name() string

Name is the name of the driver

func (FakeDriver) Remove

func (FakeDriver) Remove(v volume.Volume) error

Remove deletes a volume.

type FakeVolume

type FakeVolume struct {
	// contains filtered or unexported fields
}

FakeVolume is a fake volume with a random name

func (FakeVolume) DriverName

func (FakeVolume) DriverName() string

DriverName is the name of the driver

func (FakeVolume) Mount

func (FakeVolume) Mount() (string, error)

Mount mounts the volume in the container

func (FakeVolume) Name

func (f FakeVolume) Name() string

Name is the name of the volume

func (FakeVolume) Path

func (FakeVolume) Path() string

Path is the filesystem path to the volume

func (FakeVolume) Unmount

func (FakeVolume) Unmount() error

Unmount unmounts the volume from the container

type NoopVolume

type NoopVolume struct{}

NoopVolume is a volume that doesn't perform any operation

func (NoopVolume) DriverName

func (NoopVolume) DriverName() string

DriverName is the name of the driver

func (NoopVolume) Mount

func (NoopVolume) Mount() (string, error)

Mount mounts the volume in the container

func (NoopVolume) Name

func (NoopVolume) Name() string

Name is the name of the volume

func (NoopVolume) Path

func (NoopVolume) Path() string

Path is the filesystem path to the volume

func (NoopVolume) Unmount

func (NoopVolume) Unmount() error

Unmount unmounts the volume from the container

Jump to

Keyboard shortcuts

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