mirror of
https://github.com/containrrr/watchtower.git
synced 2025-12-14 14:10:12 +01:00
Re-apply based on new go flags package (#336)
This commit is contained in:
parent
9eca883f17
commit
baf5e50051
7 changed files with 58 additions and 34 deletions
|
|
@ -32,9 +32,10 @@ var _ = Describe("the actions package", func() {
|
|||
})
|
||||
BeforeEach(func() {
|
||||
client = mockClient{
|
||||
api: dockerClient,
|
||||
pullImages: false,
|
||||
TestData: &TestData{},
|
||||
api: dockerClient,
|
||||
pullImages: false,
|
||||
removeVolumes: false,
|
||||
TestData: &TestData{},
|
||||
}
|
||||
})
|
||||
|
||||
|
|
@ -62,8 +63,9 @@ var _ = Describe("the actions package", func() {
|
|||
When("given multiple containers", func() {
|
||||
BeforeEach(func() {
|
||||
client = mockClient{
|
||||
api: dockerClient,
|
||||
pullImages: false,
|
||||
api: dockerClient,
|
||||
pullImages: false,
|
||||
removeVolumes: false,
|
||||
TestData: &TestData{
|
||||
NameOfContainerToKeep: "test-container-02",
|
||||
Containers: []container.Container{
|
||||
|
|
@ -89,8 +91,9 @@ var _ = Describe("the actions package", func() {
|
|||
When("deciding whether to cleanup images", func() {
|
||||
BeforeEach(func() {
|
||||
client = mockClient{
|
||||
api: dockerClient,
|
||||
pullImages: false,
|
||||
api: dockerClient,
|
||||
pullImages: false,
|
||||
removeVolumes: false,
|
||||
TestData: &TestData{
|
||||
Containers: []container.Container{
|
||||
createMockContainer(
|
||||
|
|
@ -134,9 +137,10 @@ func createMockContainer(id string, name string, image string, created time.Time
|
|||
}
|
||||
|
||||
type mockClient struct {
|
||||
TestData *TestData
|
||||
api cli.CommonAPIClient
|
||||
pullImages bool
|
||||
TestData *TestData
|
||||
api cli.CommonAPIClient
|
||||
pullImages bool
|
||||
removeVolumes bool
|
||||
}
|
||||
|
||||
type TestData struct {
|
||||
|
|
|
|||
|
|
@ -14,10 +14,10 @@ var (
|
|||
|
||||
// UpdateParams contains all different options available to alter the behavior of the Update func
|
||||
type UpdateParams struct {
|
||||
Filter container.Filter
|
||||
Cleanup bool
|
||||
NoRestart bool
|
||||
Timeout time.Duration
|
||||
Filter container.Filter
|
||||
Cleanup bool
|
||||
NoRestart bool
|
||||
Timeout time.Duration
|
||||
MonitorOnly bool
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue