Skip to content

Commit ba3d819

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
agentless: fix CreateAwsOnDemandTask test (DataDog#3299)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 2ee6e2d commit ba3d819

5 files changed

Lines changed: 8 additions & 8 deletions

File tree

.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:56.716"
2+
"spec_repo_commit": "55aea96",
3+
"generated": "2025-08-25 15:35:12.541"
44
}

examples/v2/agentless-scanning/CreateAwsOnDemandTask.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ func main() {
1616
body := datadogV2.AwsOnDemandCreateRequest{
1717
Data: datadogV2.AwsOnDemandCreateData{
1818
Attributes: datadogV2.AwsOnDemandCreateAttributes{
19-
Arn: "arn:aws:lambda:eu-west-3:376334461865:function:This-Is-An-Api-Spec-Test",
19+
Arn: "arn:aws:lambda:us-west-2:123456789012:function:my-function",
2020
},
2121
Type: datadogV2.AWSONDEMANDTYPE_AWS_RESOURCE,
2222
},
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2025-03-05T15:30:09.058Z
1+
2025-08-24T22:41:50.537Z

tests/scenarios/cassettes/TestScenarios/v2/Feature_Agentless_Scanning/Scenario_Post_an_AWS_on_demand_task_returns_AWS_on_demand_task_created_successfully._response.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
interactions:
22
- request:
33
body: |
4-
{"data":{"attributes":{"arn":"arn:aws:lambda:eu-west-3:376334461865:function:This-Is-An-Api-Spec-Test"},"type":"aws_resource"}}
4+
{"data":{"attributes":{"arn":"arn:aws:lambda:us-west-2:123456789012:function:my-function"},"type":"aws_resource"}}
55
form: {}
66
headers:
77
Accept:
@@ -12,7 +12,7 @@ interactions:
1212
method: POST
1313
url: https://api.datadoghq.com/api/v2/agentless_scanning/ondemand/aws
1414
response:
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
code: 201
1717
duration: 0ms
1818
headers:

tests/scenarios/features/v2/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)