@@ -82,7 +82,7 @@ def test_playstation_with_feature_flag(
8282 playstation_dump = load_dump_file ("playstation.prosperodmp" )
8383 mini_sentry .add_full_project_config (
8484 PROJECT_ID ,
85- extra = {"config" : {"features" : ["projects :relay-playstation-ingestion" ]}},
85+ extra = {"config" : {"features" : ["organizations :relay-playstation-ingestion" ]}},
8686 )
8787 outcomes_consumer = outcomes_consumer ()
8888 attachments_consumer = attachments_consumer ()
@@ -150,7 +150,7 @@ def test_playstation_attachment(
150150 playstation_dump = load_dump_file ("playstation.prosperodmp" )
151151 mini_sentry .add_full_project_config (
152152 PROJECT_ID ,
153- extra = {"config" : {"features" : ["projects :relay-playstation-ingestion" ]}},
153+ extra = {"config" : {"features" : ["organizations :relay-playstation-ingestion" ]}},
154154 )
155155 outcomes_consumer = outcomes_consumer ()
156156 attachments_consumer = attachments_consumer ()
@@ -218,3 +218,59 @@ def test_playstation_attachment(
218218 assert "_metrics" in event_data
219219 assert event_data ["_metrics" ]["bytes.ingested.event.minidump" ] > 0
220220 assert event_data ["_metrics" ]["bytes.ingested.event.attachment" ] > 0
221+
222+
223+ def test_playstation_attachment_no_feature_flag (
224+ mini_sentry ,
225+ relay_with_playstation ,
226+ outcomes_consumer ,
227+ attachments_consumer ,
228+ ):
229+ PROJECT_ID = 42
230+ playstation_dump = load_dump_file ("playstation.prosperodmp" )
231+ mini_sentry .add_full_project_config (
232+ PROJECT_ID ,
233+ )
234+ outcomes_consumer = outcomes_consumer ()
235+ attachments_consumer = attachments_consumer ()
236+ relay = relay_with_playstation ()
237+
238+ bogus_error = {
239+ "event_id" : "cbf6960622e14a45abc1f03b2055b186" ,
240+ "type" : "error" ,
241+ "exception" : {"values" : [{"type" : "ValueError" , "value" : "Should not happen" }]},
242+ }
243+ envelope = Envelope ()
244+ envelope .add_event (bogus_error )
245+
246+ # Add the PlayStation dump as an attachment
247+ envelope .add_item (
248+ Item (
249+ type = "attachment" ,
250+ payload = PayloadRef (bytes = playstation_dump ),
251+ headers = {
252+ "attachment_type" : "playstation.prosperodump" ,
253+ "filename" : "playstation.prosperodmp" ,
254+ "content_type" : "application/octet-stream" ,
255+ },
256+ )
257+ )
258+ relay .send_envelope (PROJECT_ID , envelope )
259+
260+ while True :
261+ _ , message = attachments_consumer .get_message ()
262+ if message is None or message ["type" ] != "attachment_chunk" :
263+ event = message
264+ break
265+
266+ assert event
267+
268+ assert len (event ["attachments" ]) == 1
269+ attachment = event ["attachments" ][0 ]
270+ assert attachment ["attachment_type" ] == "playstation.prosperodump"
271+
272+ event_data = json .loads (event ["payload" ])
273+ assert event_data ["type" ] == "error"
274+ assert "exception" in event_data
275+ assert event_data ["exception" ]["values" ][0 ]["type" ] == "ValueError"
276+ assert event_data ["exception" ]["values" ][0 ]["value" ] == "Should not happen"
0 commit comments