mirror of
https://github.com/yannh/kubeconform.git
synced 2026-02-24 04:07:02 +00:00
Add another flags parsing test to validate all flags
This commit is contained in:
parent
0152d8c209
commit
6911b9cf30
1 changed files with 17 additions and 0 deletions
|
|
@ -92,6 +92,23 @@ func TestFromFlags(t *testing.T) {
|
||||||
Verbose: true,
|
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 {
|
for _, testCase := range testCases {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue