diff --git a/CHANGELOG.md b/CHANGELOG.md index e7fbaf9f..bd82b0f6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ - Upgrade stomp 8.0.0 to 8.0.1 - [#832](https://github.com/jertel/elastalert2/pull/832) - @jertel - Add support for Kibana 8.2 for Kibana Discover, Upgrade Pytest 7.1.1 to 7.1.2, Upgrade pylint 2.13.5 to 2.13.8, Upgrade Jinja2 3.1.1 to 3.1.2 - [#840](https://github.com/jertel/elastalert2/pull/840) - @nsano-rururu - Add the possibility to use rule and match fields in the description of TheHive alerts - [#855](https://github.com/jertel/elastalert2/pull/855) - @luffynextgen +- Fix missing colon on schema.yml and add unit test on it - [#866](https://github.com/jertel/elastalert2/pull/866) - @Isekai-Seikatsu # 2.5.0 diff --git a/elastalert/schema.yaml b/elastalert/schema.yaml index b338c4e6..68bb6e3a 100644 --- a/elastalert/schema.yaml +++ b/elastalert/schema.yaml @@ -518,9 +518,9 @@ properties: mattermost_author_name: {type: string} mattermost_author_link: {type: string} mattermost_author_icon: {type: string} - mattermost_attach_kibana_discover_url {type: boolean} - mattermost_kibana_discover_color {type: string} - mattermost_kibana_discover_title {type: string} + mattermost_attach_kibana_discover_url: {type: boolean} + mattermost_kibana_discover_color: {type: string} + mattermost_kibana_discover_title: {type: string} ### Microsoft Teams ms_teams_webhook_url: *arrayOfString @@ -590,9 +590,9 @@ properties: rocket_chat_msg_color: {enum: [good, warning, danger]} rocket_chat_text_string: {type: string} rocket_chat_proxy: {type: string} - rocket_chat_attach_kibana_discover_url {type: boolean} - rocket_chat_kibana_discover_color {type: string} - rocket_chat_kibana_discover_title {type: string} + rocket_chat_attach_kibana_discover_url: {type: boolean} + rocket_chat_kibana_discover_color: {type: string} + rocket_chat_kibana_discover_title: {type: string} rocket_chat_ca_certs: {type: boolean} rocket_chat_ignore_ssl_errors: {type: boolean} rocket_chat_timeout: {type: integer} diff --git a/tests/loaders_test.py b/tests/loaders_test.py index 71ec00f4..2b9e0775 100644 --- a/tests/loaders_test.py +++ b/tests/loaders_test.py @@ -11,8 +11,12 @@ import elastalert.ruletypes from elastalert.alerters.email import EmailAlerter from elastalert.config import load_conf -from elastalert.loaders import FileRulesLoader -from elastalert.loaders import RulesLoader +from elastalert.loaders import ( + FileRulesLoader, + RulesLoader, + load_rule_schema, +) + from elastalert.util import EAException @@ -622,3 +626,8 @@ def test_load_yaml_imports_modified(): 'rule_file': rule_path, } assert len(rules_loader.import_rules) == 0 + + +def test_load_rule_schema(): + validator = load_rule_schema() + validator.check_schema(validator.schema)