update test

This commit is contained in:
faizan-siddiqui 2024-10-23 17:16:12 +11:00 committed by GitHub
parent 49443501ed
commit 23cadf7ab4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -118,11 +118,6 @@ func TestValidateFlagGroups(t *testing.T) {
flagGroupsExclusive: []string{"a d", "a b", "a c"},
args: []string{"--a=foo", "--b=foo", "--c=foo"},
expectErr: `if any flags in the group [a b] are set none of the others can be; [a b] were all set`,
}, {
desc: "Validation of if present then others required groups occurs on groups in sorted order",
flagGroupsIfPresentThenRequired: []string{"a d", "a b", "a c"},
args: []string{"--a=foo"},
expectErr: `if the first flag in the group [a b] is set, all other flags must be set; the following flags are not set: [b]`,
}, {
desc: "Persistent flags utilize required and exclusive groups and can fail required groups",
flagGroupsRequired: []string{"a e", "e f"},