test

package
v0.0.0-...-54dff2b Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StorageDriverFillRandomStatsFunc

func StorageDriverFillRandomStatsFunc(
	containerName string,
	N int,
	driver TestStorageDriver,
	t *testing.T,
)

This function will generate random stats and write them into the storage. The function will not close the driver

func TimeEq

func TimeEq(t1, t2 time.Time, tolerance time.Duration) bool

Types

type MockStorageDriver

type MockStorageDriver struct {
	mock.Mock
	MockCloseMethod bool
}

func (*MockStorageDriver) AddStats

func (d *MockStorageDriver) AddStats(cInfo *info.ContainerInfo, stats *info.ContainerStats) error

func (*MockStorageDriver) Close

func (d *MockStorageDriver) Close() error

type TestStorageDriver

type TestStorageDriver interface {
	StatsEq(a *info.ContainerStats, b *info.ContainerStats) bool
	storage.StorageDriver
}

Jump to

Keyboard shortcuts

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