Skip to content

Commit

Permalink
test(context): Change the StringSliceFlag to a pointer
Browse files Browse the repository at this point in the history
StringSliceFlag needs to be a pointer, and not a struct. Also formatted the test.

See: urfave/cli#1126 for a description of the regression
tested for.

Signed-off-by: Ole Petter <ole.orhagen@northern.tech>
  • Loading branch information
Ole Petter committed May 3, 2020
1 parent 91951cf commit ce3eaec
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cli/context_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -535,11 +535,11 @@ func TestCheckRequiredFlags(t *testing.T) {
parseInput: []string{"-n", "asd", "-n", "qwe"},
},
{
testCase: "required_flag_with_short_alias_not_printed_on_error",
expectedAnError: true,
testCase: "required_flag_with_short_alias_not_printed_on_error",
expectedAnError: true,
expectedErrorContents: []string{"Required flag \"names\" not set"},
flags: []Flag{
StringSliceFlag{Name: "names, n", Required: true},
&StringSliceFlag{Name: "names, n", Required: true},
},
},
}
Expand Down

0 comments on commit ce3eaec

Please sign in to comment.