mock container
This commit is contained in:
parent
6f6c72f681
commit
018d514981
@ -56,17 +56,17 @@ func (self *MockContainerHandler) GetStats() (*info.ContainerStats, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (self *MockContainerHandler) ListContainers(listType container.ListType) ([]info.ContainerReference, error) {
|
func (self *MockContainerHandler) ListContainers(listType container.ListType) ([]info.ContainerReference, error) {
|
||||||
args := self.Called()
|
args := self.Called(listType)
|
||||||
return args.Get(0).([]info.ContainerReference), args.Error(1)
|
return args.Get(0).([]info.ContainerReference), args.Error(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (self *MockContainerHandler) ListThreads(listType container.ListType) ([]int, error) {
|
func (self *MockContainerHandler) ListThreads(listType container.ListType) ([]int, error) {
|
||||||
args := self.Called()
|
args := self.Called(listType)
|
||||||
return args.Get(0).([]int), args.Error(1)
|
return args.Get(0).([]int), args.Error(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (self *MockContainerHandler) ListProcesses(listType container.ListType) ([]int, error) {
|
func (self *MockContainerHandler) ListProcesses(listType container.ListType) ([]int, error) {
|
||||||
args := self.Called()
|
args := self.Called(listType)
|
||||||
return args.Get(0).([]int), args.Error(1)
|
return args.Get(0).([]int), args.Error(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ type StorageDriver interface {
|
|||||||
// Returns samples of the container stats. If numSamples < 0, then
|
// Returns samples of the container stats. If numSamples < 0, then
|
||||||
// the number of returned samples is implementation defined. Otherwise, the driver
|
// the number of returned samples is implementation defined. Otherwise, the driver
|
||||||
// should return at most numSamples samples.
|
// should return at most numSamples samples.
|
||||||
Samples(containername string, numSamples int) ([]*info.ContainerStatsSample, error)
|
Samples(containerName string, numSamples int) ([]*info.ContainerStatsSample, error)
|
||||||
|
|
||||||
// Close will clear the state of the storage driver. The elements
|
// Close will clear the state of the storage driver. The elements
|
||||||
// stored in the underlying storage may or may not be deleted depending
|
// stored in the underlying storage may or may not be deleted depending
|
||||||
|
Loading…
Reference in New Issue
Block a user