-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Include rule ID in request body of all integration tests (#2511)
Co-authored-by: ci.datadog-api-spec <[email protected]>
- Loading branch information
1 parent
0dd2600
commit c4e472c
Showing
11 changed files
with
53 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
..._CSM_Threats/Scenario_Update_a_CSM_Threats_Agent_rule_returns_Bad_Request_response.freeze
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
2024-04-23T17:57:50.511Z | ||
2024-05-28T19:38:08.047Z |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
interactions: | ||
- request: | ||
body: | | ||
{"data":{"attributes":{"description":"My Agent rule","enabled":true,"expression":"exec.file.name == \"sh\"","name":"testupdateacsmthreatsagentrulereturnsbadrequestresponse1713895070"},"type":"agent_rule"}} | ||
{"data":{"attributes":{"description":"My Agent rule","enabled":true,"expression":"exec.file.name == \"sh\"","name":"testupdateacsmthreatsagentrulereturnsbadrequestresponse1716925088"},"type":"agent_rule"}} | ||
form: {} | ||
headers: | ||
Accept: | ||
|
@@ -12,10 +12,11 @@ interactions: | |
method: POST | ||
url: https://api.datadoghq.com/api/v2/remote_config/products/cws/agent_rules | ||
response: | ||
body: '{"data":{"id":"rgf-aao-lo8","type":"agent_rule","attributes":{"category":"Process | ||
Activity","creationDate":1713895070561,"creator":{"name":"","handle":"[email protected]"},"defaultRule":false,"description":"My | ||
body: '{"data":{"id":"0wn-l36-875","type":"agent_rule","attributes":{"category":"Process | ||
Activity","creationDate":1716925088306,"creator":{"name":"CI Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"defaultRule":false,"description":"My | ||
Agent rule","enabled":true,"expression":"exec.file.name == \"sh\"","filters":["os | ||
== \"linux\""],"name":"testupdateacsmthreatsagentrulereturnsbadrequestresponse1713895070","updateDate":1713895070561,"updater":{"name":"","handle":"[email protected]"}}}}' | ||
== \"linux\""],"name":"testupdateacsmthreatsagentrulereturnsbadrequestresponse1716925088","updateDate":1716925088306,"updater":{"name":"CI | ||
Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"}}}}' | ||
code: 200 | ||
duration: 0ms | ||
headers: | ||
|
@@ -24,7 +25,7 @@ interactions: | |
status: 200 OK | ||
- request: | ||
body: | | ||
{"data":{"attributes":{"description":"Test Agent rule","enabled":true,"expression":"open.file.path = sh"},"id":"abc-123-xyz","type":"agent_rule"}} | ||
{"data":{"attributes":{"description":"Test Agent rule","enabled":true,"expression":"open.file.path = sh"},"id":"0wn-l36-875","type":"agent_rule"}} | ||
form: {} | ||
headers: | ||
Accept: | ||
|
@@ -33,11 +34,11 @@ interactions: | |
- application/json | ||
id: 1 | ||
method: PATCH | ||
url: https://api.datadoghq.com/api/v2/remote_config/products/cws/agent_rules/rgf-aao-lo8 | ||
url: https://api.datadoghq.com/api/v2/remote_config/products/cws/agent_rules/0wn-l36-875 | ||
response: | ||
body: '{"errors":[{"title":"failed to update rule"}]} | ||
' | ||
body: '{"errors":["input_validation_error(Field ''expression'' is invalid: rule | ||
`testupdateacsmthreatsagentrulereturnsbadrequestresponse1716925088` error: syntax | ||
error `1:18: unexpected token \"sh\" (expected \"~\")`)"]}' | ||
code: 400 | ||
duration: 0ms | ||
headers: | ||
|
@@ -52,7 +53,7 @@ interactions: | |
- '*/*' | ||
id: 2 | ||
method: DELETE | ||
url: https://api.datadoghq.com/api/v2/remote_config/products/cws/agent_rules/rgf-aao-lo8 | ||
url: https://api.datadoghq.com/api/v2/remote_config/products/cws/agent_rules/0wn-l36-875 | ||
response: | ||
body: '' | ||
code: 204 | ||
|
2 changes: 1 addition & 1 deletion
2
.../Scenario_Update_a_Cloud_Workload_Security_Agent_rule_returns_Bad_Request_response.freeze
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
2024-04-23T17:57:52.935Z | ||
2024-05-28T19:38:09.490Z |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
interactions: | ||
- request: | ||
body: | | ||
{"data":{"attributes":{"description":"My Agent rule","enabled":true,"expression":"exec.file.name == \"sh\"","name":"testupdateacloudworkloadsecurityagentrulereturnsbadrequestresponse1713895072"},"type":"agent_rule"}} | ||
{"data":{"attributes":{"description":"My Agent rule","enabled":true,"expression":"exec.file.name == \"sh\"","name":"testupdateacloudworkloadsecurityagentrulereturnsbadrequestresponse1716925089"},"type":"agent_rule"}} | ||
form: {} | ||
headers: | ||
Accept: | ||
|
@@ -12,9 +12,11 @@ interactions: | |
method: POST | ||
url: https://api.datadoghq.com/api/v2/security_monitoring/cloud_workload_security/agent_rules | ||
response: | ||
body: '{"data":{"id":"1su-fqy-sjj","attributes":{"version":1,"name":"testupdateacloudworkloadsecurityagentrulereturnsbadrequestresponse1713895072","description":"My | ||
Agent rule","expression":"exec.file.name == \"sh\"","category":"Process Activity","creationAuthorUuId":"3ad549bf-eba0-11e9-a77a-0705486660d0","creationDate":1713895073105,"updateAuthorUuId":"3ad549bf-eba0-11e9-a77a-0705486660d0","updateDate":1713895073105,"filters":["os | ||
== \"linux\""],"actions":[],"agentConstraint":"","enabled":true,"defaultRule":false,"creator":{"name":null,"handle":"[email protected]"},"updater":{"name":null,"handle":"[email protected]"}},"type":"agent_rule"}} | ||
body: '{"data":{"id":"qdg-dfm-kku","attributes":{"version":1,"name":"testupdateacloudworkloadsecurityagentrulereturnsbadrequestresponse1716925089","description":"My | ||
Agent rule","expression":"exec.file.name == \"sh\"","category":"Process Activity","creationAuthorUuId":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","creationDate":1716925089625,"updateAuthorUuId":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","updateDate":1716925089625,"filters":["os | ||
== \"linux\""],"actions":[],"agentConstraint":"","defaultRule":false,"enabled":true,"creator":{"name":"CI | ||
Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"updater":{"name":"CI | ||
Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"}},"type":"agent_rule"}} | ||
' | ||
code: 200 | ||
|
@@ -25,7 +27,7 @@ interactions: | |
status: 200 OK | ||
- request: | ||
body: | | ||
{"data":{"attributes":{"description":"Test Agent rule","enabled":true,"expression":"open.file.path = sh"},"type":"agent_rule"}} | ||
{"data":{"attributes":{"description":"Test Agent rule","enabled":true,"expression":"open.file.path = sh"},"id":"qdg-dfm-kku","type":"agent_rule"}} | ||
form: {} | ||
headers: | ||
Accept: | ||
|
@@ -34,10 +36,10 @@ interactions: | |
- application/json | ||
id: 1 | ||
method: PATCH | ||
url: https://api.datadoghq.com/api/v2/security_monitoring/cloud_workload_security/agent_rules/1su-fqy-sjj | ||
url: https://api.datadoghq.com/api/v2/security_monitoring/cloud_workload_security/agent_rules/qdg-dfm-kku | ||
response: | ||
body: '{"errors":["input_validation_error(Field ''expression'' is invalid: rule | ||
`testupdateacloudworkloadsecurityagentrulereturnsbadrequestresponse1713895072` | ||
`testupdateacloudworkloadsecurityagentrulereturnsbadrequestresponse1716925089` | ||
error: syntax error `1:18: unexpected token \"sh\" (expected \"~\")`)"]} | ||
' | ||
|
@@ -55,7 +57,7 @@ interactions: | |
- '*/*' | ||
id: 2 | ||
method: DELETE | ||
url: https://api.datadoghq.com/api/v2/security_monitoring/cloud_workload_security/agent_rules/1su-fqy-sjj | ||
url: https://api.datadoghq.com/api/v2/security_monitoring/cloud_workload_security/agent_rules/qdg-dfm-kku | ||
response: | ||
body: '' | ||
code: 204 | ||
|
2 changes: 1 addition & 1 deletion
2
...ts/Scenario_Update_a_Cloud_Workload_Security_Agent_rule_returns_Not_Found_response.freeze
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
2024-04-23T17:57:53.479Z | ||
2024-05-28T19:38:10.057Z |
2 changes: 1 addition & 1 deletion
2
...eats/Scenario_Update_a_Cloud_Workload_Security_Agent_rule_returns_Not_Found_response.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...M_Threats/Scenario_Update_a_Cloud_Workload_Security_Agent_rule_returns_OK_response.freeze
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
2024-04-23T17:57:53.638Z | ||
2024-05-28T19:38:10.219Z |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
interactions: | ||
- request: | ||
body: | | ||
{"data":{"attributes":{"description":"My Agent rule","enabled":true,"expression":"exec.file.name == \"sh\"","name":"testupdateacloudworkloadsecurityagentrulereturnsokresponse1713895073"},"type":"agent_rule"}} | ||
{"data":{"attributes":{"description":"My Agent rule","enabled":true,"expression":"exec.file.name == \"sh\"","name":"testupdateacloudworkloadsecurityagentrulereturnsokresponse1716925090"},"type":"agent_rule"}} | ||
form: {} | ||
headers: | ||
Accept: | ||
|
@@ -12,9 +12,11 @@ interactions: | |
method: POST | ||
url: https://api.datadoghq.com/api/v2/security_monitoring/cloud_workload_security/agent_rules | ||
response: | ||
body: '{"data":{"id":"sir-mer-toj","attributes":{"version":1,"name":"testupdateacloudworkloadsecurityagentrulereturnsokresponse1713895073","description":"My | ||
Agent rule","expression":"exec.file.name == \"sh\"","category":"Process Activity","creationAuthorUuId":"3ad549bf-eba0-11e9-a77a-0705486660d0","creationDate":1713895073761,"updateAuthorUuId":"3ad549bf-eba0-11e9-a77a-0705486660d0","updateDate":1713895073761,"filters":["os | ||
== \"linux\""],"actions":[],"agentConstraint":"","enabled":true,"defaultRule":false,"creator":{"name":null,"handle":"[email protected]"},"updater":{"name":null,"handle":"[email protected]"}},"type":"agent_rule"}} | ||
body: '{"data":{"id":"wmz-xld-san","attributes":{"version":1,"name":"testupdateacloudworkloadsecurityagentrulereturnsokresponse1716925090","description":"My | ||
Agent rule","expression":"exec.file.name == \"sh\"","category":"Process Activity","creationAuthorUuId":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","creationDate":1716925090332,"updateAuthorUuId":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","updateDate":1716925090332,"filters":["os | ||
== \"linux\""],"actions":[],"agentConstraint":"","enabled":true,"defaultRule":false,"creator":{"name":"CI | ||
Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"updater":{"name":"CI | ||
Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"}},"type":"agent_rule"}} | ||
' | ||
code: 200 | ||
|
@@ -25,7 +27,7 @@ interactions: | |
status: 200 OK | ||
- request: | ||
body: | | ||
{"data":{"attributes":{"description":"Test Agent rule","enabled":true,"expression":"exec.file.name == \"sh\""},"type":"agent_rule"}} | ||
{"data":{"attributes":{"description":"Test Agent rule","enabled":true,"expression":"exec.file.name == \"sh\""},"id":"wmz-xld-san","type":"agent_rule"}} | ||
form: {} | ||
headers: | ||
Accept: | ||
|
@@ -34,11 +36,13 @@ interactions: | |
- application/json | ||
id: 1 | ||
method: PATCH | ||
url: https://api.datadoghq.com/api/v2/security_monitoring/cloud_workload_security/agent_rules/sir-mer-toj | ||
url: https://api.datadoghq.com/api/v2/security_monitoring/cloud_workload_security/agent_rules/wmz-xld-san | ||
response: | ||
body: '{"data":{"id":"sir-mer-toj","attributes":{"version":2,"name":"testupdateacloudworkloadsecurityagentrulereturnsokresponse1713895073","description":"Test | ||
Agent rule","expression":"exec.file.name == \"sh\"","category":"Process Activity","creationAuthorUuId":"3ad549bf-eba0-11e9-a77a-0705486660d0","creationDate":1713895073761,"updateAuthorUuId":"3ad549bf-eba0-11e9-a77a-0705486660d0","updateDate":1713895073928,"filters":["os | ||
== \"linux\""],"actions":[],"agentConstraint":"","enabled":true,"defaultRule":false,"creator":{"name":null,"handle":"[email protected]"},"updater":{"name":null,"handle":"[email protected]"}},"type":"agent_rule"}} | ||
body: '{"data":{"id":"wmz-xld-san","attributes":{"version":2,"name":"testupdateacloudworkloadsecurityagentrulereturnsokresponse1716925090","description":"Test | ||
Agent rule","expression":"exec.file.name == \"sh\"","category":"Process Activity","creationAuthorUuId":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","creationDate":1716925090332,"updateAuthorUuId":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","updateDate":1716925090525,"filters":["os | ||
== \"linux\""],"actions":[],"agentConstraint":"","enabled":true,"defaultRule":false,"creator":{"name":"CI | ||
Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"updater":{"name":"CI | ||
Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"}},"type":"agent_rule"}} | ||
' | ||
code: 200 | ||
|
@@ -55,7 +59,7 @@ interactions: | |
- '*/*' | ||
id: 2 | ||
method: DELETE | ||
url: https://api.datadoghq.com/api/v2/security_monitoring/cloud_workload_security/agent_rules/sir-mer-toj | ||
url: https://api.datadoghq.com/api/v2/security_monitoring/cloud_workload_security/agent_rules/wmz-xld-san | ||
response: | ||
body: '' | ||
code: 204 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters