Skip to content

Commit

Permalink
Regenerate client from commit cbfbc45e of spec repo
Browse files Browse the repository at this point in the history
  • Loading branch information
ci.datadog-api-spec committed Sep 22, 2023
1 parent febca22 commit af637b3
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 14 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.6.6",
"regenerated": "2023-09-22 09:03:19.085103",
"spec_repo_commit": "98de9afb"
"regenerated": "2023-09-22 12:30:04.953216",
"spec_repo_commit": "cbfbc45e"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2023-09-22 09:03:19.100041",
"spec_repo_commit": "98de9afb"
"regenerated": "2023-09-22 12:30:04.970639",
"spec_repo_commit": "cbfbc45e"
}
}
}
2 changes: 2 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18158,6 +18158,8 @@ paths:
schema:
$ref: '#/components/schemas/HTTPCIAppErrors'
description: Service Unavailable
security:
- apiKeyAuth: []
summary: Send pipeline event
tags:
- CI Visibility Pipelines
Expand Down
1 change: 0 additions & 1 deletion api/datadogV2/api_ci_visibility_pipelines.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ func (a *CIVisibilityPipelinesApi) CreateCIAppPipelineEvent(ctx _context.Context
ctx,
&localVarHeaderParams,
[2]string{"apiKeyAuth", "DD-API-KEY"},
[2]string{"appKeyAuth", "DD-APPLICATION-KEY"},
)
req, err := a.Client.PrepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, nil)
if err != nil {
Expand Down
25 changes: 16 additions & 9 deletions tests/scenarios/features/v2/ci_visibility_pipelines.feature
Original file line number Diff line number Diff line change
Expand Up @@ -5,33 +5,36 @@ Feature: CI Visibility Pipelines

Background:
Given a valid "apiKeyAuth" key in the system
And a valid "appKeyAuth" key in the system
And an instance of "CIVisibilityPipelines" API

@generated @skip @team:Datadog/ci-app-backend @team:Datadog/integrations-tools-and-libraries
Scenario: Aggregate pipelines events returns "Bad Request" response
Given new "AggregateCIAppPipelineEvents" request
Given a valid "appKeyAuth" key in the system
And new "AggregateCIAppPipelineEvents" request
And body with value {"compute": [{"aggregation": "pc90", "interval": "5m", "metric": "@duration", "type": "total"}], "filter": {"from": "now-15m", "query": "@ci.provider.name:github AND @ci.status:error", "to": "now"}, "group_by": [{"facet": "@ci.status", "histogram": {"interval": 10, "max": 100, "min": 50}, "limit": 10, "sort": {"aggregation": "count", "order": "asc"}, "total": false}], "options": {"timezone": "GMT"}}
When the request is sent
Then the response status is 400 Bad Request

@team:Datadog/ci-app-backend @team:Datadog/integrations-tools-and-libraries
Scenario: Aggregate pipelines events returns "OK" response
Given new "AggregateCIAppPipelineEvents" request
Given a valid "appKeyAuth" key in the system
And new "AggregateCIAppPipelineEvents" request
And body with value {"compute": [{"aggregation": "pc90", "metric": "@duration", "type": "total"}], "filter": {"from": "now-15m", "query": "@ci.provider.name:(gitlab OR github)", "to": "now"}, "group_by": [{ "facet": "@ci.status", "limit": 10, "total": false}], "options": {"timezone": "GMT"}}
When the request is sent
Then the response status is 200 OK
And the response "meta.status" is equal to "done"

@generated @skip @team:Datadog/ci-app-backend @team:Datadog/integrations-tools-and-libraries
Scenario: Get a list of pipelines events returns "Bad Request" response
Given new "ListCIAppPipelineEvents" request
Given a valid "appKeyAuth" key in the system
And new "ListCIAppPipelineEvents" request
When the request is sent
Then the response status is 400 Bad Request

@team:Datadog/ci-app-backend @team:Datadog/integrations-tools-and-libraries
Scenario: Get a list of pipelines events returns "OK" response
Given new "ListCIAppPipelineEvents" request
Given a valid "appKeyAuth" key in the system
And new "ListCIAppPipelineEvents" request
And request contains "filter[query]" parameter with value "@ci.provider.name:circleci"
And request contains "filter[from]" parameter with value "{{ timeISO('now - 30m') }}"
And request contains "filter[to]" parameter with value "{{ timeISO('now') }}"
Expand All @@ -41,7 +44,8 @@ Feature: CI Visibility Pipelines

@replay-only @skip-validation @team:Datadog/ci-app-backend @team:Datadog/integrations-tools-and-libraries @with-pagination
Scenario: Get a list of pipelines events returns "OK" response with pagination
Given new "ListCIAppPipelineEvents" request
Given a valid "appKeyAuth" key in the system
And new "ListCIAppPipelineEvents" request
And request contains "filter[from]" parameter with value "{{ timeISO('now - 30s') }}"
And request contains "filter[to]" parameter with value "{{ timeISO('now') }}"
And request contains "page[limit]" parameter with value 2
Expand All @@ -51,21 +55,24 @@ Feature: CI Visibility Pipelines

@generated @skip @team:Datadog/ci-app-backend @team:Datadog/integrations-tools-and-libraries
Scenario: Search pipelines events returns "Bad Request" response
Given new "SearchCIAppPipelineEvents" request
Given a valid "appKeyAuth" key in the system
And new "SearchCIAppPipelineEvents" request
And body with value {"filter": {"from": "now-15m", "query": "@ci.provider.name:github AND @ci.status:error", "to": "now"}, "options": {"timezone": "GMT"}, "page": {"cursor": "eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==", "limit": 25}, "sort": "timestamp"}
When the request is sent
Then the response status is 400 Bad Request

@team:Datadog/ci-app-backend @team:Datadog/integrations-tools-and-libraries
Scenario: Search pipelines events returns "OK" response
Given new "SearchCIAppPipelineEvents" request
Given a valid "appKeyAuth" key in the system
And new "SearchCIAppPipelineEvents" request
And body with value {"filter": {"from": "now-15m", "query": "@ci.provider.name:github AND @ci.status:error", "to": "now"}, "options": {"timezone": "GMT"}, "page": {"limit": 5}, "sort": "timestamp"}
When the request is sent
Then the response status is 200 OK

@replay-only @skip-validation @team:Datadog/ci-app-backend @team:Datadog/integrations-tools-and-libraries @with-pagination
Scenario: Search pipelines events returns "OK" response with pagination
Given new "SearchCIAppPipelineEvents" request
Given a valid "appKeyAuth" key in the system
And new "SearchCIAppPipelineEvents" request
And body with value {"filter": {"from": "now-30s", "to": "now"}, "options": {"timezone": "GMT"}, "page": {"limit": 2}, "sort": "timestamp"}
When the request with pagination is sent
Then the response status is 200 OK
Expand Down

0 comments on commit af637b3

Please sign in to comment.