mirror of
https://github.com/aquasecurity/kube-bench.git
synced 2025-07-08 15:48:18 +00:00
Added empty op val and non-empty flagName test
This commit is contained in:
parent
0918b41eca
commit
8d38c84713
@ -143,7 +143,7 @@ func (t flagTestItem) findValue(s string) (match bool, value string, err error)
|
||||
if strings.HasPrefix(t.Flag, "--") {
|
||||
value = "true"
|
||||
} else {
|
||||
value = vals[1]
|
||||
value = ""
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -600,6 +600,7 @@ func TestCompareOp(t *testing.T) {
|
||||
|
||||
// Test Op "eq"
|
||||
{label: "op=eq, both empty", op: "eq", flagVal: "", compareValue: "", expectedResultPattern: "'' is equal to ''", testResult: true, flagName: ""},
|
||||
{label: "op=eq, both empty, flagName non empty", op: "eq", flagVal: "", compareValue: "", expectedResultPattern: "'' is equal to ''", testResult: true, flagName: "flagName"},
|
||||
|
||||
{
|
||||
label: "op=eq, true==true", op: "eq", flagVal: "true",
|
||||
|
Loading…
Reference in New Issue
Block a user