@@ -5,33 +5,36 @@ Feature: CI Visibility Pipelines
5
5
6
6
Background :
7
7
Given a valid "apiKeyAuth" key in the system
8
- And a valid "appKeyAuth" key in the system
9
8
And an instance of "CIVisibilityPipelines" API
10
9
11
10
@generated @skip @team:Datadog/ci-app-backend @team:Datadog/integrations-tools-and-libraries
12
11
Scenario : Aggregate pipelines events returns "Bad Request" response
13
- Given new "AggregateCIAppPipelineEvents" request
12
+ Given a valid "appKeyAuth" key in the system
13
+ And new "AggregateCIAppPipelineEvents" request
14
14
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" }}
15
15
When the request is sent
16
16
Then the response status is 400 Bad Request
17
17
18
18
@team:Datadog/ci-app-backend @team:Datadog/integrations-tools-and-libraries
19
19
Scenario : Aggregate pipelines events returns "OK" response
20
- Given new "AggregateCIAppPipelineEvents" request
20
+ Given a valid "appKeyAuth" key in the system
21
+ And new "AggregateCIAppPipelineEvents" request
21
22
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" }}
22
23
When the request is sent
23
24
Then the response status is 200 OK
24
25
And the response "meta.status" is equal to "done"
25
26
26
27
@generated @skip @team:Datadog/ci-app-backend @team:Datadog/integrations-tools-and-libraries
27
28
Scenario : Get a list of pipelines events returns "Bad Request" response
28
- Given new "ListCIAppPipelineEvents" request
29
+ Given a valid "appKeyAuth" key in the system
30
+ And new "ListCIAppPipelineEvents" request
29
31
When the request is sent
30
32
Then the response status is 400 Bad Request
31
33
32
34
@team:Datadog/ci-app-backend @team:Datadog/integrations-tools-and-libraries
33
35
Scenario : Get a list of pipelines events returns "OK" response
34
- Given new "ListCIAppPipelineEvents" request
36
+ Given a valid "appKeyAuth" key in the system
37
+ And new "ListCIAppPipelineEvents" request
35
38
And request contains "filter[query]" parameter with value "@ci.provider.name:circleci"
36
39
And request contains "filter[from]" parameter with value "{{ timeISO('now - 30m') }}"
37
40
And request contains "filter[to]" parameter with value "{{ timeISO('now') }}"
@@ -41,7 +44,8 @@ Feature: CI Visibility Pipelines
41
44
42
45
@replay-only @skip-validation @team:Datadog/ci-app-backend @team:Datadog/integrations-tools-and-libraries @with-pagination
43
46
Scenario : Get a list of pipelines events returns "OK" response with pagination
44
- Given new "ListCIAppPipelineEvents" request
47
+ Given a valid "appKeyAuth" key in the system
48
+ And new "ListCIAppPipelineEvents" request
45
49
And request contains "filter[from]" parameter with value "{{ timeISO('now - 30s') }}"
46
50
And request contains "filter[to]" parameter with value "{{ timeISO('now') }}"
47
51
And request contains "page[limit]" parameter with value 2
@@ -51,21 +55,24 @@ Feature: CI Visibility Pipelines
51
55
52
56
@generated @skip @team:Datadog/ci-app-backend @team:Datadog/integrations-tools-and-libraries
53
57
Scenario : Search pipelines events returns "Bad Request" response
54
- Given new "SearchCIAppPipelineEvents" request
58
+ Given a valid "appKeyAuth" key in the system
59
+ And new "SearchCIAppPipelineEvents" request
55
60
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" }
56
61
When the request is sent
57
62
Then the response status is 400 Bad Request
58
63
59
64
@team:Datadog/ci-app-backend @team:Datadog/integrations-tools-and-libraries
60
65
Scenario : Search pipelines events returns "OK" response
61
- Given new "SearchCIAppPipelineEvents" request
66
+ Given a valid "appKeyAuth" key in the system
67
+ And new "SearchCIAppPipelineEvents" request
62
68
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" }
63
69
When the request is sent
64
70
Then the response status is 200 OK
65
71
66
72
@replay-only @skip-validation @team:Datadog/ci-app-backend @team:Datadog/integrations-tools-and-libraries @with-pagination
67
73
Scenario : Search pipelines events returns "OK" response with pagination
68
- Given new "SearchCIAppPipelineEvents" request
74
+ Given a valid "appKeyAuth" key in the system
75
+ And new "SearchCIAppPipelineEvents" request
69
76
And body with value {"filter" : {"from" : "now-30s" , "to" : "now" }, "options" : {"timezone" : "GMT" }, "page" : {"limit" : 2}, "sort" : "timestamp" }
70
77
When the request with pagination is sent
71
78
Then the response status is 200 OK
0 commit comments