test(context): Change the StringSliceFlag to a pointer
StringSliceFlag needs to be a pointer, and not a struct. Also formatted the test. See: https://github.com/urfave/cli/pull/1126 for a description of the regression tested for. Signed-off-by: Ole Petter <ole.orhagen@northern.tech>
This commit is contained in:
parent
710c8f71c4
commit
48392103ce
@ -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},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user