|
42 | 42 | service_mapping as global_service_mapping, |
43 | 43 | propagator, |
44 | 44 | emit_telemetry_on_exception_outside_of_handler, |
45 | | - is_step_function_event, |
46 | 45 | ) |
47 | 46 | from datadog_lambda.trigger import EventTypes |
48 | 47 |
|
@@ -2331,69 +2330,6 @@ def test_deterministic_m5_hash__always_leading_with_zero(self): |
2331 | 2330 | if len(result_in_binary) == 66: # "0b" + 64 bits. |
2332 | 2331 | self.assertTrue(result_in_binary.startswith("0b0")) |
2333 | 2332 |
|
2334 | | - def test_is_step_function_event_jsonata(self): |
2335 | | - event = { |
2336 | | - "_datadog": { |
2337 | | - "Execution": { |
2338 | | - "Id": "665c417c-1237-4742-aaca-8b3becbb9e75", |
2339 | | - "RedriveCount": 0, |
2340 | | - }, |
2341 | | - "StateMachine": {}, |
2342 | | - "State": { |
2343 | | - "Name": "my-awesome-state", |
2344 | | - "EnteredTime": "Mon Nov 13 12:43:33 PST 2023", |
2345 | | - "RetryCount": 0, |
2346 | | - }, |
2347 | | - "x-datadog-trace-id": "5821803790426892636", |
2348 | | - "x-datadog-tags": "_dd.p.dm=-0,_dd.p.tid=672a7cb100000000", |
2349 | | - "serverless-version": "v1", |
2350 | | - } |
2351 | | - } |
2352 | | - self.assertTrue(is_step_function_event(event)) |
2353 | | - |
2354 | | - def test_is_step_function_event_jsonpath(self): |
2355 | | - event = { |
2356 | | - "Execution": { |
2357 | | - "Id": "665c417c-1237-4742-aaca-8b3becbb9e75", |
2358 | | - "RedriveCount": 0, |
2359 | | - }, |
2360 | | - "StateMachine": {}, |
2361 | | - "State": { |
2362 | | - "Name": "my-awesome-state", |
2363 | | - "EnteredTime": "Mon Nov 13 12:43:33 PST 2023", |
2364 | | - "RetryCount": 0, |
2365 | | - }, |
2366 | | - } |
2367 | | - self.assertTrue(is_step_function_event(event)) |
2368 | | - |
2369 | | - def test_is_step_function_event_legacy_lambda(self): |
2370 | | - event = { |
2371 | | - "Payload": { |
2372 | | - "Execution": { |
2373 | | - "Id": "665c417c-1237-4742-aaca-8b3becbb9e75", |
2374 | | - "RedriveCount": 0, |
2375 | | - }, |
2376 | | - "StateMachine": {}, |
2377 | | - "State": { |
2378 | | - "Name": "my-awesome-state", |
2379 | | - "EnteredTime": "Mon Nov 13 12:43:33 PST 2023", |
2380 | | - "RetryCount": 0, |
2381 | | - }, |
2382 | | - } |
2383 | | - } |
2384 | | - self.assertTrue(is_step_function_event(event)) |
2385 | | - |
2386 | | - def test_is_step_function_event_dd_header(self): |
2387 | | - event = { |
2388 | | - "_datadog": { |
2389 | | - "x-datadog-trace-id": "5821803790426892636", |
2390 | | - "x-datadog-parent-id": "5821803790426892636", |
2391 | | - "x-datadog-tags": "_dd.p.dm=-0,_dd.p.tid=672a7cb100000000", |
2392 | | - "x-datadog-sampling-priority": "1", |
2393 | | - } |
2394 | | - } |
2395 | | - self.assertFalse(is_step_function_event(event)) |
2396 | | - |
2397 | 2333 |
|
2398 | 2334 | class TestExceptionOutsideHandler(unittest.TestCase): |
2399 | 2335 | @patch("datadog_lambda.tracing.dd_tracing_enabled", True) |
|
0 commit comments