Skip to content

Commit 2f52ea8

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

5 files changed

+8
-8
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:18:13.118"
2+
"spec_repo_commit": "55aea96",
3+
"generated": "2025-08-25 15:34:07.121"
44
}

examples/v2/agentless-scanning/CreateAwsOnDemandTask.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
body = AwsOnDemandCreateRequest(
1313
data=AwsOnDemandCreateData(
1414
attributes=AwsOnDemandCreateAttributes(
15-
arn="arn:aws:lambda:eu-west-3:376334461865:function:This-Is-An-Api-Spec-Test",
15+
arn="arn:aws:lambda:us-west-2:123456789012:function:my-function",
1616
),
1717
type=AwsOnDemandType.AWS_RESOURCE,
1818
),
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/v2/cassettes/test_scenarios/test_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,6 +1,6 @@
11
interactions:
22
- request:
3-
body: '{"data":{"attributes":{"arn":"arn:aws:lambda:eu-west-3:376334461865:function:This-Is-An-Api-Spec-Test"},"type":"aws_resource"}}'
3+
body: '{"data":{"attributes":{"arn":"arn:aws:lambda:us-west-2:123456789012:function:my-function"},"type":"aws_resource"}}'
44
headers:
55
accept:
66
- application/json
@@ -10,7 +10,7 @@ interactions:
1010
uri: https://api.datadoghq.com/api/v2/agentless_scanning/ondemand/aws
1111
response:
1212
body:
13-
string: '{"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"}}}'
13+
string: '{"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"}}}'
1414
headers:
1515
content-type:
1616
- application/vnd.api+json

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