Skip to content

Commit

Permalink
Add unit test for schema.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
is3ka1 committed May 27, 2022
1 parent 395b4a8 commit e026323
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions tests/loaders_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down Expand Up @@ -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)

0 comments on commit e026323

Please sign in to comment.