-
Notifications
You must be signed in to change notification settings - Fork 52
Expand file tree
/
Copy pathservicenow_integration.feature
More file actions
171 lines (147 loc) · 9.42 KB
/
servicenow_integration.feature
File metadata and controls
171 lines (147 loc) · 9.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
@endpoint(servicenow-integration) @endpoint(servicenow-integration-v2)
Feature: ServiceNow Integration
Manage your ServiceNow Integration. ServiceNow is a cloud-based platform
that helps organizations manage digital workflows for enterprise
operations.
Background:
Given a valid "apiKeyAuth" key in the system
And a valid "appKeyAuth" key in the system
And an instance of "ServiceNowIntegration" API
@generated @skip @team:Datadog/collaboration-integrations
Scenario: Create ServiceNow template returns "Bad Request" response
Given new "CreateServiceNowTemplate" request
And body with value {"data": {"attributes": {"assignment_group_id": "65b3341b-0680-47f9-a6d4-134db45c603e", "business_service_id": "65b3341b-0680-47f9-a6d4-134db45c603e", "fields_mapping": {"category": "software", "priority": "1"}, "handle_name": "incident-template", "instance_id": "65b3341b-0680-47f9-a6d4-134db45c603e", "servicenow_tablename": "incident", "user_id": "65b3341b-0680-47f9-a6d4-134db45c603e"}, "type": "servicenow_templates"}}
When the request is sent
Then the response status is 400 Bad Request
@generated @skip @team:Datadog/collaboration-integrations
Scenario: Create ServiceNow template returns "Created" response
Given new "CreateServiceNowTemplate" request
And body with value {"data": {"attributes": {"assignment_group_id": "65b3341b-0680-47f9-a6d4-134db45c603e", "business_service_id": "65b3341b-0680-47f9-a6d4-134db45c603e", "fields_mapping": {"category": "software", "priority": "1"}, "handle_name": "incident-template", "instance_id": "65b3341b-0680-47f9-a6d4-134db45c603e", "servicenow_tablename": "incident", "user_id": "65b3341b-0680-47f9-a6d4-134db45c603e"}, "type": "servicenow_templates"}}
When the request is sent
Then the response status is 201 Created
@generated @skip @team:Datadog/collaboration-integrations
Scenario: Delete ServiceNow template returns "Bad Request" response
Given new "DeleteServiceNowTemplate" request
And request contains "template_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 400 Bad Request
@generated @skip @team:Datadog/collaboration-integrations
Scenario: Delete ServiceNow template returns "Not Found" response
Given new "DeleteServiceNowTemplate" request
And request contains "template_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 Not Found
@generated @skip @team:Datadog/collaboration-integrations
Scenario: Delete ServiceNow template returns "OK" response
Given new "DeleteServiceNowTemplate" request
And request contains "template_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 200 OK
@generated @skip @team:Datadog/collaboration-integrations
Scenario: Get ServiceNow template returns "Bad Request" response
Given new "GetServiceNowTemplate" request
And request contains "template_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 400 Bad Request
@generated @skip @team:Datadog/collaboration-integrations
Scenario: Get ServiceNow template returns "Not Found" response
Given new "GetServiceNowTemplate" request
And request contains "template_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 Not Found
@generated @skip @team:Datadog/collaboration-integrations
Scenario: Get ServiceNow template returns "OK" response
Given new "GetServiceNowTemplate" request
And request contains "template_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 200 OK
@generated @skip @team:Datadog/collaboration-integrations
Scenario: List ServiceNow assignment groups returns "Bad Request" response
Given new "ListServiceNowAssignmentGroups" request
And request contains "instance_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 400 Bad Request
@generated @skip @team:Datadog/collaboration-integrations
Scenario: List ServiceNow assignment groups returns "Not Found" response
Given new "ListServiceNowAssignmentGroups" request
And request contains "instance_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 Not Found
@generated @skip @team:Datadog/collaboration-integrations
Scenario: List ServiceNow assignment groups returns "OK" response
Given new "ListServiceNowAssignmentGroups" request
And request contains "instance_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 200 OK
@generated @skip @team:Datadog/collaboration-integrations
Scenario: List ServiceNow business services returns "Bad Request" response
Given new "ListServiceNowBusinessServices" request
And request contains "instance_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 400 Bad Request
@generated @skip @team:Datadog/collaboration-integrations
Scenario: List ServiceNow business services returns "Not Found" response
Given new "ListServiceNowBusinessServices" request
And request contains "instance_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 Not Found
@generated @skip @team:Datadog/collaboration-integrations
Scenario: List ServiceNow business services returns "OK" response
Given new "ListServiceNowBusinessServices" request
And request contains "instance_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 200 OK
@generated @skip @team:Datadog/collaboration-integrations
Scenario: List ServiceNow instances returns "Not Found" response
Given new "ListServiceNowInstances" request
When the request is sent
Then the response status is 404 Not Found
@generated @skip @team:Datadog/collaboration-integrations
Scenario: List ServiceNow instances returns "OK" response
Given new "ListServiceNowInstances" request
When the request is sent
Then the response status is 200 OK
@generated @skip @team:Datadog/collaboration-integrations
Scenario: List ServiceNow templates returns "OK" response
Given new "ListServiceNowTemplates" request
When the request is sent
Then the response status is 200 OK
@generated @skip @team:Datadog/collaboration-integrations
Scenario: List ServiceNow users returns "Bad Request" response
Given new "ListServiceNowUsers" request
And request contains "instance_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 400 Bad Request
@generated @skip @team:Datadog/collaboration-integrations
Scenario: List ServiceNow users returns "Not Found" response
Given new "ListServiceNowUsers" request
And request contains "instance_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 Not Found
@generated @skip @team:Datadog/collaboration-integrations
Scenario: List ServiceNow users returns "OK" response
Given new "ListServiceNowUsers" request
And request contains "instance_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 200 OK
@generated @skip @team:Datadog/collaboration-integrations
Scenario: Update ServiceNow template returns "Bad Request" response
Given new "UpdateServiceNowTemplate" request
And request contains "template_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"assignment_group_id": "65b3341b-0680-47f9-a6d4-134db45c603e", "business_service_id": "65b3341b-0680-47f9-a6d4-134db45c603e", "fields_mapping": {"category": "hardware", "priority": "2"}, "handle_name": "incident-template-updated", "instance_id": "65b3341b-0680-47f9-a6d4-134db45c603e", "servicenow_tablename": "incident", "user_id": "65b3341b-0680-47f9-a6d4-134db45c603e"}, "type": "servicenow_templates"}}
When the request is sent
Then the response status is 400 Bad Request
@generated @skip @team:Datadog/collaboration-integrations
Scenario: Update ServiceNow template returns "Not Found" response
Given new "UpdateServiceNowTemplate" request
And request contains "template_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"assignment_group_id": "65b3341b-0680-47f9-a6d4-134db45c603e", "business_service_id": "65b3341b-0680-47f9-a6d4-134db45c603e", "fields_mapping": {"category": "hardware", "priority": "2"}, "handle_name": "incident-template-updated", "instance_id": "65b3341b-0680-47f9-a6d4-134db45c603e", "servicenow_tablename": "incident", "user_id": "65b3341b-0680-47f9-a6d4-134db45c603e"}, "type": "servicenow_templates"}}
When the request is sent
Then the response status is 404 Not Found
@generated @skip @team:Datadog/collaboration-integrations
Scenario: Update ServiceNow template returns "OK" response
Given new "UpdateServiceNowTemplate" request
And request contains "template_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"assignment_group_id": "65b3341b-0680-47f9-a6d4-134db45c603e", "business_service_id": "65b3341b-0680-47f9-a6d4-134db45c603e", "fields_mapping": {"category": "hardware", "priority": "2"}, "handle_name": "incident-template-updated", "instance_id": "65b3341b-0680-47f9-a6d4-134db45c603e", "servicenow_tablename": "incident", "user_id": "65b3341b-0680-47f9-a6d4-134db45c603e"}, "type": "servicenow_templates"}}
When the request is sent
Then the response status is 200 OK