Skip to content
Snippets Groups Projects
Commit 83c7536c authored by wwwil's avatar wwwil
Browse files

Add tests for regex test op

parent e4f0f470
No related branches found
No related tags found
No related merge requests found
......@@ -297,3 +297,13 @@ groups:
op: eq
value: "false"
set: true
- id: 26
text: "check regex op matches"
tests:
test_items:
- path: "{.currentMasterVersion}"
compare:
op: regex
value: '^1\.12.*$'
set: true
......@@ -152,6 +152,10 @@ func TestTestExecute(t *testing.T) {
controls.Groups[0].Checks[22],
"authentication:\n anonymous:\n enabled: false",
},
{
controls.Groups[0].Checks[26],
"currentMasterVersion: 1.12.7",
},
}
for _, c := range cases {
......@@ -180,6 +184,14 @@ func TestTestExecuteExceptions(t *testing.T) {
controls.Groups[0].Checks[25],
"broken } yaml\nenabled: true",
},
{
controls.Groups[0].Checks[26],
"currentMasterVersion: 1.11",
},
{
controls.Groups[0].Checks[26],
"currentMasterVersion: ",
},
}
for _, c := range cases {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment