cadvisor: github.com/google/cadvisor/cmd/internal/storage/test Index | Files

package test

import "github.com/google/cadvisor/cmd/internal/storage/test"

Index

Package Files

mock.go storagetests.go

func StorageDriverFillRandomStatsFunc Uses

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 Uses

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

type MockStorageDriver Uses

type MockStorageDriver struct {
    mock.Mock
    MockCloseMethod bool
}

func (*MockStorageDriver) AddStats Uses

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

func (*MockStorageDriver) Close Uses

func (d *MockStorageDriver) Close() error

type TestStorageDriver Uses

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

Package test imports 6 packages (graph). Updated 2020-06-10. Refresh now. Tools for package owners.