mirror of
https://github.com/aquasecurity/kube-bench.git
synced 2024-12-31 10:50:55 +00:00
Fix issue with util test.
This commit is contained in:
parent
592dc81974
commit
3dcc38d5c8
@ -129,7 +129,7 @@ func getConfigFiles(v *viper.Viper, t string) map[string]string {
|
||||
}
|
||||
|
||||
// See if any of the candidate config files exist
|
||||
conf := findConfigFile(s.GetStringSlice(t))
|
||||
conf := findConfigFile(s.GetStringSlice(t + "s"))
|
||||
if conf == "" {
|
||||
if s.IsSet("default" + t) {
|
||||
conf = s.GetString("default" + t)
|
||||
|
@ -282,7 +282,7 @@ func TestGetConfigFiles(t *testing.T) {
|
||||
e = c.statResults
|
||||
eIndex = 0
|
||||
|
||||
m := getConfigFiles(v)
|
||||
m := getConfigFiles(v, "conf")
|
||||
if !reflect.DeepEqual(m, c.exp) {
|
||||
t.Fatalf("Got %v\nExpected %v", m, c.exp)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user