-
Notifications
You must be signed in to change notification settings - Fork 15
[SVLS-8054] add integration testing #946
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| @@ -0,0 +1,70 @@ | |||
| # Datadog Lambda Extension Integration Tests | |||
|
|
|||
| This directory contains integration tests for the Datadog Lambda Extension. | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
might be worth adding some notes here about the sorts of tests we should be including in this suite (vs the e2e test suite.)
| 3. Wait for data to propagate to Datadog. | ||
| 4. Call Datadog to get telemetry data and check the data based on test requirements. | ||
|
|
||
| For simplicity, integraiton tests are setup to only test against ARM runtimes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'd think that if this is intended to test the extension, then making sure that it is built correctly for arm vs. amd runtimes becomes important. or have we never seen architecture-dependent differences in our extension builds?
Overview
Setup integration tests for the lambda extension. These integration tests will run on every PR.
Details
This PR includes:
README.mdfor how to run tests locally.Note:
Gitlab Integration Test Step
The integration tests step in Gitlab will:
Executing the integration tests
The integration tests will automatically run on every PR. Developers can also run the integration tests locally by running
npm run test. Full information is included inREADME.md.Example Integration Tests
I added a 2 basic tests, one for node and one for python. These lambda function logs 'Hello World' and are setup with the extension and tracer library. The integration test gets the logs and traces from Datadog. It confirms that we have a log with the message 'Hello World!'. It also confirms we have spans with names
aws.lambda.cold_start,aws.lambda.loadandaws.lambda. Note that this isn't actually working correct for python foraws.lambda.loadandaws.lambda.cold_start. Those spans are created, but with a different traceId so they aren't getting linked toaws.lambda. I will follow up and investigate.I plan on having a follow up PR with other runtimes.
Testing
This PR triggered the integration tests, can see the corresponding gitlab pipeline with the newly added step 'integration-tests'. (Or see the 'dd-gitlab/integration-test' in the checks for this PR)
The results from the integration test can be obtained by going to integration step and downloading the artifacts. Screenshot attached below.