|
| 1 | +@endpoint(rum-teams-ownership) @endpoint(rum-teams-ownership-v2) |
| 2 | +Feature: Rum Teams Ownership |
| 3 | + Manage [teams ownership](https://docs.datadoghq.com/real_user_monitoring/p |
| 4 | + latform/ownership/) mappings between RUM views and the teams that own |
| 5 | + them. |
| 6 | + |
| 7 | + Background: |
| 8 | + Given a valid "apiKeyAuth" key in the system |
| 9 | + And a valid "appKeyAuth" key in the system |
| 10 | + And an instance of "RumTeamsOwnership" API |
| 11 | + |
| 12 | + @team:DataDog/rum-backend |
| 13 | + Scenario: Bulk create and remove teams ownership mappings returns "Bad Request" response |
| 14 | + Given new "CreateTeamsOwnershipMappingsBatch" request |
| 15 | + And body with value {"atomic:operations":[{"op":"add","data":{"type":"teams_ownership_mappings","attributes":{"team_handle":"team-rum","view_name":"/checkout","service":"web-checkout","application_id":"invalid-uuid","match_type":"exact"}}}]} |
| 16 | + When the request is sent |
| 17 | + Then the response status is 400 Bad Request |
| 18 | + |
| 19 | + @generated @skip @team:DataDog/rum-backend |
| 20 | + Scenario: Bulk create and remove teams ownership mappings returns "Bad Request. One or more operations failed validation, so none of the operations were applied." response |
| 21 | + Given operation "CreateTeamsOwnershipMappingsBatch" enabled |
| 22 | + And new "CreateTeamsOwnershipMappingsBatch" request |
| 23 | + And body with value {"atomic:operations": [{"data": {"attributes": {"application_id": "11111111-2222-3333-4444-555555555555", "match_type": "exact", "service": "web-checkout", "team_handle": "team-rum", "view_name": "/checkout"}, "type": "teams_ownership_mappings"}, "op": "add", "ref": {"id": "456", "type": "teams_ownership_mappings"}}]} |
| 24 | + When the request is sent |
| 25 | + Then the response status is 400 Bad Request. One or more operations failed validation, so none of the operations were applied. |
| 26 | + |
| 27 | + @team:DataDog/rum-backend |
| 28 | + Scenario: Bulk create and remove teams ownership mappings returns "OK" response |
| 29 | + Given new "CreateTeamsOwnershipMappingsBatch" request |
| 30 | + And body with value {"atomic:operations":[{"op":"add","data":{"type":"teams_ownership_mappings","attributes":{"team_handle":"team-rum","view_name":"/checkout","service":"web-checkout","application_id":"11111111-2222-3333-4444-555555555555","match_type":"exact"}}},{"op":"remove","ref":{"type":"teams_ownership_mappings","id":"456"}}]} |
| 31 | + When the request is sent |
| 32 | + Then the response status is 200 OK |
| 33 | + And the response "atomic:results[0].data.type" is equal to "teams_ownership_mappings" |
| 34 | + And the response "atomic:results[0].data.attributes.team_handle" is equal to "team-rum" |
| 35 | + And the response "atomic:results[0].data.attributes.match_type" is equal to "exact" |
| 36 | + |
| 37 | + @generated @skip @team:DataDog/rum-backend |
| 38 | + Scenario: Create a teams ownership mapping returns "Bad Request" response |
| 39 | + Given operation "CreateTeamsOwnershipMapping" enabled |
| 40 | + And new "CreateTeamsOwnershipMapping" request |
| 41 | + And body with value {"data": {"attributes": {"application_id": "11111111-2222-3333-4444-555555555555", "match_type": "exact", "service": "web-checkout", "team_handle": "team-rum", "view_name": "/checkout"}, "type": "teams_ownership_mappings"}} |
| 42 | + When the request is sent |
| 43 | + Then the response status is 400 Bad Request |
| 44 | + |
| 45 | + @generated @skip @team:DataDog/rum-backend |
| 46 | + Scenario: Create a teams ownership mapping returns "Created" response |
| 47 | + Given operation "CreateTeamsOwnershipMapping" enabled |
| 48 | + And new "CreateTeamsOwnershipMapping" request |
| 49 | + And body with value {"data": {"attributes": {"application_id": "11111111-2222-3333-4444-555555555555", "match_type": "exact", "service": "web-checkout", "team_handle": "team-rum", "view_name": "/checkout"}, "type": "teams_ownership_mappings"}} |
| 50 | + When the request is sent |
| 51 | + Then the response status is 201 Created |
| 52 | + |
| 53 | + @team:DataDog/rum-backend |
| 54 | + Scenario: Create teams ownership mapping returns "Bad Request" response |
| 55 | + Given new "CreateTeamsOwnershipMapping" request |
| 56 | + And body with value {"data":{"type":"teams_ownership_mappings","attributes":{"team_handle":"team-rum","view_name":"/checkout","service":"web-checkout","application_id":"invalid-uuid","match_type":"exact"}}} |
| 57 | + When the request is sent |
| 58 | + Then the response status is 400 Bad Request |
| 59 | + |
| 60 | + @team:DataDog/rum-backend |
| 61 | + Scenario: Create teams ownership mapping returns "Created" response |
| 62 | + Given new "CreateTeamsOwnershipMapping" request |
| 63 | + And body with value {"data":{"type":"teams_ownership_mappings","attributes":{"team_handle":"team-rum","view_name":"/checkout","service":"web-checkout","application_id":"11111111-2222-3333-4444-555555555555","match_type":"exact"}}} |
| 64 | + When the request is sent |
| 65 | + Then the response status is 201 Created |
| 66 | + And the response "data.type" is equal to "teams_ownership_mappings" |
| 67 | + And the response "data.attributes.team_handle" is equal to "team-rum" |
| 68 | + And the response "data.attributes.view_name" is equal to "/checkout" |
| 69 | + And the response "data.attributes.service" is equal to "web-checkout" |
| 70 | + And the response "data.attributes.application_id" is equal to "11111111-2222-3333-4444-555555555555" |
| 71 | + And the response "data.attributes.match_type" is equal to "exact" |
| 72 | + |
| 73 | + @team:DataDog/rum-backend |
| 74 | + Scenario: Delete a teams ownership mapping returns "No Content" response |
| 75 | + Given new "DeleteTeamsOwnershipMapping" request |
| 76 | + And request contains "id" parameter with value "123" |
| 77 | + When the request is sent |
| 78 | + Then the response status is 204 No Content |
| 79 | + |
| 80 | + @team:DataDog/rum-backend |
| 81 | + Scenario: Delete a teams ownership mapping returns "Not Found" response |
| 82 | + Given new "DeleteTeamsOwnershipMapping" request |
| 83 | + And request contains "id" parameter with value "{{ unique }}" |
| 84 | + When the request is sent |
| 85 | + Then the response status is 404 Not Found |
| 86 | + |
| 87 | + @team:DataDog/rum-backend |
| 88 | + Scenario: Get a teams ownership mapping returns "Not Found" response |
| 89 | + Given new "GetTeamsOwnershipMapping" request |
| 90 | + And request contains "id" parameter with value "{{ unique }}" |
| 91 | + When the request is sent |
| 92 | + Then the response status is 404 Not Found |
| 93 | + |
| 94 | + @team:DataDog/rum-backend |
| 95 | + Scenario: Get a teams ownership mapping returns "OK" response |
| 96 | + Given new "GetTeamsOwnershipMapping" request |
| 97 | + And request contains "id" parameter with value "123" |
| 98 | + When the request is sent |
| 99 | + Then the response status is 200 OK |
| 100 | + And the response "data.id" is equal to "123" |
| 101 | + And the response "data.type" is equal to "teams_ownership_mappings" |
| 102 | + And the response "data.attributes.team_handle" is equal to "team-rum" |
| 103 | + And the response "data.attributes.view_name" is equal to "/checkout" |
| 104 | + And the response "data.attributes.match_type" is equal to "exact" |
| 105 | + |
| 106 | + @team:DataDog/rum-backend |
| 107 | + Scenario: List teams ownership mappings returns "OK" response |
| 108 | + Given new "ListTeamsOwnershipMappings" request |
| 109 | + When the request is sent |
| 110 | + Then the response status is 200 OK |
| 111 | + And the response "data" has length 1 |
| 112 | + And the response "data[0].type" is equal to "teams_ownership_mappings" |
| 113 | + And the response "data[0].attributes.team_handle" is equal to "team-rum" |
| 114 | + And the response "data[0].attributes.view_name" is equal to "/checkout" |
| 115 | + And the response "data[0].attributes.service" is equal to "web-checkout" |
| 116 | + And the response "data[0].attributes.application_id" is equal to "11111111-2222-3333-4444-555555555555" |
| 117 | + And the response "data[0].attributes.match_type" is equal to "exact" |
| 118 | + |
| 119 | + @team:DataDog/rum-backend |
| 120 | + Scenario: List teams ownership rules returns "OK" response |
| 121 | + Given new "ListTeamsOwnershipRules" request |
| 122 | + When the request is sent |
| 123 | + Then the response status is 200 OK |
| 124 | + And the response "data" has length 1 |
| 125 | + And the response "data[0].type" is equal to "teams_ownership_grouped_mappings" |
| 126 | + And the response "data[0].attributes.view_name" is equal to "/checkout" |
| 127 | + And the response "data[0].attributes.match_type" is equal to "exact" |
0 commit comments