Add another flags parsing test to validate all flags

This commit is contained in:
Yann Hamon 2020-11-01 23:29:50 +01:00
parent 0152d8c209
commit 6911b9cf30

View file

@ -92,6 +92,23 @@ func TestFromFlags(t *testing.T) {
Verbose: true,
},
},
{
[]string{"-ignore-missing-schemas", "-kubernetes-version", "1.16.0", "-n", "2", "-output", "json",
"-schema-location", "folder", "-schema-location", "anotherfolder", "-skip", "kinda,kindb", "-strict",
"-summary", "-verbose", "file1", "file2"},
Config{
Files: []string{"file1", "file2"},
IgnoreMissingSchemas: true,
KubernetesVersion: "1.16.0",
NumberOfWorkers: 2,
OutputFormat: "json",
SchemaLocations: []string{"folder", "anotherfolder"},
SkipKinds: map[string]bool{"kinda": true, "kindb": true},
Strict: true,
Summary: true,
Verbose: true,
},
},
}
for _, testCase := range testCases {