mirror of
https://github.com/containrrr/watchtower.git
synced 2025-12-13 21:56:38 +01:00
Allow running periodic updates with enabled HTTP API (#916)
* Allow running periodic updates with enabled HTTP API * Add --http-api-periodic-polls to docs
This commit is contained in:
parent
e308521a95
commit
6b155a111a
6 changed files with 55 additions and 12 deletions
|
|
@ -79,3 +79,18 @@ func testGetSecretsFromFiles(t *testing.T, flagName string, expected string) {
|
|||
|
||||
assert.Equal(t, expected, value)
|
||||
}
|
||||
|
||||
func TestHTTPAPIPeriodicPollsFlag(t *testing.T) {
|
||||
cmd := new(cobra.Command)
|
||||
SetDefaults()
|
||||
RegisterDockerFlags(cmd)
|
||||
RegisterSystemFlags(cmd)
|
||||
|
||||
err := cmd.ParseFlags([]string{"--http-api-periodic-polls"})
|
||||
require.NoError(t, err)
|
||||
|
||||
periodicPolls, err := cmd.PersistentFlags().GetBool("http-api-periodic-polls")
|
||||
require.NoError(t, err)
|
||||
|
||||
assert.Equal(t, true, periodicPolls)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue