Skip to content

Commit

Permalink
Merge pull request #54 from mkanoor/aap_16038
Browse files Browse the repository at this point in the history
fix: support non alpha key at root level
  • Loading branch information
mkanoor committed Sep 15, 2023
2 parents c5c0b9d + 4c17d64 commit ea749c7
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "drools_jpy"
version = "0.3.6"
version = "0.3.7"
authors = [
{ name="Madhu Kanoor", email="author@example.com" },
]
Expand Down
Binary file not shown.
45 changes: 45 additions & 0 deletions tests/asts/test_non_alpha_key_ast.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
- RuleSet:
hosts:
- all
name: Non alpha key
rules:
- Rule:
actions:
- Action:
action: debug
action_args:
msg: First check worked
condition:
AllCondition:
- EqualsExpression:
lhs:
Event: '["http://www.example.com"]'
rhs:
String: down
enabled: true
name: Check key with slash,dot and colon at root level
- Rule:
actions:
- Action:
action: debug
action_args:
msg: Second check worked
condition:
AllCondition:
- EqualsExpression:
lhs:
Event: urls["http://www.example.com"]
rhs:
String: up
enabled: true
name: Check key with slash,dot and colon at non root level
sources:
- EventSource:
name: ansible.eda.generic
source_args:
payload:
- http://www.example.com: down
- urls:
http://www.example.com: up
source_filters: []
source_name: ansible.eda.generic
1 change: 1 addition & 0 deletions tests/test_ruleset.py
Original file line number Diff line number Diff line change
Expand Up @@ -984,6 +984,7 @@ def test_assert_event_string_search():
"asts/test_delayed_comparison_ast.yml",
"asts/test_squaredaccessor_cases_ast.yml",
"asts/test_squaredaccessor_selectattr_cases_ast.yml",
"asts/test_non_alpha_key_ast.yml",
],
)
def test_integrated(rulebook):
Expand Down

0 comments on commit ea749c7

Please sign in to comment.