-
Notifications
You must be signed in to change notification settings - Fork 905
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update tests to use result struct + json-based validation
Update tests that validated rules files (typically looking for errors/warnings) to use the new result struct + json based validation: - When validating rules files, always use json output. - In test cases, instead of parsing stderr/stdout, use new test properties "validate_ok", "validate_errors", "validate_warnings". These parse the json output and look for specific tuples of (error code, error message, item type, item name) in the output. - There were a few tests that were actually validation tests but using the -r argument to load rules. Convert them to validation tests. In one case, split the test into two separate tests--one for validation, one ensuring that the rule doesn't match anything. - There were a couple of tests that were duplicates of existing validation tests, just checking for the error in a different way. Remove them. Signed-off-by: Mark Stemm <mark.stemm@gmail.com>
- Loading branch information
Showing
5 changed files
with
358 additions
and
456 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.