diff --git a/tests/integrations/redis/asyncio/test_redis_asyncio.py b/tests/integrations/redis/asyncio/test_redis_asyncio.py index 05be4790a2..0c77c12fb0 100644 --- a/tests/integrations/redis/asyncio/test_redis_asyncio.py +++ b/tests/integrations/redis/asyncio/test_redis_asyncio.py @@ -34,25 +34,11 @@ async def test_async_basic(sentry_init, capture_events): } -@pytest.mark.parametrize( - "is_transaction, send_default_pii, expected_first_ten", - [ - (False, False, ["GET 'foo'", "SET 'bar' [Filtered]", "SET 'baz' [Filtered]"]), - (True, True, ["GET 'foo'", "SET 'bar' 1", "SET 'baz' 2"]), - ], -) @pytest.mark.asyncio -async def test_async_redis_pipeline( - sentry_init, - capture_items, - is_transaction, - send_default_pii, - expected_first_ten, -): +async def test_async_redis_pipeline(sentry_init, capture_items): sentry_init( integrations=[RedisIntegration()], traces_sample_rate=1.0, - send_default_pii=send_default_pii, ) connection = FakeRedis() @@ -60,7 +46,7 @@ async def test_async_redis_pipeline( items = capture_items("span") with sentry_sdk.start_span(name="custom parent"): - pipeline = connection.pipeline(transaction=is_transaction) + pipeline = connection.pipeline() pipeline.get("foo") pipeline.set("bar", 1) pipeline.set("baz", 2) diff --git a/tests/integrations/redis/cluster/test_redis_cluster.py b/tests/integrations/redis/cluster/test_redis_cluster.py index 70b347ef55..a72c476638 100644 --- a/tests/integrations/redis/cluster/test_redis_cluster.py +++ b/tests/integrations/redis/cluster/test_redis_cluster.py @@ -104,23 +104,10 @@ def test_rediscluster_basic( assert attrs["db.redis.key"] == "bar" -@pytest.mark.parametrize( - "send_default_pii, expected_first_ten", - [ - (False, ["GET 'foo'", "SET 'bar' [Filtered]", "SET 'baz' [Filtered]"]), - (True, ["GET 'foo'", "SET 'bar' 1", "SET 'baz' 2"]), - ], -) -def test_rediscluster_pipeline( - sentry_init, - capture_items, - send_default_pii, - expected_first_ten, -): +def test_rediscluster_pipeline(sentry_init, capture_items): sentry_init( integrations=[RedisIntegration()], traces_sample_rate=1.0, - send_default_pii=send_default_pii, ) rc = redis.RedisCluster(host="localhost", port=6379) diff --git a/tests/integrations/redis/cluster_asyncio/test_redis_cluster_asyncio.py b/tests/integrations/redis/cluster_asyncio/test_redis_cluster_asyncio.py index b3b5f49e46..bd819e3cd0 100644 --- a/tests/integrations/redis/cluster_asyncio/test_redis_cluster_asyncio.py +++ b/tests/integrations/redis/cluster_asyncio/test_redis_cluster_asyncio.py @@ -62,23 +62,23 @@ async def test_async_breadcrumb(sentry_init, capture_events): @pytest.mark.parametrize( - "send_default_pii, description", + "data_collection, description", [ - (False, "SET 'bar' [Filtered]"), - (True, "SET 'bar' 1"), + ({"database_query_data": False}, "SET 'bar' [Filtered]"), + ({"database_query_data": True}, "SET 'bar' 1"), ], ) @pytest.mark.asyncio async def test_async_basic( sentry_init, capture_items, - send_default_pii, + data_collection, description, ): sentry_init( integrations=[RedisIntegration()], traces_sample_rate=1.0, - send_default_pii=send_default_pii, + data_collection=data_collection, ) connection = cluster.RedisCluster(host="localhost", port=6379) @@ -105,24 +105,11 @@ async def test_async_basic( assert attrs["db.redis.key"] == "bar" -@pytest.mark.parametrize( - "send_default_pii, expected_first_ten", - [ - (False, ["GET 'foo'", "SET 'bar' [Filtered]", "SET 'baz' [Filtered]"]), - (True, ["GET 'foo'", "SET 'bar' 1", "SET 'baz' 2"]), - ], -) @pytest.mark.asyncio -async def test_async_redis_pipeline( - sentry_init, - capture_items, - send_default_pii, - expected_first_ten, -): +async def test_async_redis_pipeline(sentry_init, capture_items): sentry_init( integrations=[RedisIntegration()], traces_sample_rate=1.0, - send_default_pii=send_default_pii, ) connection = cluster.RedisCluster(host="localhost", port=6379) diff --git a/tests/integrations/redis/test_redis.py b/tests/integrations/redis/test_redis.py index 68a3672c1c..8e9b0527a7 100644 --- a/tests/integrations/redis/test_redis.py +++ b/tests/integrations/redis/test_redis.py @@ -42,52 +42,6 @@ def test_basic(sentry_init, capture_events): } -@pytest.mark.parametrize( - "data_collection, expected_first_ten", - [ - ( - {"database_query_data": False}, - ["GET 'foo'", "SET 'bar'", "SET 'baz'"], - ), - ( - {"database_query_data": True}, - ["GET 'foo'", "SET 'bar' 1", "SET 'baz' 2"], - ), - ], -) -def test_redis_pipeline_data_collection( - sentry_init, - capture_items, - data_collection, - expected_first_ten, -): - sentry_init( - integrations=[RedisIntegration()], - traces_sample_rate=1.0, - data_collection=data_collection, - ) - - connection = FakeRedis() - - items = capture_items("span") - - with sentry_sdk.start_span(name="custom parent"): - pipeline = connection.pipeline(transaction=False) - pipeline.get("foo") - pipeline.set("bar", 1) - pipeline.set("baz", 2) - pipeline.execute() - - sentry_sdk.flush() - - assert len(items) == 2 - pipeline_span, parent_span = items[0].payload, items[1].payload - - assert parent_span["name"] == "custom parent" - assert pipeline_span["name"] == "redis.pipeline.execute" - assert pipeline_span["attributes"]["sentry.op"] == "db.redis" - - def test_pii_data_redacted( sentry_init, capture_items,