@@ -11,74 +11,65 @@ Feature: AWS Integration
1111
1212 @team:DataDog/aws-integrations
1313 Scenario : Create an AWS account returns "AWS Account object" response
14- Given operation "CreateAWSAccount" enabled
15- And new "CreateAWSAccount" request
14+ Given new "CreateAWSAccount" request
1615 And body with value {"data" : {"attributes" : {"account_tags" : ["key:value" ], "auth_config" : {"role_name" : "DatadogIntegrationRole" }, "aws_account_id" : "123456789012" , "aws_partition" : "aws" , "logs_config" : {"lambda_forwarder" : {"lambdas" : ["arn:aws:lambda:us-east-1:123456789012:function:DatadogLambdaLogForwarder" ], "log_source_config" : {"tag_filters" : [{"source" : "s3" , "tags" : ["test:test" ]}]}, "sources" : ["s3" ]}}, "metrics_config" : {"automute_enabled" : true, "collect_cloudwatch_alarms" : true, "collect_custom_metrics" : true, "enabled" : true, "tag_filters" : [{"namespace" : "AWS/EC2" , "tags" : ["key:value" ]}]}, "resources_config" : {"cloud_security_posture_management_collection" : false, "extended_collection" : false}, "traces_config" : {}}, "type" : "account" }}
1716 When the request is sent
1817 Then the response status is 200 AWS Account object
1918
2019 @team:DataDog/aws-integrations
2120 Scenario : Create an AWS integration returns "AWS Account object" response
22- Given operation "CreateAWSAccount" enabled
23- And new "CreateAWSAccount" request
21+ Given new "CreateAWSAccount" request
2422 And body with value {"data" : {"attributes" : {"account_tags" : ["key:value" ], "auth_config" : {"access_key_id" : "AKIAIOSFODNN7EXAMPLE" , "secret_access_key" : "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY" }, "aws_account_id" : "123456789012" , "aws_partition" : "aws" , "logs_config" : {"lambda_forwarder" : {"lambdas" : ["arn:aws:lambda:us-east-1:123456789012:function:DatadogLambdaLogForwarder" ], "log_source_config" : {"tag_filters" : [{"source" : "s3" , "tags" : ["test:test" ]}]}, "sources" : ["s3" ]}}, "metrics_config" : {"automute_enabled" : true, "collect_cloudwatch_alarms" : true, "collect_custom_metrics" : true, "enabled" : true, "tag_filters" : [{"namespace" : "AWS/EC2" , "tags" : ["key:value" ]}]}, "resources_config" : {"cloud_security_posture_management_collection" : false, "extended_collection" : false}, "traces_config" : {}}, "type" : "account" }}
2523 When the request is sent
2624 Then the response status is 200 AWS Account object
2725
2826 @team:DataDog/aws-integrations
2927 Scenario : Create an AWS integration returns "Bad Request" response
30- Given operation "CreateAWSAccount" enabled
31- And new "CreateAWSAccount" request
28+ Given new "CreateAWSAccount" request
3229 And body with value {"data" : {"attributes" : {"account_tags" : ["key:value" ], "auth_config" : {"role_name" : "DatadogIntegrationRole" }, "aws_account_id" : "123456789012" , "aws_partition" : "aws-invalid" , "logs_config" : {"lambda_forwarder" : {"lambdas" : ["arn:aws:lambda:us-east-1:123456789012:function:DatadogLambdaLogForwarder" ], "log_source_config" : {"tag_filters" : [{"source" : "s3" , "tags" : ["test:test" ]}]}, "sources" : ["s3" ]}}, "metrics_config" : {"automute_enabled" : true, "collect_cloudwatch_alarms" : true, "collect_custom_metrics" : true, "enabled" : true, "tag_filters" : [{"namespace" : "AWS/EC2" , "tags" : ["key:value" ]}]}, "resources_config" : {"cloud_security_posture_management_collection" : false, "extended_collection" : false}, "traces_config" : {}}, "type" : "account" }}
3330 When the request is sent
3431 Then the response status is 400 Bad Request
3532
3633 @team:DataDog/aws-integrations
3734 Scenario : Create an AWS integration returns "Conflict" response
38- Given operation "CreateAWSAccount" enabled
39- And there is a valid "aws_account_v2" in the system
35+ Given there is a valid "aws_account_v2" in the system
4036 And new "CreateAWSAccount" request
4137 And body with value {"data" : {"attributes" : {"account_tags" : ["key:value" ], "auth_config" : {"role_name" : "DatadogIntegrationRole" }, "aws_account_id" : "123456789012" , "aws_partition" : "aws" , "logs_config" : {"lambda_forwarder" : {"lambdas" : ["arn:aws:lambda:us-east-1:123456789012:function:DatadogLambdaLogForwarder" ], "log_source_config" : {"tag_filters" : [{"source" : "s3" , "tags" : ["test:test" ]}]}, "sources" : ["s3" ]}}, "metrics_config" : {"automute_enabled" : true, "collect_cloudwatch_alarms" : true, "collect_custom_metrics" : true, "enabled" : true, "tag_filters" : [{"namespace" : "AWS/EC2" , "tags" : ["key:value" ]}]}, "resources_config" : {"cloud_security_posture_management_collection" : false, "extended_collection" : false}, "traces_config" : {}}, "type" : "account" }}
4238 When the request is sent
4339 Then the response status is 409 Conflict
4440
4541 @team:DataDog/aws-integrations
4642 Scenario : Delete an AWS integration returns "Bad Request" response
47- Given operation "DeleteAWSAccount" enabled
48- And new "DeleteAWSAccount" request
43+ Given new "DeleteAWSAccount" request
4944 And request contains "aws_account_config_id" parameter with value "not-a-uuid"
5045 When the request is sent
5146 Then the response status is 400 Bad Request
5247
5348 @team:DataDog/aws-integrations
5449 Scenario : Delete an AWS integration returns "No Content" response
55- Given operation "DeleteAWSAccount" enabled
56- And there is a valid "aws_account_v2" in the system
50+ Given there is a valid "aws_account_v2" in the system
5751 And new "DeleteAWSAccount" request
5852 And request contains "aws_account_config_id" parameter from "aws_account_v2.data.id"
5953 When the request is sent
6054 Then the response status is 204 No Content
6155
6256 @team:DataDog/aws-integrations
6357 Scenario : Delete an AWS integration returns "Not Found" response
64- Given operation "DeleteAWSAccount" enabled
65- And there is a valid "aws_account_v2" in the system
58+ Given there is a valid "aws_account_v2" in the system
6659 And new "DeleteAWSAccount" request
6760 And request contains "aws_account_config_id" parameter with value "448169a8-251c-4344-abee-1c4edef39f7a"
6861 When the request is sent
6962 Then the response status is 404 Not Found
7063
7164 @team:DataDog/aws-integrations
7265 Scenario : Generate a new external ID returns "AWS External ID object" response
73- Given operation "CreateNewAWSExternalID" enabled
74- And new "CreateNewAWSExternalID" request
66+ Given new "CreateNewAWSExternalID" request
7567 When the request is sent
7668 Then the response status is 200 AWS External ID object
7769
7870 @team:DataDog/aws-integrations
7971 Scenario : Generate new external ID returns "AWS External ID object" response
80- Given operation "CreateNewAWSExternalID" enabled
81- And new "CreateNewAWSExternalID" request
72+ Given new "CreateNewAWSExternalID" request
8273 When the request is sent
8374 Then the response status is 200 AWS External ID object
8475
@@ -90,54 +81,47 @@ Feature: AWS Integration
9081
9182 @team:DataDog/aws-integrations
9283 Scenario : Get an AWS integration by config ID returns "AWS Account object" response
93- Given operation "GetAWSAccount" enabled
94- And there is a valid "aws_account_v2" in the system
84+ Given there is a valid "aws_account_v2" in the system
9585 And new "GetAWSAccount" request
9686 And request contains "aws_account_config_id" parameter from "aws_account_v2.data.id"
9787 When the request is sent
9888 Then the response status is 200 AWS Account object
9989
10090 @team:DataDog/aws-integrations
10191 Scenario : Get an AWS integration by config ID returns "Bad Request" response
102- Given operation "GetAWSAccount" enabled
103- And new "GetAWSAccount" request
92+ Given new "GetAWSAccount" request
10493 And request contains "aws_account_config_id" parameter with value "not-a-uuid"
10594 When the request is sent
10695 Then the response status is 400 Bad Request
10796
10897 @team:DataDog/aws-integrations
10998 Scenario : Get an AWS integration by config ID returns "Not Found" response
110- Given operation "GetAWSAccount" enabled
111- And new "GetAWSAccount" request
99+ Given new "GetAWSAccount" request
112100 And request contains "aws_account_config_id" parameter with value "448169a8-251c-4344-abee-1c4edef39f7a"
113101 When the request is sent
114102 Then the response status is 404 Not Found
115103
116104 @team:DataDog/aws-integrations
117105 Scenario : List all AWS integrations returns "AWS Accounts List object" response
118- Given operation "ListAWSAccounts" enabled
119- And new "ListAWSAccounts" request
106+ Given new "ListAWSAccounts" request
120107 When the request is sent
121108 Then the response status is 200 AWS Accounts List object
122109
123110 @team:DataDog/aws-integrations
124111 Scenario : List available namespaces returns "AWS Namespaces List object" response
125- Given operation "ListAWSNamespaces" enabled
126- And new "ListAWSNamespaces" request
112+ Given new "ListAWSNamespaces" request
127113 When the request is sent
128114 Then the response status is 200 AWS Namespaces List object
129115
130116 @team:DataDog/aws-integrations
131117 Scenario : List namespaces returns "AWS Namespaces List object" response
132- Given operation "ListAWSNamespaces" enabled
133- And new "ListAWSNamespaces" request
118+ Given new "ListAWSNamespaces" request
134119 When the request is sent
135120 Then the response status is 200 AWS Namespaces List object
136121
137122 @team:DataDog/aws-integrations
138123 Scenario : Update an AWS integration returns "AWS Account object" response
139- Given operation "UpdateAWSAccount" enabled
140- And there is a valid "aws_account_v2" in the system
124+ Given there is a valid "aws_account_v2" in the system
141125 And new "UpdateAWSAccount" request
142126 And request contains "aws_account_config_id" parameter from "aws_account_v2.data.id"
143127 And body with value {"data" : {"attributes" : {"account_tags" : ["key:value" ], "auth_config" : {"role_name" : "DatadogIntegrationRole" }, "aws_account_id" : "123456789012" , "aws_partition" : "aws" , "logs_config" : {"lambda_forwarder" : {"lambdas" : ["arn:aws:lambda:us-east-1:123456789012:function:DatadogLambdaLogForwarder" ], "log_source_config" : {"tag_filters" : [{"source" : "s3" , "tags" : ["test:test" ]}]}, "sources" : ["s3" ]}}, "metrics_config" : {"automute_enabled" : true, "collect_cloudwatch_alarms" : true, "collect_custom_metrics" : true, "enabled" : true, "tag_filters" : [{"namespace" : "AWS/EC2" , "tags" : ["key:value" ]}]}, "resources_config" : {"cloud_security_posture_management_collection" : false, "extended_collection" : false}, "traces_config" : {}}, "type" : "account" }}
@@ -146,8 +130,7 @@ Feature: AWS Integration
146130
147131 @team:DataDog/aws-integrations
148132 Scenario : Update an AWS integration returns "Bad Request" response
149- Given operation "UpdateAWSAccount" enabled
150- And there is a valid "aws_account_v2" in the system
133+ Given there is a valid "aws_account_v2" in the system
151134 And new "UpdateAWSAccount" request
152135 And request contains "aws_account_config_id" parameter from "aws_account_v2.data.id"
153136 And body with value {"data" : {"attributes" : {"account_tags" : ["key:value" ], "auth_config" : {"access_key_id" : "AKIAIOSFODNN7EXAMPLE" , "secret_access_key" : "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY" }, "aws_account_id" : "123456789012" , "aws_partition" : "aws" , "logs_config" : {"lambda_forwarder" : {"lambdas" : ["arn:aws:lambda:us-east-1:123456789012:function:DatadogLambdaLogForwarder" ], "log_source_config" : {"tag_filters" : [{"source" : "s3" , "tags" : ["test:test" ]}]}, "sources" : ["s3" ]}}, "metrics_config" : {"automute_enabled" : true, "collect_cloudwatch_alarms" : true, "collect_custom_metrics" : true, "enabled" : true, "tag_filters" : [{"namespace" : "AWS/EC2" , "tags" : ["key:value" ]}]}, "resources_config" : {"cloud_security_posture_management_collection" : false, "extended_collection" : false}, "traces_config" : {}}, "type" : "account" }}
@@ -156,8 +139,7 @@ Feature: AWS Integration
156139
157140 @team:DataDog/aws-integrations
158141 Scenario : Update an AWS integration returns "Not Found" response
159- Given operation "UpdateAWSAccount" enabled
160- And new "UpdateAWSAccount" request
142+ Given new "UpdateAWSAccount" request
161143 And request contains "aws_account_config_id" parameter with value "448169a8-251c-4344-abee-1c4edef39f7a"
162144 And body with value {"data" : {"attributes" : {"account_tags" : ["key:value" ], "auth_config" : {"role_name" : "DatadogIntegrationRole" }, "aws_account_id" : "123456789012" , "aws_partition" : "aws" , "logs_config" : {"lambda_forwarder" : {"lambdas" : ["arn:aws:lambda:us-east-1:123456789012:function:DatadogLambdaLogForwarder" ], "log_source_config" : {"tag_filters" : [{"source" : "s3" , "tags" : ["test:test" ]}]}, "sources" : ["s3" ]}}, "metrics_config" : {"automute_enabled" : true, "collect_cloudwatch_alarms" : true, "collect_custom_metrics" : true, "enabled" : true, "tag_filters" : [{"namespace" : "AWS/EC2" , "tags" : ["key:value" ]}]}, "resources_config" : {"cloud_security_posture_management_collection" : false, "extended_collection" : false}, "traces_config" : {}}, "type" : "account" }}
163145 When the request is sent
0 commit comments