mirror of
https://github.com/containrrr/watchtower.git
synced 2025-12-13 21:56:38 +01:00
feat: enabled loading http-api-token from file (#1728)
This commit is contained in:
parent
139f67270b
commit
9f60766692
3 changed files with 31 additions and 1 deletions
|
|
@ -466,6 +466,7 @@ func GetSecretsFromFiles(rootCmd *cobra.Command) {
|
|||
"notification-msteams-hook",
|
||||
"notification-gotify-token",
|
||||
"notification-url",
|
||||
"http-api-token",
|
||||
}
|
||||
for _, secret := range secrets {
|
||||
if err := getSecretFromFile(flags, secret); err != nil {
|
||||
|
|
|
|||
|
|
@ -90,6 +90,7 @@ func TestGetSliceSecretsFromFiles(t *testing.T) {
|
|||
func testGetSecretsFromFiles(t *testing.T, flagName string, expected string, args ...string) {
|
||||
cmd := new(cobra.Command)
|
||||
SetDefaults()
|
||||
RegisterSystemFlags(cmd)
|
||||
RegisterNotificationFlags(cmd)
|
||||
require.NoError(t, cmd.ParseFlags(args))
|
||||
GetSecretsFromFiles(cmd)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue