mirror of
https://github.com/containrrr/watchtower.git
synced 2025-12-14 14:10:12 +01:00
test: remove unused cross package dependency on mock api server
This commit is contained in:
parent
26fba69169
commit
ec43ecedc4
3 changed files with 35 additions and 82 deletions
|
|
@ -7,13 +7,11 @@ import (
|
|||
"time"
|
||||
|
||||
t "github.com/containrrr/watchtower/pkg/types"
|
||||
cli "github.com/docker/docker/client"
|
||||
)
|
||||
|
||||
// MockClient is a mock that passes as a watchtower Client
|
||||
type MockClient struct {
|
||||
TestData *TestData
|
||||
api cli.CommonAPIClient
|
||||
pullImages bool
|
||||
removeVolumes bool
|
||||
}
|
||||
|
|
@ -31,10 +29,9 @@ 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 {
|
||||
func CreateMockClient(data *TestData, pullImages bool, removeVolumes bool) MockClient {
|
||||
return MockClient{
|
||||
data,
|
||||
api,
|
||||
pullImages,
|
||||
removeVolumes,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue