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:
Simon Aronsson 2019-04-20 16:44:41 +02:00 committed by GitHub
parent 90bd4a1e3e
commit 46ffa16ee2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 239 additions and 20 deletions

View file

@ -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)
}