mirror of
https://github.com/containrrr/watchtower.git
synced 2025-09-21 21:30:48 +02:00
add tests for check action, resolve wt cleanup bug (#284)
add unit tests for the check action to allow for some refactoring and bug fixing without having to worry about breaking stuff. resolve watchtower cleanup bug by adding an initial 1 second sleep in the check action. without the sleep, the docker client returns an empty array, which is why we were left with two watchtowers.
This commit is contained in:
parent
90bd4a1e3e
commit
46ffa16ee2
4 changed files with 239 additions and 20 deletions
2
main.go
2
main.go
|
@ -106,7 +106,7 @@ func start(c *cli.Context) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
if err := actions.CheckPrereqs(client, cleanup); err != nil {
|
||||
if err := actions.CheckForMultipleWatchtowerInstances(client, cleanup); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue