diff --git a/tests/snuba/api/endpoints/test_organization_events_span_indexed.py b/tests/snuba/api/endpoints/test_organization_events_span_indexed.py index d1efacaa0f259d..c7d1ac8b71d325 100644 --- a/tests/snuba/api/endpoints/test_organization_events_span_indexed.py +++ b/tests/snuba/api/endpoints/test_organization_events_span_indexed.py @@ -874,6 +874,50 @@ def test_handle_nans_from_snuba(self): ) assert response.status_code == 200, response.content + def test_in_filter(self): + self.store_spans( + [ + self.create_span( + {"description": "foo", "sentry_tags": {"transaction": "bar"}}, + start_ts=self.ten_mins_ago, + ), + self.create_span( + {"description": "foo", "sentry_tags": {"transaction": "baz"}}, + start_ts=self.ten_mins_ago, + ), + self.create_span( + {"description": "foo", "sentry_tags": {"transaction": "bat"}}, + start_ts=self.ten_mins_ago, + ), + ], + is_eap=self.is_eap, + ) + response = self.do_request( + { + "field": ["transaction", "count()"], + "query": "transaction:[bar, baz]", + "orderby": "transaction", + "project": self.project.id, + "dataset": self.dataset, + } + ) + + assert response.status_code == 200, response.content + data = response.data["data"] + meta = response.data["meta"] + assert len(data) == 2 + assert data == [ + { + "transaction": "bar", + "count()": 1, + }, + { + "transaction": "baz", + "count()": 1, + }, + ] + assert meta["dataset"] == self.dataset + class OrganizationEventsEAPSpanEndpointTest(OrganizationEventsSpanIndexedEndpointTest): is_eap = True