|
| 1 | +@endpoint(governance-controls) @endpoint(governance-controls-v2) |
| 2 | +Feature: Governance Controls |
| 3 | + Governance Controls pair a detection definition with an organization's |
| 4 | + detection, notification, and mitigation configuration within the |
| 5 | + Governance Console. Each control reports how a class of governance issue |
| 6 | + (such as unused API keys or unqueried metrics) is detected and remediated, |
| 7 | + along with counts of active and mitigated detections. |
| 8 | + |
| 9 | + Background: |
| 10 | + Given a valid "apiKeyAuth" key in the system |
| 11 | + And a valid "appKeyAuth" key in the system |
| 12 | + And an instance of "GovernanceControls" API |
| 13 | + |
| 14 | + @generated @skip @team:DataDog/aaa-governance-console |
| 15 | + Scenario: Get a governance control returns "Bad Request" response |
| 16 | + Given operation "GetGovernanceControl" enabled |
| 17 | + And new "GetGovernanceControl" request |
| 18 | + And request contains "detection_type" parameter from "REPLACE.ME" |
| 19 | + When the request is sent |
| 20 | + Then the response status is 400 Bad Request |
| 21 | + |
| 22 | + @generated @skip @team:DataDog/aaa-governance-console |
| 23 | + Scenario: Get a governance control returns "Not Found" response |
| 24 | + Given operation "GetGovernanceControl" enabled |
| 25 | + And new "GetGovernanceControl" request |
| 26 | + And request contains "detection_type" parameter from "REPLACE.ME" |
| 27 | + When the request is sent |
| 28 | + Then the response status is 404 Not Found |
| 29 | + |
| 30 | + @generated @skip @team:DataDog/aaa-governance-console |
| 31 | + Scenario: Get a governance control returns "OK" response |
| 32 | + Given operation "GetGovernanceControl" enabled |
| 33 | + And new "GetGovernanceControl" request |
| 34 | + And request contains "detection_type" parameter from "REPLACE.ME" |
| 35 | + When the request is sent |
| 36 | + Then the response status is 200 OK |
| 37 | + |
| 38 | + @generated @skip @team:DataDog/aaa-governance-console |
| 39 | + Scenario: List governance controls returns "Bad Request" response |
| 40 | + Given operation "ListGovernanceControls" enabled |
| 41 | + And new "ListGovernanceControls" request |
| 42 | + When the request is sent |
| 43 | + Then the response status is 400 Bad Request |
| 44 | + |
| 45 | + @generated @skip @team:DataDog/aaa-governance-console |
| 46 | + Scenario: List governance controls returns "OK" response |
| 47 | + Given operation "ListGovernanceControls" enabled |
| 48 | + And new "ListGovernanceControls" request |
| 49 | + When the request is sent |
| 50 | + Then the response status is 200 OK |
| 51 | + |
| 52 | + @generated @skip @team:DataDog/aaa-governance-console |
| 53 | + Scenario: Update a governance control returns "Bad Request" response |
| 54 | + Given operation "UpdateGovernanceControl" enabled |
| 55 | + And new "UpdateGovernanceControl" request |
| 56 | + And request contains "detection_type" parameter from "REPLACE.ME" |
| 57 | + And body with value {"data": {"attributes": {"detection_frequency": "daily", "mitigation_type": "revoke_api_key", "name": "Unused API Keys", "notification_frequency": "daily", "notification_type": "slack"}, "id": "0d4e6f8a-1b2c-3d4e-5f6a-7b8c9d0e1f2a", "type": "governance_control"}} |
| 58 | + When the request is sent |
| 59 | + Then the response status is 400 Bad Request |
| 60 | + |
| 61 | + @generated @skip @team:DataDog/aaa-governance-console |
| 62 | + Scenario: Update a governance control returns "Not Found" response |
| 63 | + Given operation "UpdateGovernanceControl" enabled |
| 64 | + And new "UpdateGovernanceControl" request |
| 65 | + And request contains "detection_type" parameter from "REPLACE.ME" |
| 66 | + And body with value {"data": {"attributes": {"detection_frequency": "daily", "mitigation_type": "revoke_api_key", "name": "Unused API Keys", "notification_frequency": "daily", "notification_type": "slack"}, "id": "0d4e6f8a-1b2c-3d4e-5f6a-7b8c9d0e1f2a", "type": "governance_control"}} |
| 67 | + When the request is sent |
| 68 | + Then the response status is 404 Not Found |
| 69 | + |
| 70 | + @generated @skip @team:DataDog/aaa-governance-console |
| 71 | + Scenario: Update a governance control returns "OK" response |
| 72 | + Given operation "UpdateGovernanceControl" enabled |
| 73 | + And new "UpdateGovernanceControl" request |
| 74 | + And request contains "detection_type" parameter from "REPLACE.ME" |
| 75 | + And body with value {"data": {"attributes": {"detection_frequency": "daily", "mitigation_type": "revoke_api_key", "name": "Unused API Keys", "notification_frequency": "daily", "notification_type": "slack"}, "id": "0d4e6f8a-1b2c-3d4e-5f6a-7b8c9d0e1f2a", "type": "governance_control"}} |
| 76 | + When the request is sent |
| 77 | + Then the response status is 200 OK |
0 commit comments