You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
watchtower/container/mockclient/mock.go

38 lines
867 B
Go

package mockclient
import (
"time"
"github.com/CenturyLinkLabs/watchtower/container"
"github.com/stretchr/testify/mock"
)
type MockClient struct {
mock.Mock
}
func (m *MockClient) ListContainers(cf container.Filter) ([]container.Container, error) {
args := m.Called(cf)
return args.Get(0).([]container.Container), args.Error(1)
}
func (m *MockClient) StopContainer(c container.Container, timeout time.Duration) error {
args := m.Called(c, timeout)
return args.Error(0)
}
func (m *MockClient) StartContainer(c container.Container) error {
args := m.Called(c)
return args.Error(0)
}
func (m *MockClient) RenameContainer(c container.Container, name string) error {
args := m.Called(c, name)
return args.Error(0)
}
func (m *MockClient) IsContainerStale(c container.Container) (bool, error) {
args := m.Called(c)
return args.Bool(0), args.Error(1)
}