You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This directory contains integration tests for the Datadog Lambda Extension.
4
4
5
+
Each test suite has a cdk stack and an associated test file. Example, `base.ts` and `base.tests.ts`. Test suits are run in parallel in Gitlab CI/CD pipeline.
6
+
5
7
The general flow is:
6
8
1. Deploy test setup using CDK.
7
9
2. Invoke lambda functions.
8
10
3. Wait for data to propagate to Datadog.
9
11
4. Call Datadog to get telemetry data and check the data based on test requirements.
10
12
11
-
For simplicity, integration tests are setup to only test against ARM runtimes.
12
-
13
-
## Supported Runtimes
13
+
For simplicity, integration tests are set up to only test against ARM runtimes and 4 runtimes (Python, Node, Java, and Dotnet).
14
14
15
-
All test suites cover the following Lambda runtimes:
16
-
-**Java 21** - Eclipse Temurin
17
-
-**.NET 8** - Alpine
18
-
-**Python 3.12/3.13** - Standard Python runtime
19
-
-**Node.js 20** - Alpine
20
15
21
16
## Test Suites
22
17
23
-
Integration tests are organized into independent test suites that run in parallel in the GitLab CI/CD pipeline. Each suite has its own lifecycle (deploy → test → cleanup) and can be executed independently.
24
-
25
18
### Base Tests
26
19
27
20
The base test suite provides basic functionality tests across all supported Lambda runtimes. These tests verify core extension functionality without additional instrumentation.
@@ -55,10 +48,6 @@ The OTLP test suite verifies OpenTelemetry Protocol (OTLP) integration with the
55
48
56
49
## CI/CD Pipeline Structure
57
50
58
-
The GitLab CI/CD pipeline runs test suites independently in parallel, providing:
59
-
-**Isolation**: One test suite failure doesn't block others
60
-
-**Speed**: Test suites run simultaneously
61
-
-**Efficiency**: Can retry individual test suites without redeploying all stacks
--output text | xargs -n1 aws cloudformation delete-stack --stack-name
117
-
```
118
-
119
-
## Building Lambda Functions
120
-
121
-
Lambda functions with compiled languages (Java, .NET) or external dependencies (Python, Node.js with packages) must be built before deployment. Build scripts use Docker for cross-platform compatibility and don't require local toolchains.
122
-
123
-
### Build Scripts
124
-
125
-
Runtime-specific build scripts are located in `scripts/`:
126
-
127
-
```bash
128
-
# Build all Java Lambda functions
129
-
./scripts/build-java.sh
130
-
131
-
# Build all .NET Lambda functions
132
-
./scripts/build-dotnet.sh
133
-
134
-
# Build all Python Lambda functions
135
-
./scripts/build-python.sh
136
-
137
-
# Build all Node.js Lambda functions
138
-
./scripts/build-node.sh
139
-
```
140
-
141
-
You can also build a specific function by providing its path:
142
-
143
-
```bash
144
-
# Build a specific Java function
145
-
./scripts/build-java.sh lambda/otlp-java
146
-
147
-
# Build a specific .NET function
148
-
./scripts/build-dotnet.sh lambda/base-dotnet
149
-
```
150
-
151
-
**Note:** The `local_deploy.sh` script automatically builds required Lambda functions based on the stack name, so manual building is optional for local development.
0 commit comments