Skip to content

Commit

Permalink
Add team tags to scenarios (#1235)
Browse files Browse the repository at this point in the history
* report test.codeowners

* use upstream

* Regenerate client from commit 3c4d6d2 of spec repo

Co-authored-by: Jiri Kuncar <[email protected]>
Co-authored-by: api-clients-generation-pipeline[bot] <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com>
Co-authored-by: ci.datadog-api-spec <[email protected]>
  • Loading branch information
3 people authored Dec 10, 2021
1 parent 5eb0d4c commit b126490
Show file tree
Hide file tree
Showing 49 changed files with 793 additions and 610 deletions.
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.5.1.dev2",
"regenerated": "2021-12-07 14:19:59.354576",
"spec_repo_commit": "df97aef"
"regenerated": "2021-12-10 14:06:55.492345",
"spec_repo_commit": "3c4d6d2"
},
"v2": {
"apigentools_version": "1.5.1.dev2",
"regenerated": "2021-12-07 14:19:59.374987",
"spec_repo_commit": "df97aef"
"regenerated": "2021-12-10 14:06:55.513891",
"spec_repo_commit": "3c4d6d2"
}
}
}
1 change: 1 addition & 0 deletions examples/v2/logs/ListLogs.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ func main() {
}
ctx := datadog.NewDefaultContext(context.Background())
configuration := datadog.NewConfiguration()
configuration.SetUnstableOperationEnabled("ListLogs", true)
apiClient := datadog.NewAPIClient(configuration)
resp, r, err := apiClient.LogsApi.ListLogs(ctx, *datadog.NewListLogsOptionalParameters().WithBody(body))

