Skip to content

Commit

Permalink
test user column as well
Browse files Browse the repository at this point in the history
  • Loading branch information
volokluev committed Dec 19, 2024
1 parent 338b921 commit f26180e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/manual_jobs/test_scrub_user_from_spans.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,18 @@ def test_do_the_thing() -> None:
f"SELECT any(has(sentry_tags.value, '{_IP_ADDRESS}')) FROM spans_local WHERE project_id IN [1,2]"
)
assert res.results[0][0] == 0

res = connection.execute(
f"SELECT countIf(user = '{_IP_ADDRESS}') FROM spans_local WHERE project_id IN [1,2]"
)
assert res.results[0][0] == 0

res = connection.execute(
f"SELECT groupBitAnd(has(sentry_tags.value, 'ip:{_IP_ADDRESS}')) FROM spans_local WHERE project_id IN [3, 4, 5]"
)
assert res.results[0][0] == 1

res = connection.execute(
f"SELECT countIf(user = 'ip:{_IP_ADDRESS}') FROM spans_local WHERE project_id IN [3, 4, 5]"
)
assert res.results[0][0] > 0

0 comments on commit f26180e

Please sign in to comment.