Skip to content

Commit 1e6b071

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
agentless: fix CreateAwsOnDemandTask test (#3083)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 922938f commit 1e6b071

File tree

5 files changed

+9
-10
lines changed

5 files changed

+9
-10
lines changed

.generated-info

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"spec_repo_commit": "c3b2b7d",
3-
"generated": "2025-08-25 10:19:34.863"
2+
"spec_repo_commit": "55aea96",
3+
"generated": "2025-08-25 15:35:31.393"
44
}

examples/v2/agentless-scanning/CreateAwsOnDemandTask.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ public static void main(String[] args) {
2020
new AwsOnDemandCreateData()
2121
.attributes(
2222
new AwsOnDemandCreateAttributes()
23-
.arn(
24-
"arn:aws:lambda:eu-west-3:376334461865:function:This-Is-An-Api-Spec-Test"))
23+
.arn("arn:aws:lambda:us-west-2:123456789012:function:my-function"))
2524
.type(AwsOnDemandType.AWS_RESOURCE));
2625

2726
try {
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2025-03-05T15:30:09.058Z
1+
2025-08-24T22:41:50.537Z

src/test/resources/cassettes/features/v2/Post_an_AWS_on_demand_task_returns_AWS_on_demand_task_created_successfully_response.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"httpRequest": {
44
"body": {
55
"type": "JSON",
6-
"json": "{\"data\":{\"attributes\":{\"arn\":\"arn:aws:lambda:eu-west-3:376334461865:function:This-Is-An-Api-Spec-Test\"},\"type\":\"aws_resource\"}}"
6+
"json": "{\"data\":{\"attributes\":{\"arn\":\"arn:aws:lambda:us-west-2:123456789012:function:my-function\"},\"type\":\"aws_resource\"}}"
77
},
88
"headers": {},
99
"method": "POST",
@@ -12,7 +12,7 @@
1212
"secure": true
1313
},
1414
"httpResponse": {
15-
"body": "{\"data\":{\"id\":\"aaa12247-2b39-4b70-a2fd-a804840e17f5\",\"type\":\"aws_resource\",\"attributes\":{\"arn\":\"arn:aws:lambda:eu-west-3:376334461865:function:This-Is-An-Api-Spec-Test\",\"created_at\":\"2025-03-05T15:30:09.129732Z\",\"status\":\"QUEUED\"}}}",
15+
"body": "{\"data\":{\"id\":\"20fa1c5c-0f03-4db7-b1d9-e360226bb786\",\"type\":\"aws_resource\",\"attributes\":{\"arn\":\"arn:aws:lambda:us-west-2:123456789012:function:my-function\",\"created_at\":\"2025-08-24T22:41:51.043274Z\",\"status\":\"QUEUED\"}}}",
1616
"headers": {
1717
"Content-Type": [
1818
"application/vnd.api+json"
@@ -27,6 +27,6 @@
2727
"timeToLive": {
2828
"unlimited": true
2929
},
30-
"id": "00ab1d14-e325-68fb-f9c3-515f72084164"
30+
"id": "22e692ec-0118-56ae-6a7b-e829dfef8419"
3131
}
3232
]

src/test/resources/com/datadog/api/client/v2/api/agentless_scanning.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,10 @@ Feature: Agentless Scanning
123123
@team:DataDog/k9-agentless
124124
Scenario: Post an AWS on demand task returns "AWS on demand task created successfully." response
125125
Given new "CreateAwsOnDemandTask" request
126-
And body with value {"data": {"attributes": {"arn": "arn:aws:lambda:eu-west-3:376334461865:function:This-Is-An-Api-Spec-Test"}, "type": "aws_resource"}}
126+
And body with value {"data": {"attributes": {"arn": "arn:aws:lambda:us-west-2:123456789012:function:my-function"}, "type": "aws_resource"}}
127127
When the request is sent
128128
Then the response status is 201 AWS on demand task created successfully
129-
And the response "data.attributes.arn" is equal to "arn:aws:lambda:eu-west-3:376334461865:function:This-Is-An-Api-Spec-Test"
129+
And the response "data.attributes.arn" is equal to "arn:aws:lambda:us-west-2:123456789012:function:my-function"
130130
And the response "data.attributes.status" is equal to "QUEUED"
131131

132132
@team:DataDog/k9-agentless

0 commit comments

Comments
 (0)