Expand Down
3 changes: 2 additions & 1 deletion tests/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ require (
github.com/DataDog/datadog-go v4.8.2+incompatible // indirect
github.com/DataDog/dd-sdk-go-testing v0.0.0-20210929140144-5d69f0a9bd49
github.com/Microsoft/go-winio v0.5.1 // indirect
github.com/cucumber/messages-go/v12 v12.0.0
github.com/dnaeon/go-vcr v1.0.1
github.com/go-bdd/gobdd v1.1.3
github.com/go-bdd/gobdd v1.1.4-0.20211209204431-ca566a78d075
github.com/gogo/protobuf v1.3.2 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/jonboulle/clockwork v0.1.0
Expand Down
4 changes: 2 additions & 2 deletions tests/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.m
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
github.com/go-bdd/assert v0.0.0-20190820124234-20d47a68475d h1:zQazu3kApPoajWmXj9zFpCNE+UDefwwFRijKjzvHNCM=
github.com/go-bdd/assert v0.0.0-20190820124234-20d47a68475d/go.mod h1:dOoqt7g2I/fpR7/Pyz0P19J3xjDj5lsHn3v9EaFLRjM=
github.com/go-bdd/gobdd v1.1.3 h1:eirGvZ9gMz6clOo2k6O7+Ys3iHAaFZoRQXVwV76B3JI=
github.com/go-bdd/gobdd v1.1.3/go.mod h1:Q3mXpW/Qm9GJCPLxFCTXdTtRBdHzcTfrbeLlaqAPtXM=
github.com/go-bdd/gobdd v1.1.4-0.20211209204431-ca566a78d075 h1:k64p+YO2V0RPfM/j2fGZzslaCi6CRRZCxGB7rFYMvyM=
github.com/go-bdd/gobdd v1.1.4-0.20211209204431-ca566a78d075/go.mod h1:Q3mXpW/Qm9GJCPLxFCTXdTtRBdHzcTfrbeLlaqAPtXM=
github.com/gofrs/uuid v3.2.0+incompatible h1:y12jRkkFxsd7GpqdSZ+/KCs/fJbqpEXSGd4+jfEaewE=
github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o=
Expand Down
3 changes: 2 additions & 1 deletion tests/scenarios/features/v1/authentication.feature
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@ Feature: Authentication
Given an instance of "Authentication" API
And new "Validate" request

@skip-validation
@skip-validation @team:DataDog/team-aaa
Scenario: Validate API key returns "Forbidden" response
When the request is sent
Then the response status is 403 OK

@team:DataDog/team-aaa
Scenario: Validate API key returns "OK" response
Given a valid "apiKeyAuth" key in the system
When the request is sent
Expand Down
40 changes: 20 additions & 20 deletions tests/scenarios/features/v1/aws_integration.feature
Original file line number Diff line number Diff line change
Expand Up @@ -9,135 +9,135 @@ Feature: AWS Integration
And a valid "appKeyAuth" key in the system
And an instance of "AWSIntegration" API

@generated @skip
@generated @skip @team:DataDog/cloud-integrations
Scenario: Create an AWS integration returns "Bad Request" response
Given new "CreateAWSAccount" request
And body with value {"access_key_id": null, "account_id": "1234567", "account_specific_namespace_rules": {"auto_scaling": false, "opswork": false}, "cspm_resource_collection_enabled": true, "excluded_regions": ["us-east-1", "us-west-2"], "filter_tags": ["<KEY>:<VALUE>"], "host_tags": ["<KEY>:<VALUE>"], "metrics_collection_enabled": false, "resource_collection_enabled": true, "role_name": "DatadogAWSIntegrationRole", "secret_access_key": null}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip
@generated @skip @team:DataDog/cloud-integrations
Scenario: Create an AWS integration returns "Conflict Error" response
Given new "CreateAWSAccount" request
And body with value {"access_key_id": null, "account_id": "1234567", "account_specific_namespace_rules": {"auto_scaling": false, "opswork": false}, "cspm_resource_collection_enabled": true, "excluded_regions": ["us-east-1", "us-west-2"], "filter_tags": ["<KEY>:<VALUE>"], "host_tags": ["<KEY>:<VALUE>"], "metrics_collection_enabled": false, "resource_collection_enabled": true, "role_name": "DatadogAWSIntegrationRole", "secret_access_key": null}
When the request is sent
Then the response status is 409 Conflict Error

@generated @skip
@generated @skip @team:DataDog/cloud-integrations
Scenario: Create an AWS integration returns "OK" response
Given new "CreateAWSAccount" request
And body with value {"access_key_id": null, "account_id": "1234567", "account_specific_namespace_rules": {"auto_scaling": false, "opswork": false}, "cspm_resource_collection_enabled": true, "excluded_regions": ["us-east-1", "us-west-2"], "filter_tags": ["<KEY>:<VALUE>"], "host_tags": ["<KEY>:<VALUE>"], "metrics_collection_enabled": false, "resource_collection_enabled": true, "role_name": "DatadogAWSIntegrationRole", "secret_access_key": null}
When the request is sent
Then the response status is 200 OK

@generated @skip
@generated @skip @team:DataDog/cloud-integrations
Scenario: Delete a tag filtering entry returns "Bad Request" response
Given new "DeleteAWSTagFilter" request
And body with value {"account_id": "FAKEAC0FAKEAC2FAKEAC", "namespace": "elb"}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip
@generated @skip @team:DataDog/cloud-integrations
Scenario: Delete a tag filtering entry returns "OK" response
Given new "DeleteAWSTagFilter" request
And body with value {"account_id": "FAKEAC0FAKEAC2FAKEAC", "namespace": "elb"}
When the request is sent
Then the response status is 200 OK

@generated @skip
@generated @skip @team:DataDog/cloud-integrations
Scenario: Delete an AWS integration returns "Bad Request" response
Given new "DeleteAWSAccount" request
And body with value {"access_key_id": null, "account_id": "1234567", "role_name": "DatadogAWSIntegrationRole"}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip
@generated @skip @team:DataDog/cloud-integrations
Scenario: Delete an AWS integration returns "Conflict Error" response
Given new "DeleteAWSAccount" request
And body with value {"access_key_id": null, "account_id": "1234567", "role_name": "DatadogAWSIntegrationRole"}
When the request is sent
Then the response status is 409 Conflict Error

@generated @skip
@generated @skip @team:DataDog/cloud-integrations
Scenario: Delete an AWS integration returns "OK" response
Given new "DeleteAWSAccount" request
And body with value {"access_key_id": null, "account_id": "1234567", "role_name": "DatadogAWSIntegrationRole"}
When the request is sent
Then the response status is 200 OK

@generated @skip
@generated @skip @team:DataDog/cloud-integrations
Scenario: Generate a new external ID returns "Bad Request" response
Given new "CreateNewAWSExternalID" request
And body with value {"access_key_id": null, "account_id": "1234567", "account_specific_namespace_rules": {"auto_scaling": false, "opswork": false}, "cspm_resource_collection_enabled": true, "excluded_regions": ["us-east-1", "us-west-2"], "filter_tags": ["<KEY>:<VALUE>"], "host_tags": ["<KEY>:<VALUE>"], "metrics_collection_enabled": false, "resource_collection_enabled": true, "role_name": "DatadogAWSIntegrationRole", "secret_access_key": null}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip
@generated @skip @team:DataDog/cloud-integrations
Scenario: Generate a new external ID returns "OK" response
Given new "CreateNewAWSExternalID" request
And body with value {"access_key_id": null, "account_id": "1234567", "account_specific_namespace_rules": {"auto_scaling": false, "opswork": false}, "cspm_resource_collection_enabled": true, "excluded_regions": ["us-east-1", "us-west-2"], "filter_tags": ["<KEY>:<VALUE>"], "host_tags": ["<KEY>:<VALUE>"], "metrics_collection_enabled": false, "resource_collection_enabled": true, "role_name": "DatadogAWSIntegrationRole", "secret_access_key": null}
When the request is sent
Then the response status is 200 OK

@generated @skip
@generated @skip @team:DataDog/cloud-integrations
Scenario: Get all AWS tag filters returns "Bad Request" response
Given new "ListAWSTagFilters" request
When the request is sent
Then the response status is 400 Bad Request

@generated @skip
@generated @skip @team:DataDog/cloud-integrations
Scenario: Get all AWS tag filters returns "OK" response
Given new "ListAWSTagFilters" request
When the request is sent
Then the response status is 200 OK

@generated @skip
@generated @skip @team:DataDog/cloud-integrations
Scenario: List all AWS integrations returns "Bad Request" response
Given new "ListAWSAccounts" request
When the request is sent
Then the response status is 400 Bad Request

@generated @skip
@generated @skip @team:DataDog/cloud-integrations
Scenario: List all AWS integrations returns "OK" response
Given new "ListAWSAccounts" request
When the request is sent
Then the response status is 200 OK

@generated @skip
@generated @skip @team:DataDog/cloud-integrations
Scenario: List namespace rules returns "OK" response
Given new "ListAvailableAWSNamespaces" request
When the request is sent
Then the response status is 200 OK

@generated @skip
@generated @skip @team:DataDog/cloud-integrations
Scenario: Set an AWS tag filter returns "Bad Request" response
Given new "CreateAWSTagFilter" request
And body with value {"account_id": "1234567", "namespace": "elb", "tag_filter_str": "prod*"}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip
@generated @skip @team:DataDog/cloud-integrations
Scenario: Set an AWS tag filter returns "OK" response
Given new "CreateAWSTagFilter" request
And body with value {"account_id": "1234567", "namespace": "elb", "tag_filter_str": "prod*"}
When the request is sent
Then the response status is 200 OK

@generated @skip
@generated @skip @team:DataDog/cloud-integrations
Scenario: Update an AWS integration returns "Bad Request" response
Given new "UpdateAWSAccount" request
And body with value {"access_key_id": null, "account_id": "1234567", "account_specific_namespace_rules": {"auto_scaling": false, "opswork": false}, "cspm_resource_collection_enabled": true, "excluded_regions": ["us-east-1", "us-west-2"], "filter_tags": ["<KEY>:<VALUE>"], "host_tags": ["<KEY>:<VALUE>"], "metrics_collection_enabled": false, "resource_collection_enabled": true, "role_name": "DatadogAWSIntegrationRole", "secret_access_key": null}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip
@generated @skip @team:DataDog/cloud-integrations
Scenario: Update an AWS integration returns "Conflict Error" response
Given new "UpdateAWSAccount" request
And body with value {"access_key_id": null, "account_id": "1234567", "account_specific_namespace_rules": {"auto_scaling": false, "opswork": false}, "cspm_resource_collection_enabled": true, "excluded_regions": ["us-east-1", "us-west-2"], "filter_tags": ["<KEY>:<VALUE>"], "host_tags": ["<KEY>:<VALUE>"], "metrics_collection_enabled": false, "resource_collection_enabled": true, "role_name": "DatadogAWSIntegrationRole", "secret_access_key": null}
When the request is sent
Then the response status is 409 Conflict Error

@generated @skip
@generated @skip @team:DataDog/cloud-integrations
Scenario: Update an AWS integration returns "OK" response
Given new "UpdateAWSAccount" request
And body with value {"access_key_id": null, "account_id": "1234567", "account_specific_namespace_rules": {"auto_scaling": false, "opswork": false}, "cspm_resource_collection_enabled": true, "excluded_regions": ["us-east-1", "us-west-2"], "filter_tags": ["<KEY>:<VALUE>"], "host_tags": ["<KEY>:<VALUE>"], "metrics_collection_enabled": false, "resource_collection_enabled": true, "role_name": "DatadogAWSIntegrationRole", "secret_access_key": null}
Expand Down
26 changes: 13 additions & 13 deletions tests/scenarios/features/v1/aws_logs_integration.feature
Original file line number Diff line number Diff line change
Expand Up @@ -9,89 +9,89 @@ Feature: AWS Logs Integration
And a valid "appKeyAuth" key in the system
And an instance of "AWSLogsIntegration" API

@generated @skip
@generated @skip @team:DataDog/cloud-integrations
Scenario: Add AWS Log Lambda ARN returns "Bad Request" response
Given new "CreateAWSLambdaARN" request
And body with value {"account_id": "1234567", "lambda_arn": "arn:aws:lambda:us-east-1:1234567:function:LogsCollectionAPITest"}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip
@generated @skip @team:DataDog/cloud-integrations
Scenario: Add AWS Log Lambda ARN returns "OK" response
Given new "CreateAWSLambdaARN" request
And body with value {"account_id": "1234567", "lambda_arn": "arn:aws:lambda:us-east-1:1234567:function:LogsCollectionAPITest"}
When the request is sent
Then the response status is 200 OK

@generated @skip
@generated @skip @team:DataDog/cloud-integrations
Scenario: Check permissions for log services returns "Bad Request" response
Given new "CheckAWSLogsServicesAsync" request
And body with value {"account_id": "1234567", "services": ["s3", "elb", "elbv2", "cloudfront", "redshift", "lambda"]}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip
@generated @skip @team:DataDog/cloud-integrations
Scenario: Check permissions for log services returns "OK" response
Given new "CheckAWSLogsServicesAsync" request
And body with value {"account_id": "1234567", "services": ["s3", "elb", "elbv2", "cloudfront", "redshift", "lambda"]}
When the request is sent
Then the response status is 200 OK

@generated @skip
@generated @skip @team:DataDog/cloud-integrations
Scenario: Check that an AWS Lambda Function exists returns "Bad Request" response
Given new "CheckAWSLogsLambdaAsync" request
And body with value {"account_id": "1234567", "lambda_arn": "arn:aws:lambda:us-east-1:1234567:function:LogsCollectionAPITest"}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip
@generated @skip @team:DataDog/cloud-integrations
Scenario: Check that an AWS Lambda Function exists returns "OK" response
Given new "CheckAWSLogsLambdaAsync" request
And body with value {"account_id": "1234567", "lambda_arn": "arn:aws:lambda:us-east-1:1234567:function:LogsCollectionAPITest"}
When the request is sent
Then the response status is 200 OK

@generated @skip
@generated @skip @team:DataDog/cloud-integrations
Scenario: Delete an AWS Logs integration returns "Bad Request" response
Given new "DeleteAWSLambdaARN" request
And body with value {"account_id": "1234567", "lambda_arn": "arn:aws:lambda:us-east-1:1234567:function:LogsCollectionAPITest"}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip
@generated @skip @team:DataDog/cloud-integrations
Scenario: Delete an AWS Logs integration returns "OK" response
Given new "DeleteAWSLambdaARN" request
And body with value {"account_id": "1234567", "lambda_arn": "arn:aws:lambda:us-east-1:1234567:function:LogsCollectionAPITest"}
When the request is sent
Then the response status is 200 OK

@generated @skip
@generated @skip @team:DataDog/cloud-integrations
Scenario: Enable an AWS Logs integration returns "Bad Request" response
Given new "EnableAWSLogServices" request
And body with value {"account_id": "1234567", "services": ["s3", "elb", "elbv2", "cloudfront", "redshift", "lambda"]}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip
@generated @skip @team:DataDog/cloud-integrations
Scenario: Enable an AWS Logs integration returns "OK" response
Given new "EnableAWSLogServices" request
And body with value {"account_id": "1234567", "services": ["s3", "elb", "elbv2", "cloudfront", "redshift", "lambda"]}
When the request is sent
Then the response status is 200 OK

@generated @skip
@generated @skip @team:DataDog/cloud-integrations
Scenario: Get list of AWS log ready services returns "OK" response
Given new "ListAWSLogsServices" request
When the request is sent
Then the response status is 200 OK

@generated @skip
@generated @skip @team:DataDog/cloud-integrations
Scenario: List all AWS Logs integrations returns "Bad Request" response
Given new "ListAWSLogsIntegrations" request
When the request is sent
Then the response status is 400 Bad Request

@generated @skip
@generated @skip @team:DataDog/cloud-integrations
Scenario: List all AWS Logs integrations returns "OK" response
Given new "ListAWSLogsIntegrations" request
When the request is sent
Expand Down
Loading

0 comments on commit b126490

Please sign in to comment.