Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mindev: Add new subcommand to validate ruletype updates
`mindev ruletype validate-update` (or `mindev ruletype vu` for short) takes two YAML files and validate if the rule type can be updated (or not). ``` $ mindev ruletype validate-update -h The 'ruletype validate-update' subcommand allows you to validate an update of a rule type definition Usage: mindev ruletype validate-update [flags] Aliases: validate-update, vu Flags: -a, --after string file to read rule type definition from -b, --before string file to read rule type definition from -h, --help help for validate-update ``` If the validation succeeds, we should just get a "zero" return value. ``` $ mindev ruletype vu -b before.yaml -a after.yaml ``` If it fails, we should get the reasoning, and a non-zero return value: ``` $ mindev ruletype vu -b before.yaml -a after.yaml Error: error validating param schema update: failed to validate properties: cannot remove properties from rule schema Message: Error on execute Details: error validating param schema update: failed to validate properties: cannot remove properties from rule schema [1] $ ``` This should help us gate rule type updates in CI more easily. Signed-off-by: Juan Antonio Osorio <[email protected]>
- Loading branch information