Skip to content

Commit 585013e

Browse files
committed
chore(search): Add mixed wildcard/non-wildcard test
Missed a comment suggesting this on #100644.
1 parent 30dcb50 commit 585013e

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

tests/sentry/search/events/test_filter.py

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1103,6 +1103,35 @@ def _project(x):
11031103
],
11041104
[],
11051105
),
1106+
(
1107+
"mixed wildcards and non-wildcards",
1108+
'error.mechanism:["abc", "*ABC*"]',
1109+
[
1110+
Or(
1111+
conditions=[
1112+
Condition(
1113+
lhs=Column(name="exception_stacks.mechanism_type"),
1114+
op=Op.LIKE,
1115+
rhs="%ABC%",
1116+
),
1117+
Condition(
1118+
lhs=Function(
1119+
function="hasAny",
1120+
parameters=[
1121+
Column(name="exception_stacks.mechanism_type"),
1122+
[
1123+
"abc",
1124+
],
1125+
],
1126+
),
1127+
op=Op.EQ,
1128+
rhs=1,
1129+
),
1130+
]
1131+
)
1132+
],
1133+
[],
1134+
),
11061135
],
11071136
)
11081137
def test_snql_boolean_search(description, query, expected_where, expected_having) -> None:

0 commit comments

Comments
 (0)