package test
import "k8s.io/kubernetes/Godeps/_workspace/src/github.com/google/cadvisor/storage/test"
Index ¶
- func DefaultStatsEq(a, b *info.ContainerStats) bool
- func StorageDriverFillRandomStatsFunc( containerName string, N int, driver TestStorageDriver, t *testing.T, )
- func TimeEq(t1, t2 time.Time, tolerance time.Duration) bool
- type MockStorageDriver
- func (self *MockStorageDriver) AddStats(ref info.ContainerReference, stats *info.ContainerStats) error
- func (self *MockStorageDriver) Close() error
- type TestStorageDriver
Functions ¶
func DefaultStatsEq ¶
func DefaultStatsEq(a, b *info.ContainerStats) bool
This function is useful because we do not require precise time representation.
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 ¶
Types ¶
type MockStorageDriver ¶
func (*MockStorageDriver) AddStats ¶
func (self *MockStorageDriver) AddStats(ref info.ContainerReference, stats *info.ContainerStats) error
func (*MockStorageDriver) Close ¶
func (self *MockStorageDriver) Close() error
type TestStorageDriver ¶
type TestStorageDriver interface { StatsEq(a *info.ContainerStats, b *info.ContainerStats) bool storage.StorageDriver }
Source Files ¶
mock.go storagetests.go
- Version
- v1.1.9-beta.0
- Published
- Feb 23, 2016
- Platform
- linux/amd64
- Imports
- 7 packages
- Last checked
- 3 minutes ago –
Tools for package owners.