From c4b71b2368b1d2cb66e9678a6eedb38d620ee692 Mon Sep 17 00:00:00 2001 From: dortam888 Date: Mon, 4 Nov 2024 11:07:56 +0200 Subject: [PATCH] removing expectedOverride in tests as it is not supposed to be changed --- plugins/components/conversionlayer_test.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/plugins/components/conversionlayer_test.go b/plugins/components/conversionlayer_test.go index f418f67e3..a3ab2b8a5 100644 --- a/plugins/components/conversionlayer_test.go +++ b/plugins/components/conversionlayer_test.go @@ -19,7 +19,6 @@ func TestCreateCommandUsages(t *testing.T) { strFlag := NewStringFlag("flag", "", SetMandatory()) override := []string{"usage override", "usage override 2", "usage override 3"} - expectedOverride := override tests := []struct { name string @@ -88,7 +87,7 @@ func TestCreateCommandUsages(t *testing.T) { UsageOptions: &UsageOptions{Usage: override}, }, stringFlags: map[string]StringFlag{optStrFlag.Name: optStrFlag}, - expected: append(expectedOverride, + expected: append(override, fmt.Sprintf("%s [command options] <%s> <%s>", expectedPrefix, "first argument", "second"), fmt.Sprintf("%s [command options] --%s=<%s> <%s>", expectedPrefix, optStrFlag.Name, optStrFlag.HelpValue, "first argument"), ), @@ -102,7 +101,7 @@ func TestCreateCommandUsages(t *testing.T) { UsageOptions: &UsageOptions{Usage: override, ReplaceAutoGeneratedUsage: true}, }, stringFlags: map[string]StringFlag{optStrFlag.Name: optStrFlag, strFlag.Name: strFlag}, - expected: expectedOverride, + expected: override, //override is not expected to be changed upon using UsageOptions }, }