From 3499c88f640e8d9c54cde37c7b0de32c98bc80e5 Mon Sep 17 00:00:00 2001 From: Ben B Date: Wed, 1 Jun 2022 16:29:37 +0200 Subject: [PATCH] fix: dependency flag not recognized (#3724) Signed-off-by: Benedikt Bongartz Co-authored-by: Yuri Shkuro --- cmd/es-rollover/app/flags.go | 1 + cmd/es-rollover/app/flags_test.go | 2 ++ 2 files changed, 3 insertions(+) diff --git a/cmd/es-rollover/app/flags.go b/cmd/es-rollover/app/flags.go index 269ffc59f5b..45fbcce6723 100644 --- a/cmd/es-rollover/app/flags.go +++ b/cmd/es-rollover/app/flags.go @@ -69,4 +69,5 @@ func (c *Config) InitFromViper(v *viper.Viper) { c.ILMPolicyName = v.GetString(ilmPolicyName) c.UseILM = v.GetBool(useILM) c.Timeout = v.GetInt(timeout) + c.SkipDependencies = v.GetBool(skipDependencies) } diff --git a/cmd/es-rollover/app/flags_test.go b/cmd/es-rollover/app/flags_test.go index ddffbf672e1..42124375fd0 100644 --- a/cmd/es-rollover/app/flags_test.go +++ b/cmd/es-rollover/app/flags_test.go @@ -41,6 +41,7 @@ func TestBindFlags(t *testing.T) { "--es.password=qwerty123", "--es.use-ilm=true", "--es.ilm-policy-name=jaeger-ilm", + "--skip-dependencies=true", }) require.NoError(t, err) @@ -51,4 +52,5 @@ func TestBindFlags(t *testing.T) { assert.Equal(t, "admin", c.Username) assert.Equal(t, "qwerty123", c.Password) assert.Equal(t, "jaeger-ilm", c.ILMPolicyName) + assert.Equal(t, true, c.SkipDependencies) }