@@ -192,6 +192,31 @@ def test_parse_retentions(call_endpoint, default_project):
192192 }
193193
194194
195+ @django_db_all
196+ def test_parse_retentions_with_transactions (call_endpoint , default_project ):
197+ with patch ("sentry.quotas.backend" ) as quotas_mock :
198+ quotas_mock .get_retentions = lambda x : {
199+ DataCategory .ERROR : RetentionSettings (standard = 10 , downsampled = 20 ),
200+ DataCategory .REPLAY : RetentionSettings (standard = 11 , downsampled = 21 ),
201+ DataCategory .TRANSACTION : RetentionSettings (standard = 12 , downsampled = 22 ),
202+ DataCategory .LOG_BYTE : RetentionSettings (standard = 13 , downsampled = 23 ),
203+ }
204+ quotas_mock .get_event_retention = lambda x : 45
205+ quotas_mock .get_downsampled_event_retention = lambda x : 90
206+
207+ result , status_code = call_endpoint ()
208+ assert status_code < 400
209+ assert_no_snakecase_key (result )
210+ cfg = safe .get_path (result , "configs" , str (default_project .id ))
211+
212+ assert safe .get_path (cfg , "config" , "eventRetention" ) == 45
213+ assert safe .get_path (cfg , "config" , "downsampledEventRetention" ) == 90
214+ assert safe .get_path (cfg , "config" , "retentions" ) == {
215+ "span" : {"standard" : 12 , "downsampled" : 22 },
216+ "log" : {"standard" : 13 , "downsampled" : 23 },
217+ }
218+
219+
195220@django_db_all
196221def test_relays_dyamic_sampling (call_endpoint , default_project ) -> None :
197222 """
0 commit comments