|
| 1 | +@endpoint(change-management) @endpoint(change-management-v2) |
| 2 | +Feature: Change Management |
| 3 | + View and manage change requests within Change Management. See the [Case |
| 4 | + Management |
| 5 | + page](https://docs.datadoghq.com/service_management/case_management/) for |
| 6 | + more information. |
| 7 | + |
| 8 | + Background: |
| 9 | + Given a valid "apiKeyAuth" key in the system |
| 10 | + And a valid "appKeyAuth" key in the system |
| 11 | + And an instance of "ChangeManagement" API |
| 12 | + |
| 13 | + @generated @skip @team:DataDog/case-management |
| 14 | + Scenario: Create a change request branch returns "Bad Request" response |
| 15 | + Given operation "CreateChangeRequestBranch" enabled |
| 16 | + And new "CreateChangeRequestBranch" request |
| 17 | + And request contains "change_request_id" parameter from "REPLACE.ME" |
| 18 | + And body with value {"data": {"attributes": {"branch_name": "chm/CHM-1234", "repo_id": "DataDog/dd-source"}, "type": "change_request_branch"}} |
| 19 | + When the request is sent |
| 20 | + Then the response status is 400 Bad Request |
| 21 | + |
| 22 | + @generated @skip @team:DataDog/case-management |
| 23 | + Scenario: Create a change request branch returns "Not Found" response |
| 24 | + Given operation "CreateChangeRequestBranch" enabled |
| 25 | + And new "CreateChangeRequestBranch" request |
| 26 | + And request contains "change_request_id" parameter from "REPLACE.ME" |
| 27 | + And body with value {"data": {"attributes": {"branch_name": "chm/CHM-1234", "repo_id": "DataDog/dd-source"}, "type": "change_request_branch"}} |
| 28 | + When the request is sent |
| 29 | + Then the response status is 404 Not Found |
| 30 | + |
| 31 | + @generated @skip @team:DataDog/case-management |
| 32 | + Scenario: Create a change request branch returns "OK" response |
| 33 | + Given operation "CreateChangeRequestBranch" enabled |
| 34 | + And new "CreateChangeRequestBranch" request |
| 35 | + And request contains "change_request_id" parameter from "REPLACE.ME" |
| 36 | + And body with value {"data": {"attributes": {"branch_name": "chm/CHM-1234", "repo_id": "DataDog/dd-source"}, "type": "change_request_branch"}} |
| 37 | + When the request is sent |
| 38 | + Then the response status is 200 OK |
| 39 | + |
| 40 | + @generated @skip @team:DataDog/case-management |
| 41 | + Scenario: Create a change request returns "Bad Request" response |
| 42 | + Given operation "CreateChangeRequest" enabled |
| 43 | + And new "CreateChangeRequest" request |
| 44 | + And body with value {"data": {"attributes": {"change_request_linked_incident_uuid": "00000000-0000-0000-0000-000000000000", "change_request_maintenance_window_query": "", "change_request_plan": "1. Deploy to staging 2. Run tests 3. Deploy to production", "change_request_risk": "LOW", "change_request_type": "NORMAL", "description": "Deploying new payment service v2.1", "end_date": "2024-01-02T15:00:00Z", "project_id": "d4bbe1af-f36e-42f1-87c1-493ca35c320e", "requested_teams": ["team-handle-1"], "start_date": "2024-01-01T03:00:00Z", "title": "Deploy new payment service"}, "type": "change_request"}} |
| 45 | + When the request is sent |
| 46 | + Then the response status is 400 Bad Request |
| 47 | + |
| 48 | + @generated @skip @team:DataDog/case-management |
| 49 | + Scenario: Create a change request returns "Created" response |
| 50 | + Given operation "CreateChangeRequest" enabled |
| 51 | + And new "CreateChangeRequest" request |
| 52 | + And body with value {"data": {"attributes": {"change_request_linked_incident_uuid": "00000000-0000-0000-0000-000000000000", "change_request_maintenance_window_query": "", "change_request_plan": "1. Deploy to staging 2. Run tests 3. Deploy to production", "change_request_risk": "LOW", "change_request_type": "NORMAL", "description": "Deploying new payment service v2.1", "end_date": "2024-01-02T15:00:00Z", "project_id": "d4bbe1af-f36e-42f1-87c1-493ca35c320e", "requested_teams": ["team-handle-1"], "start_date": "2024-01-01T03:00:00Z", "title": "Deploy new payment service"}, "type": "change_request"}} |
| 53 | + When the request is sent |
| 54 | + Then the response status is 201 Created |
| 55 | + |
| 56 | + @generated @skip @team:DataDog/case-management |
| 57 | + Scenario: Delete a change request decision returns "Bad Request" response |
| 58 | + Given operation "DeleteChangeRequestDecision" enabled |
| 59 | + And new "DeleteChangeRequestDecision" request |
| 60 | + And request contains "change_request_id" parameter from "REPLACE.ME" |
| 61 | + And request contains "decision_id" parameter from "REPLACE.ME" |
| 62 | + When the request is sent |
| 63 | + Then the response status is 400 Bad Request |
| 64 | + |
| 65 | + @generated @skip @team:DataDog/case-management |
| 66 | + Scenario: Delete a change request decision returns "Not Found" response |
| 67 | + Given operation "DeleteChangeRequestDecision" enabled |
| 68 | + And new "DeleteChangeRequestDecision" request |
| 69 | + And request contains "change_request_id" parameter from "REPLACE.ME" |
| 70 | + And request contains "decision_id" parameter from "REPLACE.ME" |
| 71 | + When the request is sent |
| 72 | + Then the response status is 404 Not Found |
| 73 | + |
| 74 | + @generated @skip @team:DataDog/case-management |
| 75 | + Scenario: Delete a change request decision returns "OK" response |
| 76 | + Given operation "DeleteChangeRequestDecision" enabled |
| 77 | + And new "DeleteChangeRequestDecision" request |
| 78 | + And request contains "change_request_id" parameter from "REPLACE.ME" |
| 79 | + And request contains "decision_id" parameter from "REPLACE.ME" |
| 80 | + When the request is sent |
| 81 | + Then the response status is 200 OK |
| 82 | + |
| 83 | + @generated @skip @team:DataDog/case-management |
| 84 | + Scenario: Get a change request returns "Bad Request" response |
| 85 | + Given operation "GetChangeRequest" enabled |
| 86 | + And new "GetChangeRequest" request |
| 87 | + And request contains "change_request_id" parameter from "REPLACE.ME" |
| 88 | + When the request is sent |
| 89 | + Then the response status is 400 Bad Request |
| 90 | + |
| 91 | + @generated @skip @team:DataDog/case-management |
| 92 | + Scenario: Get a change request returns "Not Found" response |
| 93 | + Given operation "GetChangeRequest" enabled |
| 94 | + And new "GetChangeRequest" request |
| 95 | + And request contains "change_request_id" parameter from "REPLACE.ME" |
| 96 | + When the request is sent |
| 97 | + Then the response status is 404 Not Found |
| 98 | + |
| 99 | + @generated @skip @team:DataDog/case-management |
| 100 | + Scenario: Get a change request returns "OK" response |
| 101 | + Given operation "GetChangeRequest" enabled |
| 102 | + And new "GetChangeRequest" request |
| 103 | + And request contains "change_request_id" parameter from "REPLACE.ME" |
| 104 | + When the request is sent |
| 105 | + Then the response status is 200 OK |
| 106 | + |
| 107 | + @generated @skip @team:DataDog/case-management |
| 108 | + Scenario: Update a change request decision returns "Bad Request" response |
| 109 | + Given operation "UpdateChangeRequestDecision" enabled |
| 110 | + And new "UpdateChangeRequestDecision" request |
| 111 | + And request contains "change_request_id" parameter from "REPLACE.ME" |
| 112 | + And request contains "decision_id" parameter from "REPLACE.ME" |
| 113 | + And body with value {"data": {"attributes": {"id": "CHM-1234"}, "relationships": {"change_request_decisions": {"data": [{"id": "decision-id-0", "type": "change_request_decision"}]}}, "type": "change_request"}, "included": [{"attributes": {"change_request_status": "REQUESTED", "request_reason": "Please review and approve this change"}, "id": "decision-id-0", "relationships": {"requested_user": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "user"}}}, "type": "change_request_decision"}]} |
| 114 | + When the request is sent |
| 115 | + Then the response status is 400 Bad Request |
| 116 | + |
| 117 | + @generated @skip @team:DataDog/case-management |
| 118 | + Scenario: Update a change request decision returns "Not Found" response |
| 119 | + Given operation "UpdateChangeRequestDecision" enabled |
| 120 | + And new "UpdateChangeRequestDecision" request |
| 121 | + And request contains "change_request_id" parameter from "REPLACE.ME" |
| 122 | + And request contains "decision_id" parameter from "REPLACE.ME" |
| 123 | + And body with value {"data": {"attributes": {"id": "CHM-1234"}, "relationships": {"change_request_decisions": {"data": [{"id": "decision-id-0", "type": "change_request_decision"}]}}, "type": "change_request"}, "included": [{"attributes": {"change_request_status": "REQUESTED", "request_reason": "Please review and approve this change"}, "id": "decision-id-0", "relationships": {"requested_user": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "user"}}}, "type": "change_request_decision"}]} |
| 124 | + When the request is sent |
| 125 | + Then the response status is 404 Not Found |
| 126 | + |
| 127 | + @generated @skip @team:DataDog/case-management |
| 128 | + Scenario: Update a change request decision returns "OK" response |
| 129 | + Given operation "UpdateChangeRequestDecision" enabled |
| 130 | + And new "UpdateChangeRequestDecision" request |
| 131 | + And request contains "change_request_id" parameter from "REPLACE.ME" |
| 132 | + And request contains "decision_id" parameter from "REPLACE.ME" |
| 133 | + And body with value {"data": {"attributes": {"id": "CHM-1234"}, "relationships": {"change_request_decisions": {"data": [{"id": "decision-id-0", "type": "change_request_decision"}]}}, "type": "change_request"}, "included": [{"attributes": {"change_request_status": "REQUESTED", "request_reason": "Please review and approve this change"}, "id": "decision-id-0", "relationships": {"requested_user": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "user"}}}, "type": "change_request_decision"}]} |
| 134 | + When the request is sent |
| 135 | + Then the response status is 200 OK |
| 136 | + |
| 137 | + @generated @skip @team:DataDog/case-management |
| 138 | + Scenario: Update a change request returns "Bad Request" response |
| 139 | + Given operation "UpdateChangeRequest" enabled |
| 140 | + And new "UpdateChangeRequest" request |
| 141 | + And request contains "change_request_id" parameter from "REPLACE.ME" |
| 142 | + And body with value {"data": {"attributes": {"change_request_plan": "Updated deployment plan", "change_request_risk": "LOW", "change_request_type": "NORMAL", "end_date": "2024-01-02T15:00:00Z", "id": "CHM-1234", "start_date": "2024-01-01T03:00:00Z"}, "relationships": {"change_request_decisions": {"data": [{"id": "decision-id-0", "type": "change_request_decision"}]}}, "type": "change_request"}, "included": [{"attributes": {"change_request_status": "REQUESTED", "request_reason": "Please review and approve this change"}, "id": "decision-id-0", "relationships": {"requested_user": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "user"}}}, "type": "change_request_decision"}]} |
| 143 | + When the request is sent |
| 144 | + Then the response status is 400 Bad Request |
| 145 | + |
| 146 | + @generated @skip @team:DataDog/case-management |
| 147 | + Scenario: Update a change request returns "Not Found" response |
| 148 | + Given operation "UpdateChangeRequest" enabled |
| 149 | + And new "UpdateChangeRequest" request |
| 150 | + And request contains "change_request_id" parameter from "REPLACE.ME" |
| 151 | + And body with value {"data": {"attributes": {"change_request_plan": "Updated deployment plan", "change_request_risk": "LOW", "change_request_type": "NORMAL", "end_date": "2024-01-02T15:00:00Z", "id": "CHM-1234", "start_date": "2024-01-01T03:00:00Z"}, "relationships": {"change_request_decisions": {"data": [{"id": "decision-id-0", "type": "change_request_decision"}]}}, "type": "change_request"}, "included": [{"attributes": {"change_request_status": "REQUESTED", "request_reason": "Please review and approve this change"}, "id": "decision-id-0", "relationships": {"requested_user": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "user"}}}, "type": "change_request_decision"}]} |
| 152 | + When the request is sent |
| 153 | + Then the response status is 404 Not Found |
| 154 | + |
| 155 | + @generated @skip @team:DataDog/case-management |
| 156 | + Scenario: Update a change request returns "OK" response |
| 157 | + Given operation "UpdateChangeRequest" enabled |
| 158 | + And new "UpdateChangeRequest" request |
| 159 | + And request contains "change_request_id" parameter from "REPLACE.ME" |
| 160 | + And body with value {"data": {"attributes": {"change_request_plan": "Updated deployment plan", "change_request_risk": "LOW", "change_request_type": "NORMAL", "end_date": "2024-01-02T15:00:00Z", "id": "CHM-1234", "start_date": "2024-01-01T03:00:00Z"}, "relationships": {"change_request_decisions": {"data": [{"id": "decision-id-0", "type": "change_request_decision"}]}}, "type": "change_request"}, "included": [{"attributes": {"change_request_status": "REQUESTED", "request_reason": "Please review and approve this change"}, "id": "decision-id-0", "relationships": {"requested_user": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "user"}}}, "type": "change_request_decision"}]} |
| 161 | + When the request is sent |
| 162 | + Then the response status is 200 OK |
0 commit comments