|
| 1 | +@endpoint(reference-tables) @endpoint(reference-tables-v2) |
| 2 | +Feature: Reference Tables |
| 3 | + Auto-generated tag Reference Tables |
| 4 | + |
| 5 | + Background: |
| 6 | + Given a valid "apiKeyAuth" key in the system |
| 7 | + And a valid "appKeyAuth" key in the system |
| 8 | + And an instance of "ReferenceTables" API |
| 9 | + |
| 10 | + @integration-only @team:DataDog/redapl-experiences |
| 11 | + Scenario: Create reference table returns "Created" response |
| 12 | + Given new "CreateReferenceTable" request |
| 13 | + And body with value {"data": {"attributes": {"description": "Test reference table created via BDD test {{ unique }}", "source": "LOCAL_FILE", "schema": {"fields": [{"name": "id", "type": "STRING"}, {"name": "name", "type": "STRING"}, {"name": "value", "type": "INT32"}], "primary_keys": ["id"]}, "table_name": "test_reference_table_{{ unique }}", "tags": ["test_tag"]}, "type": "reference_table"}} |
| 14 | + When the request is sent |
| 15 | + Then the response status is 201 Created |
| 16 | + And the response "data.type" is equal to "reference_table" |
| 17 | + And the response "data.attributes.table_name" is equal to "test_reference_table_{{ unique }}" |
| 18 | + |
| 19 | + @integration-only @team:DataDog/redapl-experiences |
| 20 | + Scenario: Create reference table upload returns "Created" response |
| 21 | + Given new "CreateReferenceTableUpload" request |
| 22 | + And body with value {"data": {"attributes": {"headers": ["id", "name", "value"], "table_name": "test_upload_table_{{ unique }}", "part_count": 1, "part_size": 1024}, "type": "upload"}} |
| 23 | + When the request is sent |
| 24 | + Then the response status is 201 Created |
| 25 | + And the response "data.type" is equal to "upload" |
| 26 | + And the response "data.attributes.table_name" is equal to "test_upload_table_{{ unique }}" |
| 27 | + |
| 28 | + @integration-only @team:DataDog/redapl-experiences |
| 29 | + Scenario: Delete table returns "OK" response |
| 30 | + Given there is a valid "reference_table" in the system |
| 31 | + And new "DeleteTable" request |
| 32 | + And request contains "id" parameter from "reference_table.data.id" |
| 33 | + When the request is sent |
| 34 | + Then the response status is 200 OK |
| 35 | + |
| 36 | + @integration-only @team:DataDog/redapl-experiences |
| 37 | + Scenario: Get rows by id returns "Successfully retrieved rows. Some or all requested rows were found. Metadata about not-found rows is included in the meta object." response |
| 38 | + Given there is a valid "reference_table" in the system |
| 39 | + And new "GetRowsByID" request |
| 40 | + And request contains "row_id" parameter with value ["test_row_1", "test_row_2"] |
| 41 | + And request contains "id" parameter from "reference_table.data.id" |
| 42 | + When the request is sent |
| 43 | + Then the response status is 200 Successfully retrieved rows. Some or all requested rows were found. Metadata about not-found rows is included in the meta object. |
| 44 | + And the response "data" has field "array" |
| 45 | + |
| 46 | + @integration-only @team:DataDog/redapl-experiences |
| 47 | + Scenario: Get table returns "OK" response |
| 48 | + Given there is a valid "reference_table" in the system |
| 49 | + And new "GetTable" request |
| 50 | + And request contains "id" parameter from "reference_table.data.id" |
| 51 | + When the request is sent |
| 52 | + Then the response status is 200 OK |
| 53 | + And the response "data.type" is equal to "reference_table" |
| 54 | + And the response "data.id" has the same value as "reference_table.data.id" |
| 55 | + |
| 56 | + @integration-only @team:DataDog/redapl-experiences |
| 57 | + Scenario: List tables returns "OK" response |
| 58 | + Given new "ListTables" request |
| 59 | + When the request is sent |
| 60 | + Then the response status is 200 OK |
| 61 | + And the response "data" has field "array" |
| 62 | + |
| 63 | + @integration-only @team:DataDog/redapl-experiences |
| 64 | + Scenario: Update reference table returns "OK" response |
| 65 | + Given there is a valid "reference_table" in the system |
| 66 | + And new "UpdateReferenceTable" request |
| 67 | + And request contains "id" parameter from "reference_table.data.id" |
| 68 | + And body with value {"data": {"attributes": {"description": "Updated test reference table description {{ unique }}"}, "type": "reference_table"}} |
| 69 | + When the request is sent |
| 70 | + Then the response status is 200 OK |
| 71 | + And the response "data.type" is equal to "reference_table" |
| 72 | + And the response "data.attributes.description" is equal to "Updated test reference table description {{ unique }}" |
0 commit comments