fix linting and formatting

This commit is contained in:
Simon Aronsson 2020-04-24 13:45:24 +02:00
parent 00715e4633
commit 4672811983
7 changed files with 30 additions and 31 deletions

View file

@ -20,8 +20,8 @@ type MockClient struct {
// TestData is the data used to perform the test
type TestData struct {
TriedToRemoveImageCount int
NameOfContainerToKeep string
Containers []container.Container
NameOfContainerToKeep string
Containers []container.Container
}
// TriedToRemoveImage is a test helper function to check whether RemoveImageByID has been called
@ -31,7 +31,7 @@ func (testdata *TestData) TriedToRemoveImage() bool {
// CreateMockClient creates a mock watchtower Client for usage in tests
func CreateMockClient(data *TestData, api cli.CommonAPIClient, pullImages bool, removeVolumes bool) MockClient {
return MockClient {
return MockClient{
data,
api,
pullImages,
@ -56,6 +56,7 @@ func (client MockClient) StopContainer(c container.Container, d time.Duration) e
func (client MockClient) StartContainer(c container.Container) (string, error) {
return "", nil
}
// RenameContainer is a mock method
func (client MockClient) RenameContainer(c container.Container, s string) error {
return nil
@ -81,4 +82,3 @@ func (client MockClient) ExecuteCommand(containerID string, command string, time
func (client MockClient) IsContainerStale(c container.Container) (bool, error) {
return true, nil
}