Skip to content

Commit

Permalink
update: check semver engine version and related errors
Browse files Browse the repository at this point in the history
Signed-off-by: Lorenzo Susini <susinilorenzo1@gmail.com>
  • Loading branch information
loresuso committed Sep 27, 2023
1 parent 62edc65 commit 3d8f4c3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/falco/commands_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func TestFalco_Cmd_Version(t *testing.T) {
`Falco version:[\s]+`+semVerRegex+`[\s]+`+
`Libs version:[\s]+(`+semVerRegex+`|`+commitHashRegex+`)[\s]+`+
`Plugin API:[\s]+`+tagRegex+`[\s]+`+
`Engine:[\s]+[0-9]+[\s]+`+ // note: since falco 0.34.0
`Engine:[\s]+`+tagRegex+`[\s]+`+
`Driver:[\s]+`+
`API version:[\s]+`+tagRegex+`[\s]+`+
`Schema version:[\s]+`+tagRegex+`[\s]+`+
Expand Down
2 changes: 1 addition & 1 deletion tests/falco/legacy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ func TestFalco_Legacy_InvalidEngineVersionNotNumber(t *testing.T) {
assert.NotNil(t, res.RuleValidation().AllErrors().
OfCode("LOAD_ERR_YAML_VALIDATE").
OfItemType("required_engine_version").
OfMessage("Can't decode YAML scalar value"))
OfMessage("Unable to parse engine version 'not-a-number' as a semver string. Expected \"x.y.z\" semver format."), res.Stdout())
assert.Error(t, res.Err(), "%s", res.Stderr())
assert.Equal(t, 1, res.ExitCode())
}
Expand Down

0 comments on commit 3d8f4c3

Please sign in to comment.