mirror of
https://github.com/containrrr/watchtower.git
synced 2025-12-14 14:10:12 +01:00
fix linting and formatting
This commit is contained in:
parent
00715e4633
commit
4672811983
7 changed files with 30 additions and 31 deletions
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue