|
| 1 | +@endpoint(team-connections) @endpoint(team-connections-v2) |
| 2 | +Feature: Team Connections |
| 3 | + View and manage relationships between Datadog teams and teams from |
| 4 | + external sources, such as GitHub. |
| 5 | + |
| 6 | + Background: |
| 7 | + Given a valid "apiKeyAuth" key in the system |
| 8 | + And a valid "appKeyAuth" key in the system |
| 9 | + And an instance of "TeamConnections" API |
| 10 | + |
| 11 | + @skip @team:DataDog/aaa-omg |
| 12 | + Scenario: Create team connections returns "Bad Request" response |
| 13 | + Given operation "CreateTeamConnections" enabled |
| 14 | + And new "CreateTeamConnections" request |
| 15 | + And body with value {"data": [{"attributes": {"source": "github"}, "relationships": {"connected_team": {"data": {"id": "@MyGitHubAccount/my-team-name", "type": "github_team"}}, "team": {"data": {"type": "team"}}}, "type": "team_connection"}]} |
| 16 | + When the request is sent |
| 17 | + Then the response status is 400 Bad Request |
| 18 | + |
| 19 | + @generated @skip @team:DataDog/aaa-omg |
| 20 | + Scenario: Create team connections returns "Conflict" response |
| 21 | + Given operation "CreateTeamConnections" enabled |
| 22 | + And new "CreateTeamConnections" request |
| 23 | + And body with value {"data": [{"attributes": {"managed_by": "github_sync", "source": "github"}, "relationships": {"connected_team": {"data": {"id": "@MyGitHubAccount/my-team-name", "type": "github_team"}}, "team": {"data": {"id": "87654321-4321-8765-dcba-210987654321", "type": "team"}}}, "type": "team_connection"}]} |
| 24 | + When the request is sent |
| 25 | + Then the response status is 409 Conflict |
| 26 | + |
| 27 | + @skip @team:DataDog/aaa-omg |
| 28 | + Scenario: Create team connections returns "Created" response |
| 29 | + Given operation "CreateTeamConnections" enabled |
| 30 | + And new "CreateTeamConnections" request |
| 31 | + And there is a valid "dd_team" in the system |
| 32 | + And body with value {"data": [{"type": "team_connection", "attributes": {"source": "github", "managed_by": "datadog"}, "relationships": {"team": {"data": {"id": "{{ dd_team.data.id }}", "type": "team"}}, "connected_team": {"data": {"id": "@MyGitHubAccount/my-team-name", "type": "github_team"}}}}]} |
| 33 | + When the request is sent |
| 34 | + Then the response status is 201 Created |
| 35 | + And the response "data.data[0].attributes.source" is equal to "github" |
| 36 | + And the response "data.data[0].attributes.managed_by" is equal to "datadog" |
| 37 | + And the response "data.data[0].relationships.team.data.id" is equal to "{{ dd_team.data.id }}" |
| 38 | + And the response "data.data[0].relationships.connected_team.data.id" is equal to "@MyGitHubAccount/my-team-name" |
| 39 | + And the response "data.data[0].type" is equal to "team_connection" |
| 40 | + |
| 41 | + @skip @team:DataDog/aaa-omg |
| 42 | + Scenario: Delete team connections returns "Bad Request" response |
| 43 | + Given operation "DeleteTeamConnections" enabled |
| 44 | + And new "DeleteTeamConnections" request |
| 45 | + And body with value {"data": [{"type": "team_connection"}]} |
| 46 | + When the request is sent |
| 47 | + Then the response status is 400 Bad Request |
| 48 | + |
| 49 | + @generated @skip @team:DataDog/aaa-omg |
| 50 | + Scenario: Delete team connections returns "No Content" response |
| 51 | + Given operation "DeleteTeamConnections" enabled |
| 52 | + And new "DeleteTeamConnections" request |
| 53 | + And body with value {"data": [{"id": "12345678-1234-5678-9abc-123456789012", "type": "team_connection"}]} |
| 54 | + When the request is sent |
| 55 | + Then the response status is 204 No Content |
| 56 | + |
| 57 | + @generated @skip @team:DataDog/aaa-omg |
| 58 | + Scenario: Delete team connections returns "Not Found" response |
| 59 | + Given operation "DeleteTeamConnections" enabled |
| 60 | + And new "DeleteTeamConnections" request |
| 61 | + And body with value {"data": [{"id": "12345678-1234-5678-9abc-123456789012", "type": "team_connection"}]} |
| 62 | + When the request is sent |
| 63 | + Then the response status is 404 Not Found |
| 64 | + |
| 65 | + @generated @skip @team:DataDog/aaa-omg |
| 66 | + Scenario: List team connections returns "Bad Request" response |
| 67 | + Given operation "ListTeamConnections" enabled |
| 68 | + And new "ListTeamConnections" request |
| 69 | + When the request is sent |
| 70 | + Then the response status is 400 Bad Request |
| 71 | + |
| 72 | + @skip @team:DataDog/aaa-omg |
| 73 | + Scenario: List team connections returns "OK" response |
| 74 | + Given operation "ListTeamConnections" enabled |
| 75 | + And new "ListTeamConnections" request |
| 76 | + When the request is sent |
| 77 | + Then the response status is 200 OK |
| 78 | + |
| 79 | + @generated @skip @team:DataDog/aaa-omg @with-pagination |
| 80 | + Scenario: List team connections returns "OK" response with pagination |
| 81 | + Given operation "ListTeamConnections" enabled |
| 82 | + And new "ListTeamConnections" request |
| 83 | + When the request with pagination is sent |
| 84 | + Then the response status is 200 OK |
| 85 | + |
| 86 | + @skip @team:DataDog/aaa-omg |
| 87 | + Scenario: List team connections with filters returns "OK" response |
| 88 | + Given operation "ListTeamConnections" enabled |
| 89 | + And new "ListTeamConnections" request |
| 90 | + And request contains "filter[sources]" parameter with value ["github"] |
| 91 | + And request contains "page[size]" parameter with value 10 |
| 92 | + When the request is sent |
| 93 | + Then the response status is 200 OK |
0 commit comments