Skip to content

Add integration tests for durable function execution status tag (SVLS-8583)#1187

Draft
jchrostek-dd wants to merge 1 commit intomainfrom
john/svls-8583
Draft

Add integration tests for durable function execution status tag (SVLS-8583)#1187
jchrostek-dd wants to merge 1 commit intomainfrom
john/svls-8583

Conversation

@jchrostek-dd
Copy link
Copy Markdown
Contributor

What

Adds integration tests for the aws_lambda.durable_function.execution_status tag added to the aws.lambda span in datadog-lambda-js (PR #763).

Why

Integration tests validate that the tag is set correctly when a Node.js Lambda function is invoked with a durable execution event, and that the guard prevents the tag from being set on non-durable invocations.

Changes

  • integration-tests/lambda/svls-8583-node/index.js — Handler that returns {Status: process.env.RETURN_STATUS} with optional DurableExecutionArn in the event
  • integration-tests/lib/stacks/svls-8583.ts — CDK stack with 3 Lambda functions (durable-succeeded, durable-failed, non-durable)
  • integration-tests/tests/svls-8583.test.ts — 9 test cases covering 3 scenarios
  • integration-tests/bin/app.ts — Registered Svls8583Stack

Test Scenarios (9 tests)

  1. durable-succeeded — invoked with DurableExecutionArn in event, returns {Status: "SUCCEEDED"} → asserts tag aws_lambda.durable_function.execution_status=SUCCEEDED
  2. durable-failed — invoked with DurableExecutionArn in event, returns {Status: "FAILED"} → asserts tag aws_lambda.durable_function.execution_status=FAILED
  3. non-durable — invoked without DurableExecutionArn, returns {Status: "SUCCEEDED"} → asserts tag is absent (guard test)

All 9 tests passed against real Lambda functions deployed to AWS.

Related

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant