diff --git a/sdk/tables/azure-data-tables/CHANGELOG.md b/sdk/tables/azure-data-tables/CHANGELOG.md index a668c91863f3..7475207b007d 100644 --- a/sdk/tables/azure-data-tables/CHANGELOG.md +++ b/sdk/tables/azure-data-tables/CHANGELOG.md @@ -3,6 +3,7 @@ ## 12.0.1 (Unreleased) ### Features Added +* Storage Accounts only: `TableClient` and `TableServiceClient`s can now use `azure-identity` credentials for authentication. Note: A `TableClient` authenticated with a `TokenCredential` cannot use the `get_table_access_policy` or `set_table_access_policy` methods. ### Breaking Changes diff --git a/sdk/tables/azure-data-tables/azure/data/tables/_base_client.py b/sdk/tables/azure-data-tables/azure/data/tables/_base_client.py index dee6b80de13e..f18a8100bc46 100644 --- a/sdk/tables/azure-data-tables/azure/data/tables/_base_client.py +++ b/sdk/tables/azure-data-tables/azure/data/tables/_base_client.py @@ -394,7 +394,7 @@ def format_query_string(sas_token, credential): "You cannot use AzureSasCredential when the resource URI also contains a Shared Access Signature.") if sas_token and not credential: query_str += sas_token - elif isinstance(credential, (AzureSasCredential, AzureNamedKeyCredential)): + elif credential: return "", credential return query_str.rstrip("?&"), None diff --git a/sdk/tables/azure-data-tables/azure/data/tables/_table_client.py b/sdk/tables/azure-data-tables/azure/data/tables/_table_client.py index d8d4c8b1adb1..14e9e437f461 100644 --- a/sdk/tables/azure-data-tables/azure/data/tables/_table_client.py +++ b/sdk/tables/azure-data-tables/azure/data/tables/_table_client.py @@ -72,11 +72,12 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential :param str table_name: The table name. :keyword credential: The credentials with which to authenticate. This is optional if the - account URL already has a SAS token. The value can be one of AzureNamedKeyCredential - or AzureSasCredential from azure-core. + account URL already has a SAS token. The value can be one of AzureNamedKeyCredential (azure-core), + AzureSasCredential (azure-core), or TokenCredentials from azure-identity. :paramtype credential: :class:`~azure.core.credentials.AzureNamedKeyCredential` or - :class:`~azure.core.credentials.AzureSasCredential` + :class:`~azure.core.credentials.AzureSasCredential` or + :class:`~azure.core.credentials.TokenCredential` :returns: None """ if not table_name: diff --git a/sdk/tables/azure-data-tables/azure/data/tables/_table_service_client.py b/sdk/tables/azure-data-tables/azure/data/tables/_table_service_client.py index 229dea466370..b970f02e215d 100644 --- a/sdk/tables/azure-data-tables/azure/data/tables/_table_service_client.py +++ b/sdk/tables/azure-data-tables/azure/data/tables/_table_service_client.py @@ -44,11 +44,12 @@ class TableServiceClient(TablesBaseClient): authenticated with a SAS token. :keyword credential: The credentials with which to authenticate. This is optional if the - account URL already has a SAS token. The value can be one of AzureNamedKeyCredential - or AzureSasCredential from azure-core. + account URL already has a SAS token. The value can be one of AzureNamedKeyCredential (azure-core), + AzureSasCredential (azure-core), or TokenCredentials from azure-identity. :paramtype credential: :class:`~azure.core.credentials.AzureNamedKeyCredential` or - :class:`~azure.core.credentials.AzureSasCredential` + :class:`~azure.core.credentials.AzureSasCredential` or + :class:`~azure.core.credentials.TokenCredential` :keyword str api_version: The Storage API version to use for requests. Default value is '2019-02-02'. Setting to an older version may result in reduced feature compatibility. diff --git a/sdk/tables/azure-data-tables/azure/data/tables/aio/_table_client_async.py b/sdk/tables/azure-data-tables/azure/data/tables/aio/_table_client_async.py index ed4f669e9717..61139d8b897f 100644 --- a/sdk/tables/azure-data-tables/azure/data/tables/aio/_table_client_async.py +++ b/sdk/tables/azure-data-tables/azure/data/tables/aio/_table_client_async.py @@ -61,11 +61,12 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential :param str table_name: The table name. :keyword credential: The credentials with which to authenticate. This is optional if the - account URL already has a SAS token. The value can be one of AzureNamedKeyCredential - or AzureSasCredential from azure-core. + account URL already has a SAS token. The value can be one of AzureNamedKeyCredential (azure-core), + AzureSasCredential (azure-core), or TokenCredentials from azure-identity. :paramtype credential: :class:`~azure.core.credentials.AzureNamedKeyCredential` or - :class:`~azure.core.credentials.AzureSasCredential` + :class:`~azure.core.credentials.AzureSasCredential` or + :class:`~azure.core.credentials.TokenCredential` :returns: None """ diff --git a/sdk/tables/azure-data-tables/azure/data/tables/aio/_table_service_client_async.py b/sdk/tables/azure-data-tables/azure/data/tables/aio/_table_service_client_async.py index c5f62586946e..c6ad7a64b618 100644 --- a/sdk/tables/azure-data-tables/azure/data/tables/aio/_table_service_client_async.py +++ b/sdk/tables/azure-data-tables/azure/data/tables/aio/_table_service_client_async.py @@ -47,11 +47,12 @@ class TableServiceClient(AsyncTablesBaseClient): authenticated with a SAS token. :keyword credential: The credentials with which to authenticate. This is optional if the - account URL already has a SAS token. The value can be one of AzureNamedKeyCredential - or AzureSasCredential from azure-core. + account URL already has a SAS token. The value can be one of AzureNamedKeyCredential (azure-core), + AzureSasCredential (azure-core), or TokenCredentials from azure-identity. :paramtype credential: :class:`~azure.core.credentials.AzureNamedKeyCredential` or - :class:`~azure.core.credentials.AzureSasCredential` + :class:`~azure.core.credentials.AzureSasCredential` or + :class:`~azure.core.credentials.TokenCredential` :keyword str api_version: The Storage API version to use for requests. Default value is '2019-02-02'. Setting to an older version may result in reduced feature compatibility. diff --git a/sdk/tables/azure-data-tables/tests/_shared/asynctestcase.py b/sdk/tables/azure-data-tables/tests/_shared/asynctestcase.py index 0da9a6bac08c..0189409a4dfc 100644 --- a/sdk/tables/azure-data-tables/tests/_shared/asynctestcase.py +++ b/sdk/tables/azure-data-tables/tests/_shared/asynctestcase.py @@ -16,6 +16,7 @@ EdmType, ) from azure.data.tables.aio import TableServiceClient +from azure.identity.aio import DefaultAzureCredential from devtools_testutils import is_live @@ -38,6 +39,11 @@ async def get_token(self, *args): class AsyncTableTestCase(TableTestCase): + def get_token_credential(self): + if is_live(): + return DefaultAzureCredential() + return self.generate_fake_token() + def generate_fake_token(self): return AsyncFakeTokenCredential() @@ -116,9 +122,9 @@ async def _insert_random_entity(self, pk=None, rk=None): metadata = await self.table.create_entity(entity=entity) return entity, metadata["etag"] - async def _set_up(self, account_name, account_key, url="table"): + async def _set_up(self, account_name, credential, url="table"): account_url = self.account_url(account_name, url) - self.ts = TableServiceClient(account_url, credential=account_key) + self.ts = TableServiceClient(account_url, credential=credential) self.table_name = self.get_resource_name("uttable") self.table = self.ts.get_table_client(self.table_name) if self.is_live: diff --git a/sdk/tables/azure-data-tables/tests/_shared/testcase.py b/sdk/tables/azure-data-tables/tests/_shared/testcase.py index e8315f52cb1e..12123d4268b1 100644 --- a/sdk/tables/azure-data-tables/tests/_shared/testcase.py +++ b/sdk/tables/azure-data-tables/tests/_shared/testcase.py @@ -23,6 +23,7 @@ TableMetrics, TableServiceClient, ) +from azure.identity import DefaultAzureCredential from devtools_testutils import is_live @@ -30,6 +31,14 @@ TEST_TABLE_PREFIX = "pytablesync" +SERVICE_UNAVAILABLE_RESP_BODY = 'unavailable ' + +SERVICE_LIVE_RESP_BODY = 'liveWed, 19 Jan 2021 22:28:43 GMT ' + class FakeTokenCredential(object): """Protocol for classes able to provide OAuth tokens. @@ -81,6 +90,11 @@ def generate_sas_token(self): expiry=datetime.now() + timedelta(days=8), ) + def get_token_credential(self): + if is_live(): + return DefaultAzureCredential() + return self.generate_fake_token() + def generate_fake_token(self): return FakeTokenCredential() @@ -421,10 +435,10 @@ def _insert_random_entity(self, pk=None, rk=None): metadata = self.table.create_entity(entity) return entity, metadata["etag"] - def _set_up(self, account_name, account_key, url="table"): + def _set_up(self, account_name, credential, url="table"): self.table_name = self.get_resource_name("uttable") self.ts = TableServiceClient( - self.account_url(account_name, url), credential=account_key, table_name=self.table_name + self.account_url(account_name, url), credential=credential, table_name=self.table_name ) self.table = self.ts.get_table_client(self.table_name) if self.is_live: @@ -449,6 +463,13 @@ def _assert_stats_unavailable(self, stats): assert stats["geo_replication"]["status"] == "unavailable" assert stats["geo_replication"]["last_sync_time"] is None + @staticmethod + def override_response_body_with_unavailable_status(response): + response.http_response.text = lambda _: SERVICE_UNAVAILABLE_RESP_BODY + + @staticmethod + def override_response_body_with_live_status(response): + response.http_response.text = lambda _: SERVICE_LIVE_RESP_BODY class ResponseCallback(object): def __init__(self, status=None, new_status=None): diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_aad.test_aad_access_policy_error.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_aad.test_aad_access_policy_error.yaml new file mode 100644 index 000000000000..816f5301ad16 --- /dev/null +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_aad.test_aad_access_policy_error.yaml @@ -0,0 +1,92 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Date: + - Thu, 17 Jun 2021 16:53:03 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 16:53:03 GMT + x-ms-version: + - '2019-02-02' + method: GET + uri: https://fake_table_account.table.core.windows.net/pytablesync7b551169?comp=acl + response: + body: + string: 'ResourceNotFoundThe specified resource does not exist. + + RequestId:7c3b01c2-0002-006a-1999-63305d000000 + + Time:2021-06-17T16:53:05.6341722Z' + headers: + content-length: + - '322' + content-type: + - application/xml + date: + - Thu, 17 Jun 2021 16:53:04 GMT + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + x-ms-error-code: + - ResourceNotFound + x-ms-version: + - '2019-02-02' + status: + code: 404 + message: The specified resource does not exist. +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + Content-Type: + - application/xml + Date: + - Thu, 17 Jun 2021 16:53:04 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 16:53:04 GMT + x-ms-version: + - '2019-02-02' + method: PUT + uri: https://fake_table_account.table.core.windows.net/pytablesync7b551169?comp=acl + response: + body: + string: 'ResourceNotFoundThe specified resource does not exist. + + RequestId:7c3b0201-0002-006a-5499-63305d000000 + + Time:2021-06-17T16:53:05.7602607Z' + headers: + content-length: + - '322' + content-type: + - application/xml + date: + - Thu, 17 Jun 2021 16:53:04 GMT + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + x-ms-error-code: + - ResourceNotFound + x-ms-version: + - '2019-02-02' + status: + code: 404 + message: The specified resource does not exist. +version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_aad.test_aad_batch_all_operations_together.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_aad.test_aad_batch_all_operations_together.yaml new file mode 100644 index 000000000000..1b2b0769da1d --- /dev/null +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_aad.test_aad_batch_all_operations_together.yaml @@ -0,0 +1,520 @@ +interactions: +- request: + body: '{"TableName": "uttable3e36157d"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '32' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 16:53:05 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 16:53:05 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://fake_table_account.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#Tables/@Element","TableName":"uttable3e36157d"}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Thu, 17 Jun 2021 16:53:07 GMT + location: + - https://fake_table_account.table.core.windows.net/Tables('uttable3e36157d') + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 201 + message: Created +- request: + body: '{"PartitionKey": "003", "PartitionKey@odata.type": "Edm.String", "RowKey": + "batch_all_operations_together-1", "RowKey@odata.type": "Edm.String", "test": + true, "test2": "value", "test2@odata.type": "Edm.String", "test3": 3, "test4": + 1234567890, "test5": "2021-06-17T20:53:06.408852Z", "test5@odata.type": "Edm.DateTime"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '319' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 16:53:06 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 16:53:06 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://fake_table_account.table.core.windows.net/uttable3e36157d + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#uttable3e36157d/@Element","odata.etag":"W/\"datetime''2021-06-17T16%3A53%3A07.3173116Z''\"","PartitionKey":"003","RowKey":"batch_all_operations_together-1","Timestamp":"2021-06-17T16:53:07.3173116Z","test":true,"test2":"value","test3":3,"test4":1234567890,"test5@odata.type":"Edm.DateTime","test5":"2021-06-17T20:53:06.408852Z"}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Thu, 17 Jun 2021 16:53:07 GMT + etag: + - W/"datetime'2021-06-17T16%3A53%3A07.3173116Z'" + location: + - https://fake_table_account.table.core.windows.net/uttable3e36157d(PartitionKey='003',RowKey='batch_all_operations_together-1') + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 201 + message: Created +- request: + body: '{"PartitionKey": "003", "PartitionKey@odata.type": "Edm.String", "RowKey": + "batch_all_operations_together-2", "RowKey@odata.type": "Edm.String", "test": + true, "test2": "value", "test2@odata.type": "Edm.String", "test3": 3, "test4": + 1234567890, "test5": "2021-06-17T20:53:06.408852Z", "test5@odata.type": "Edm.DateTime"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '319' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 16:53:06 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 16:53:06 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://fake_table_account.table.core.windows.net/uttable3e36157d + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#uttable3e36157d/@Element","odata.etag":"W/\"datetime''2021-06-17T16%3A53%3A07.4514057Z''\"","PartitionKey":"003","RowKey":"batch_all_operations_together-2","Timestamp":"2021-06-17T16:53:07.4514057Z","test":true,"test2":"value","test3":3,"test4":1234567890,"test5@odata.type":"Edm.DateTime","test5":"2021-06-17T20:53:06.408852Z"}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Thu, 17 Jun 2021 16:53:07 GMT + etag: + - W/"datetime'2021-06-17T16%3A53%3A07.4514057Z'" + location: + - https://fake_table_account.table.core.windows.net/uttable3e36157d(PartitionKey='003',RowKey='batch_all_operations_together-2') + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 201 + message: Created +- request: + body: '{"PartitionKey": "003", "PartitionKey@odata.type": "Edm.String", "RowKey": + "batch_all_operations_together-3", "RowKey@odata.type": "Edm.String", "test": + true, "test2": "value", "test2@odata.type": "Edm.String", "test3": 3, "test4": + 1234567890, "test5": "2021-06-17T20:53:06.408852Z", "test5@odata.type": "Edm.DateTime"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '319' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 16:53:06 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 16:53:06 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://fake_table_account.table.core.windows.net/uttable3e36157d + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#uttable3e36157d/@Element","odata.etag":"W/\"datetime''2021-06-17T16%3A53%3A07.5925041Z''\"","PartitionKey":"003","RowKey":"batch_all_operations_together-3","Timestamp":"2021-06-17T16:53:07.5925041Z","test":true,"test2":"value","test3":3,"test4":1234567890,"test5@odata.type":"Edm.DateTime","test5":"2021-06-17T20:53:06.408852Z"}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Thu, 17 Jun 2021 16:53:07 GMT + etag: + - W/"datetime'2021-06-17T16%3A53%3A07.5925041Z'" + location: + - https://fake_table_account.table.core.windows.net/uttable3e36157d(PartitionKey='003',RowKey='batch_all_operations_together-3') + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 201 + message: Created +- request: + body: '{"PartitionKey": "003", "PartitionKey@odata.type": "Edm.String", "RowKey": + "batch_all_operations_together-4", "RowKey@odata.type": "Edm.String", "test": + true, "test2": "value", "test2@odata.type": "Edm.String", "test3": 3, "test4": + 1234567890, "test5": "2021-06-17T20:53:06.408852Z", "test5@odata.type": "Edm.DateTime"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '319' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 16:53:06 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 16:53:06 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://fake_table_account.table.core.windows.net/uttable3e36157d + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#uttable3e36157d/@Element","odata.etag":"W/\"datetime''2021-06-17T16%3A53%3A07.7356057Z''\"","PartitionKey":"003","RowKey":"batch_all_operations_together-4","Timestamp":"2021-06-17T16:53:07.7356057Z","test":true,"test2":"value","test3":3,"test4":1234567890,"test5@odata.type":"Edm.DateTime","test5":"2021-06-17T20:53:06.408852Z"}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Thu, 17 Jun 2021 16:53:07 GMT + etag: + - W/"datetime'2021-06-17T16%3A53%3A07.7356057Z'" + location: + - https://fake_table_account.table.core.windows.net/uttable3e36157d(PartitionKey='003',RowKey='batch_all_operations_together-4') + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 201 + message: Created +- request: + body: "--batch_03580d72-de55-462e-9773-08d34495f4cb\r\nContent-Type: multipart/mixed;\ + \ boundary=changeset_d36dcd90-74f2-4f99-aa86-ef599c2aa069\r\n\r\n--changeset_d36dcd90-74f2-4f99-aa86-ef599c2aa069\r\ + \nContent-Type: application/http\r\nContent-Transfer-Encoding: binary\r\nContent-ID:\ + \ 0\r\n\r\nPOST https://seankaneprim.table.core.windows.net/uttable3e36157d\ + \ HTTP/1.1\r\nx-ms-version: 2019-02-02\r\nDataServiceVersion: 3.0\r\nPrefer:\ + \ return-no-content\r\nContent-Type: application/json;odata=nometadata\r\nAccept:\ + \ application/json;odata=minimalmetadata\r\nContent-Length: 317\r\nx-ms-date:\ + \ Thu, 17 Jun 2021 16:53:06 GMT\r\nDate: Thu, 17 Jun 2021 16:53:06 GMT\r\n\r\ + \n{\"PartitionKey\": \"003\", \"PartitionKey@odata.type\": \"Edm.String\", \"\ + RowKey\": \"batch_all_operations_together\", \"RowKey@odata.type\": \"Edm.String\"\ + , \"test\": true, \"test2\": \"value\", \"test2@odata.type\": \"Edm.String\"\ + , \"test3\": 3, \"test4\": 1234567890, \"test5\": \"2021-06-17T20:53:06.408852Z\"\ + , \"test5@odata.type\": \"Edm.DateTime\"}\r\n--changeset_d36dcd90-74f2-4f99-aa86-ef599c2aa069\r\ + \nContent-Type: application/http\r\nContent-Transfer-Encoding: binary\r\nContent-ID:\ + \ 1\r\n\r\nDELETE https://seankaneprim.table.core.windows.net/uttable3e36157d(PartitionKey='003',RowKey='batch_all_operations_together-1')\ + \ HTTP/1.1\r\nx-ms-version: 2019-02-02\r\nDataServiceVersion: 3.0\r\nIf-Match:\ + \ *\r\nAccept: application/json;odata=minimalmetadata\r\nx-ms-date: Thu, 17\ + \ Jun 2021 16:53:06 GMT\r\nDate: Thu, 17 Jun 2021 16:53:06 GMT\r\n\r\n\r\n--changeset_d36dcd90-74f2-4f99-aa86-ef599c2aa069\r\ + \nContent-Type: application/http\r\nContent-Transfer-Encoding: binary\r\nContent-ID:\ + \ 2\r\n\r\nPATCH https://seankaneprim.table.core.windows.net/uttable3e36157d(PartitionKey='003',RowKey='batch_all_operations_together-2')\ + \ HTTP/1.1\r\nx-ms-version: 2019-02-02\r\nDataServiceVersion: 3.0\r\nIf-Match:\ + \ *\r\nContent-Type: application/json\r\nAccept: application/json\r\nContent-Length:\ + \ 320\r\nx-ms-date: Thu, 17 Jun 2021 16:53:06 GMT\r\nDate: Thu, 17 Jun 2021\ + \ 16:53:06 GMT\r\n\r\n{\"PartitionKey\": \"003\", \"PartitionKey@odata.type\"\ + : \"Edm.String\", \"RowKey\": \"batch_all_operations_together-2\", \"RowKey@odata.type\"\ + : \"Edm.String\", \"test\": true, \"test2\": \"value\", \"test2@odata.type\"\ + : \"Edm.String\", \"test3\": 10, \"test4\": 1234567890, \"test5\": \"2021-06-17T20:53:06.408852Z\"\ + , \"test5@odata.type\": \"Edm.DateTime\"}\r\n--changeset_d36dcd90-74f2-4f99-aa86-ef599c2aa069\r\ + \nContent-Type: application/http\r\nContent-Transfer-Encoding: binary\r\nContent-ID:\ + \ 3\r\n\r\nPUT https://seankaneprim.table.core.windows.net/uttable3e36157d(PartitionKey='003',RowKey='batch_all_operations_together-3')\ + \ HTTP/1.1\r\nx-ms-version: 2019-02-02\r\nDataServiceVersion: 3.0\r\nIf-Match:\ + \ *\r\nContent-Type: application/json\r\nAccept: application/json\r\nContent-Length:\ + \ 321\r\nx-ms-date: Thu, 17 Jun 2021 16:53:06 GMT\r\nDate: Thu, 17 Jun 2021\ + \ 16:53:06 GMT\r\n\r\n{\"PartitionKey\": \"003\", \"PartitionKey@odata.type\"\ + : \"Edm.String\", \"RowKey\": \"batch_all_operations_together-3\", \"RowKey@odata.type\"\ + : \"Edm.String\", \"test\": true, \"test2\": \"value\", \"test2@odata.type\"\ + : \"Edm.String\", \"test3\": 100, \"test4\": 1234567890, \"test5\": \"2021-06-17T20:53:06.408852Z\"\ + , \"test5@odata.type\": \"Edm.DateTime\"}\r\n--changeset_d36dcd90-74f2-4f99-aa86-ef599c2aa069\r\ + \nContent-Type: application/http\r\nContent-Transfer-Encoding: binary\r\nContent-ID:\ + \ 4\r\n\r\nPATCH https://seankaneprim.table.core.windows.net/uttable3e36157d(PartitionKey='003',RowKey='batch_all_operations_together-4')\ + \ HTTP/1.1\r\nx-ms-version: 2019-02-02\r\nDataServiceVersion: 3.0\r\nContent-Type:\ + \ application/json\r\nAccept: application/json\r\nContent-Length: 320\r\nx-ms-date:\ + \ Thu, 17 Jun 2021 16:53:06 GMT\r\nDate: Thu, 17 Jun 2021 16:53:06 GMT\r\n\r\ + \n{\"PartitionKey\": \"003\", \"PartitionKey@odata.type\": \"Edm.String\", \"\ + RowKey\": \"batch_all_operations_together-4\", \"RowKey@odata.type\": \"Edm.String\"\ + , \"test\": true, \"test2\": \"value\", \"test2@odata.type\": \"Edm.String\"\ + , \"test3\": 10, \"test4\": 1234567890, \"test5\": \"2021-06-17T20:53:06.408852Z\"\ + , \"test5@odata.type\": \"Edm.DateTime\"}\r\n--changeset_d36dcd90-74f2-4f99-aa86-ef599c2aa069\r\ + \nContent-Type: application/http\r\nContent-Transfer-Encoding: binary\r\nContent-ID:\ + \ 5\r\n\r\nPUT https://seankaneprim.table.core.windows.net/uttable3e36157d(PartitionKey='003',RowKey='batch_all_operations_together-5')\ + \ HTTP/1.1\r\nx-ms-version: 2019-02-02\r\nDataServiceVersion: 3.0\r\nContent-Type:\ + \ application/json\r\nAccept: application/json\r\nContent-Length: 320\r\nx-ms-date:\ + \ Thu, 17 Jun 2021 16:53:06 GMT\r\nDate: Thu, 17 Jun 2021 16:53:06 GMT\r\n\r\ + \n{\"PartitionKey\": \"003\", \"PartitionKey@odata.type\": \"Edm.String\", \"\ + RowKey\": \"batch_all_operations_together-5\", \"RowKey@odata.type\": \"Edm.String\"\ + , \"test\": true, \"test2\": \"value\", \"test2@odata.type\": \"Edm.String\"\ + , \"test3\": 10, \"test4\": 1234567890, \"test5\": \"2021-06-17T20:53:06.408852Z\"\ + , \"test5@odata.type\": \"Edm.DateTime\"}\r\n--changeset_d36dcd90-74f2-4f99-aa86-ef599c2aa069--\r\ + \n\r\n--batch_03580d72-de55-462e-9773-08d34495f4cb--\r\n" + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '4749' + Content-Type: + - multipart/mixed; boundary=batch_03580d72-de55-462e-9773-08d34495f4cb + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 16:53:07 GMT + MaxDataServiceVersion: + - 3.0;NetFx + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 16:53:07 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://fake_table_account.table.core.windows.net/$batch + response: + body: + string: "--batchresponse_6d9e9a7d-771e-44fc-a54d-0bb3e38e22f5\r\nContent-Type:\ + \ multipart/mixed; boundary=changesetresponse_fa4be32b-0e1c-4094-b141-c8996af90132\r\ + \n\r\n--changesetresponse_fa4be32b-0e1c-4094-b141-c8996af90132\r\nContent-Type:\ + \ application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204\ + \ No Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\ + \nPreference-Applied: return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation:\ + \ https://seankaneprim.table.core.windows.net/uttable3e36157d(PartitionKey='003',RowKey='batch_all_operations_together')\r\ + \nDataServiceId: https://seankaneprim.table.core.windows.net/uttable3e36157d(PartitionKey='003',RowKey='batch_all_operations_together')\r\ + \nETag: W/\"datetime'2021-06-17T16%3A53%3A07.9677661Z'\"\r\n\r\n\r\n--changesetresponse_fa4be32b-0e1c-4094-b141-c8996af90132\r\ + \nContent-Type: application/http\r\nContent-Transfer-Encoding: binary\r\n\r\ + \nHTTP/1.1 204 No Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control:\ + \ no-cache\r\nDataServiceVersion: 1.0;\r\n\r\n\r\n--changesetresponse_fa4be32b-0e1c-4094-b141-c8996af90132\r\ + \nContent-Type: application/http\r\nContent-Transfer-Encoding: binary\r\n\r\ + \nHTTP/1.1 204 No Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control:\ + \ no-cache\r\nDataServiceVersion: 1.0;\r\nETag: W/\"datetime'2021-06-17T16%3A53%3A07.9691315Z'\"\ + \r\n\r\n\r\n--changesetresponse_fa4be32b-0e1c-4094-b141-c8996af90132\r\nContent-Type:\ + \ application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204\ + \ No Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\ + \nDataServiceVersion: 1.0;\r\nETag: W/\"datetime'2021-06-17T16%3A53%3A07.9691315Z'\"\ + \r\n\r\n\r\n--changesetresponse_fa4be32b-0e1c-4094-b141-c8996af90132\r\nContent-Type:\ + \ application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204\ + \ No Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\ + \nDataServiceVersion: 1.0;\r\nETag: W/\"datetime'2021-06-17T16%3A53%3A07.9691315Z'\"\ + \r\n\r\n\r\n--changesetresponse_fa4be32b-0e1c-4094-b141-c8996af90132\r\nContent-Type:\ + \ application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204\ + \ No Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\ + \nDataServiceVersion: 1.0;\r\nETag: W/\"datetime'2021-06-17T16%3A53%3A07.9691315Z'\"\ + \r\n\r\n\r\n--changesetresponse_fa4be32b-0e1c-4094-b141-c8996af90132--\r\n\ + --batchresponse_6d9e9a7d-771e-44fc-a54d-0bb3e38e22f5--\r\n" + headers: + cache-control: + - no-cache + content-type: + - multipart/mixed; boundary=batchresponse_6d9e9a7d-771e-44fc-a54d-0bb3e38e22f5 + date: + - Thu, 17 Jun 2021 16:53:07 GMT + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 16:53:07 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 16:53:07 GMT + x-ms-version: + - '2019-02-02' + method: GET + uri: https://fake_table_account.table.core.windows.net/uttable3e36157d()?$filter=PartitionKey%20eq%20%27003%27 + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#uttable3e36157d","value":[{"odata.etag":"W/\"datetime''2021-06-17T16%3A53%3A07.9677661Z''\"","PartitionKey":"003","RowKey":"batch_all_operations_together","Timestamp":"2021-06-17T16:53:07.9677661Z","test":true,"test2":"value","test3":3,"test4":1234567890,"test5@odata.type":"Edm.DateTime","test5":"2021-06-17T20:53:06.408852Z"},{"odata.etag":"W/\"datetime''2021-06-17T16%3A53%3A07.9691315Z''\"","PartitionKey":"003","RowKey":"batch_all_operations_together-2","Timestamp":"2021-06-17T16:53:07.9691315Z","test":true,"test2":"value","test3":10,"test4":1234567890,"test5@odata.type":"Edm.DateTime","test5":"2021-06-17T20:53:06.408852Z"},{"odata.etag":"W/\"datetime''2021-06-17T16%3A53%3A07.9691315Z''\"","PartitionKey":"003","RowKey":"batch_all_operations_together-3","Timestamp":"2021-06-17T16:53:07.9691315Z","test":true,"test2":"value","test3":100,"test4":1234567890,"test5@odata.type":"Edm.DateTime","test5":"2021-06-17T20:53:06.408852Z"},{"odata.etag":"W/\"datetime''2021-06-17T16%3A53%3A07.9691315Z''\"","PartitionKey":"003","RowKey":"batch_all_operations_together-4","Timestamp":"2021-06-17T16:53:07.9691315Z","test":true,"test2":"value","test3":10,"test4":1234567890,"test5@odata.type":"Edm.DateTime","test5":"2021-06-17T20:53:06.408852Z"},{"odata.etag":"W/\"datetime''2021-06-17T16%3A53%3A07.9691315Z''\"","PartitionKey":"003","RowKey":"batch_all_operations_together-5","Timestamp":"2021-06-17T16:53:07.9691315Z","test":true,"test2":"value","test3":10,"test4":1234567890,"test5@odata.type":"Edm.DateTime","test5":"2021-06-17T20:53:06.408852Z"}]}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Thu, 17 Jun 2021 16:53:08 GMT + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 16:53:07 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 16:53:07 GMT + x-ms-version: + - '2019-02-02' + method: GET + uri: https://fake_table_account.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#Tables","value":[{"TableName":"uttable3e36157d"}]}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Thu, 17 Jun 2021 16:53:08 GMT + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + Date: + - Thu, 17 Jun 2021 16:53:07 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 16:53:07 GMT + x-ms-version: + - '2019-02-02' + method: DELETE + uri: https://fake_table_account.table.core.windows.net/Tables('uttable3e36157d') + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Thu, 17 Jun 2021 16:53:08 GMT + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 204 + message: No Content +version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_aad.test_aad_create_table.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_aad.test_aad_create_table.yaml new file mode 100644 index 000000000000..0e5366f79664 --- /dev/null +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_aad.test_aad_create_table.yaml @@ -0,0 +1,217 @@ +interactions: +- request: + body: '{"TableName": "pytablesyncaad0e5a"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '35' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 16:53:17 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 16:53:17 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://fake_table_account.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#Tables/@Element","TableName":"pytablesyncaad0e5a"}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Thu, 17 Jun 2021 16:53:19 GMT + location: + - https://fake_table_account.table.core.windows.net/Tables('pytablesyncaad0e5a') + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 16:53:19 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 16:53:19 GMT + x-ms-version: + - '2019-02-02' + method: GET + uri: https://fake_table_account.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#Tables","value":[{"TableName":"pytablesyncaad0e5a"}]}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Thu, 17 Jun 2021 16:53:19 GMT + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + Date: + - Thu, 17 Jun 2021 16:53:19 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 16:53:19 GMT + x-ms-version: + - '2019-02-02' + method: DELETE + uri: https://fake_table_account.table.core.windows.net/Tables('pytablesyncaad0e5a') + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Thu, 17 Jun 2021 16:53:19 GMT + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 204 + message: No Content +- request: + body: null + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 16:53:19 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 16:53:19 GMT + x-ms-version: + - '2019-02-02' + method: GET + uri: https://fake_table_account.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#Tables","value":[]}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Thu, 17 Jun 2021 16:53:19 GMT + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + Date: + - Thu, 17 Jun 2021 16:53:19 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 16:53:19 GMT + x-ms-version: + - '2019-02-02' + method: DELETE + uri: https://fake_table_account.table.core.windows.net/Tables('pytablesyncaad0e5a') + response: + body: + string: '{"odata.error":{"code":"ResourceNotFound","message":{"lang":"en-US","value":"The + specified resource does not exist.\nRequestId:b55256a6-f002-008a-6b99-63b3c4000000\nTime:2021-06-17T16:53:20.6526501Z"}}}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Thu, 17 Jun 2021 16:53:20 GMT + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 404 + message: Not Found +version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_aad.test_aad_create_table_tc.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_aad.test_aad_create_table_tc.yaml new file mode 100644 index 000000000000..5e0369b3fecd --- /dev/null +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_aad.test_aad_create_table_tc.yaml @@ -0,0 +1,217 @@ +interactions: +- request: + body: '{"TableName": "pytablesync38230f90"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '36' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 16:53:19 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 16:53:19 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://fake_table_account.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#Tables/@Element","TableName":"pytablesync38230f90"}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Thu, 17 Jun 2021 16:53:21 GMT + location: + - https://fake_table_account.table.core.windows.net/Tables('pytablesync38230f90') + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 16:53:21 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 16:53:21 GMT + x-ms-version: + - '2019-02-02' + method: GET + uri: https://fake_table_account.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#Tables","value":[{"TableName":"pytablesync38230f90"}]}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Thu, 17 Jun 2021 16:53:23 GMT + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + Date: + - Thu, 17 Jun 2021 16:53:23 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 16:53:23 GMT + x-ms-version: + - '2019-02-02' + method: DELETE + uri: https://fake_table_account.table.core.windows.net/Tables('pytablesync38230f90') + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Thu, 17 Jun 2021 16:53:23 GMT + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 204 + message: No Content +- request: + body: null + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 16:53:23 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 16:53:23 GMT + x-ms-version: + - '2019-02-02' + method: GET + uri: https://fake_table_account.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#Tables","value":[]}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Thu, 17 Jun 2021 16:53:23 GMT + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + Date: + - Thu, 17 Jun 2021 16:53:23 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 16:53:23 GMT + x-ms-version: + - '2019-02-02' + method: DELETE + uri: https://fake_table_account.table.core.windows.net/Tables('pytablesync38230f90') + response: + body: + string: '{"odata.error":{"code":"ResourceNotFound","message":{"lang":"en-US","value":"The + specified resource does not exist.\nRequestId:f3a2b694-f002-0051-7c99-6375f9000000\nTime:2021-06-17T16:53:24.4928295Z"}}}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Thu, 17 Jun 2021 16:53:24 GMT + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 404 + message: Not Found +version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_aad.test_aad_delete_entities.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_aad.test_aad_delete_entities.yaml new file mode 100644 index 000000000000..84f7749084fb --- /dev/null +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_aad.test_aad_delete_entities.yaml @@ -0,0 +1,277 @@ +interactions: +- request: + body: '{"TableName": "uttable38930fb6"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '32' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 16:53:23 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 16:53:23 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://fake_table_account.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#Tables/@Element","TableName":"uttable38930fb6"}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Thu, 17 Jun 2021 16:53:26 GMT + location: + - https://fake_table_account.table.core.windows.net/Tables('uttable38930fb6') + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 201 + message: Created +- request: + body: '{"PartitionKey": "pk38930fb6", "PartitionKey@odata.type": "Edm.String", + "RowKey": "rk38930fb6", "RowKey@odata.type": "Edm.String", "age": 39, "sex": + "male", "sex@odata.type": "Edm.String", "married": true, "deceased": false, + "ratio": 3.1, "ratio@odata.type": "Edm.Double", "evenratio": 3.0, "evenratio@odata.type": + "Edm.Double", "double": 5, "double@odata.type": "Edm.Double", "large": 933311100, + "Birthday": "1973-10-04T00:00:00.000000Z", "Birthday@odata.type": "Edm.DateTime", + "birthday": "1970-10-04T00:00:00.000000Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '711' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 16:53:25 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 16:53:25 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://fake_table_account.table.core.windows.net/uttable38930fb6 + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#uttable38930fb6/@Element","odata.etag":"W/\"datetime''2021-06-17T16%3A53%3A26.4143853Z''\"","PartitionKey":"pk38930fb6","RowKey":"rk38930fb6","Timestamp":"2021-06-17T16:53:26.4143853Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"double":5.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Thu, 17 Jun 2021 16:53:26 GMT + etag: + - W/"datetime'2021-06-17T16%3A53%3A26.4143853Z'" + location: + - https://fake_table_account.table.core.windows.net/uttable38930fb6(PartitionKey='pk38930fb6',RowKey='rk38930fb6') + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 16:53:25 GMT + If-Match: + - '*' + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 16:53:25 GMT + x-ms-version: + - '2019-02-02' + method: DELETE + uri: https://fake_table_account.table.core.windows.net/uttable38930fb6(PartitionKey='pk38930fb6',RowKey='rk38930fb6') + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Thu, 17 Jun 2021 16:53:26 GMT + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 204 + message: No Content +- request: + body: null + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 16:53:25 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 16:53:25 GMT + x-ms-version: + - '2019-02-02' + method: GET + uri: https://fake_table_account.table.core.windows.net/uttable38930fb6(PartitionKey='pk38930fb6',RowKey='rk38930fb6') + response: + body: + string: '{"odata.error":{"code":"ResourceNotFound","message":{"lang":"en-US","value":"The + specified resource does not exist.\nRequestId:5e901afc-a002-003e-6799-637f0a000000\nTime:2021-06-17T16:53:26.7646344Z"}}}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Thu, 17 Jun 2021 16:53:26 GMT + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 404 + message: Not Found +- request: + body: null + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 16:53:25 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 16:53:25 GMT + x-ms-version: + - '2019-02-02' + method: GET + uri: https://fake_table_account.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#Tables","value":[{"TableName":"uttable38930fb6"}]}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Thu, 17 Jun 2021 16:53:26 GMT + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + Date: + - Thu, 17 Jun 2021 16:53:26 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 16:53:26 GMT + x-ms-version: + - '2019-02-02' + method: DELETE + uri: https://fake_table_account.table.core.windows.net/Tables('uttable38930fb6') + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Thu, 17 Jun 2021 16:53:27 GMT + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 204 + message: No Content +version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_aad.test_aad_insert_entity_dictionary.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_aad.test_aad_insert_entity_dictionary.yaml new file mode 100644 index 000000000000..d2e8236c3175 --- /dev/null +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_aad.test_aad_insert_entity_dictionary.yaml @@ -0,0 +1,190 @@ +interactions: +- request: + body: '{"TableName": "uttabledb8513a5"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '32' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 16:53:36 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 16:53:36 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://fake_table_account.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#Tables/@Element","TableName":"uttabledb8513a5"}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Thu, 17 Jun 2021 16:53:38 GMT + location: + - https://fake_table_account.table.core.windows.net/Tables('uttabledb8513a5') + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 201 + message: Created +- request: + body: '{"PartitionKey": "pkdb8513a5", "PartitionKey@odata.type": "Edm.String", + "RowKey": "rkdb8513a5", "RowKey@odata.type": "Edm.String", "age": 39, "sex": + "male", "sex@odata.type": "Edm.String", "married": true, "deceased": false, + "ratio": 3.1, "ratio@odata.type": "Edm.Double", "evenratio": 3.0, "evenratio@odata.type": + "Edm.Double", "double": 5, "double@odata.type": "Edm.Double", "large": 933311100, + "Birthday": "1973-10-04T00:00:00.000000Z", "Birthday@odata.type": "Edm.DateTime", + "birthday": "1970-10-04T00:00:00.000000Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '711' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 16:53:37 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 16:53:37 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://fake_table_account.table.core.windows.net/uttabledb8513a5 + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#uttabledb8513a5/@Element","odata.etag":"W/\"datetime''2021-06-17T16%3A53%3A38.8940602Z''\"","PartitionKey":"pkdb8513a5","RowKey":"rkdb8513a5","Timestamp":"2021-06-17T16:53:38.8940602Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"double":5.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Thu, 17 Jun 2021 16:53:38 GMT + etag: + - W/"datetime'2021-06-17T16%3A53%3A38.8940602Z'" + location: + - https://fake_table_account.table.core.windows.net/uttabledb8513a5(PartitionKey='pkdb8513a5',RowKey='rkdb8513a5') + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 16:53:38 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 16:53:38 GMT + x-ms-version: + - '2019-02-02' + method: GET + uri: https://fake_table_account.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#Tables","value":[{"TableName":"uttabledb8513a5"}]}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Thu, 17 Jun 2021 16:53:38 GMT + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + Date: + - Thu, 17 Jun 2021 16:53:38 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 16:53:38 GMT + x-ms-version: + - '2019-02-02' + method: DELETE + uri: https://fake_table_account.table.core.windows.net/Tables('uttabledb8513a5') + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Thu, 17 Jun 2021 16:53:38 GMT + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 204 + message: No Content +version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_aad.test_aad_list_entities.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_aad.test_aad_list_entities.yaml new file mode 100644 index 000000000000..aa38f8f75be9 --- /dev/null +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_aad.test_aad_list_entities.yaml @@ -0,0 +1,378 @@ +interactions: +- request: + body: '{"TableName": "uttable1aee0eff"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '32' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 16:53:48 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 16:53:48 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://fake_table_account.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#Tables/@Element","TableName":"uttable1aee0eff"}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Thu, 17 Jun 2021 16:53:52 GMT + location: + - https://fake_table_account.table.core.windows.net/Tables('uttable1aee0eff') + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 201 + message: Created +- request: + body: '{"TableName": "querytable1aee0eff"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '35' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 16:53:51 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 16:53:51 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://fake_table_account.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#Tables/@Element","TableName":"querytable1aee0eff"}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Thu, 17 Jun 2021 16:53:52 GMT + location: + - https://fake_table_account.table.core.windows.net/Tables('querytable1aee0eff') + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 201 + message: Created +- request: + body: '{"PartitionKey": "pk1aee0eff", "PartitionKey@odata.type": "Edm.String", + "RowKey": "rk1aee0eff1", "RowKey@odata.type": "Edm.String", "age": 39, "sex": + "male", "sex@odata.type": "Edm.String", "married": true, "deceased": false, + "ratio": 3.1, "ratio@odata.type": "Edm.Double", "evenratio": 3.0, "evenratio@odata.type": + "Edm.Double", "double": 5, "double@odata.type": "Edm.Double", "large": 933311100, + "Birthday": "1973-10-04T00:00:00.000000Z", "Birthday@odata.type": "Edm.DateTime", + "birthday": "1970-10-04T00:00:00.000000Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '712' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 16:53:51 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 16:53:51 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://fake_table_account.table.core.windows.net/querytable1aee0eff + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#querytable1aee0eff/@Element","odata.etag":"W/\"datetime''2021-06-17T16%3A53%3A52.7872532Z''\"","PartitionKey":"pk1aee0eff","RowKey":"rk1aee0eff1","Timestamp":"2021-06-17T16:53:52.7872532Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"double":5.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Thu, 17 Jun 2021 16:53:52 GMT + etag: + - W/"datetime'2021-06-17T16%3A53%3A52.7872532Z'" + location: + - https://fake_table_account.table.core.windows.net/querytable1aee0eff(PartitionKey='pk1aee0eff',RowKey='rk1aee0eff1') + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 201 + message: Created +- request: + body: '{"PartitionKey": "pk1aee0eff", "PartitionKey@odata.type": "Edm.String", + "RowKey": "rk1aee0eff12", "RowKey@odata.type": "Edm.String", "age": 39, "sex": + "male", "sex@odata.type": "Edm.String", "married": true, "deceased": false, + "ratio": 3.1, "ratio@odata.type": "Edm.Double", "evenratio": 3.0, "evenratio@odata.type": + "Edm.Double", "double": 5, "double@odata.type": "Edm.Double", "large": 933311100, + "Birthday": "1973-10-04T00:00:00.000000Z", "Birthday@odata.type": "Edm.DateTime", + "birthday": "1970-10-04T00:00:00.000000Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '713' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 16:53:52 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 16:53:52 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://fake_table_account.table.core.windows.net/querytable1aee0eff + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#querytable1aee0eff/@Element","odata.etag":"W/\"datetime''2021-06-17T16%3A53%3A53.0374309Z''\"","PartitionKey":"pk1aee0eff","RowKey":"rk1aee0eff12","Timestamp":"2021-06-17T16:53:53.0374309Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"double":5.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Thu, 17 Jun 2021 16:53:52 GMT + etag: + - W/"datetime'2021-06-17T16%3A53%3A53.0374309Z'" + location: + - https://fake_table_account.table.core.windows.net/querytable1aee0eff(PartitionKey='pk1aee0eff',RowKey='rk1aee0eff12') + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 16:53:52 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 16:53:52 GMT + x-ms-version: + - '2019-02-02' + method: GET + uri: https://fake_table_account.table.core.windows.net/querytable1aee0eff() + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#querytable1aee0eff","value":[{"odata.etag":"W/\"datetime''2021-06-17T16%3A53%3A52.7872532Z''\"","PartitionKey":"pk1aee0eff","RowKey":"rk1aee0eff1","Timestamp":"2021-06-17T16:53:52.7872532Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"double":5.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"},{"odata.etag":"W/\"datetime''2021-06-17T16%3A53%3A53.0374309Z''\"","PartitionKey":"pk1aee0eff","RowKey":"rk1aee0eff12","Timestamp":"2021-06-17T16:53:53.0374309Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"double":5.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}]}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Thu, 17 Jun 2021 16:53:53 GMT + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 16:53:52 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 16:53:52 GMT + x-ms-version: + - '2019-02-02' + method: GET + uri: https://fake_table_account.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#Tables","value":[{"TableName":"querytable1aee0eff"},{"TableName":"uttable1aee0eff"}]}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Thu, 17 Jun 2021 16:53:53 GMT + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + Date: + - Thu, 17 Jun 2021 16:53:52 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 16:53:52 GMT + x-ms-version: + - '2019-02-02' + method: DELETE + uri: https://fake_table_account.table.core.windows.net/Tables('querytable1aee0eff') + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Thu, 17 Jun 2021 16:53:53 GMT + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 204 + message: No Content +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + Date: + - Thu, 17 Jun 2021 16:53:52 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 16:53:52 GMT + x-ms-version: + - '2019-02-02' + method: DELETE + uri: https://fake_table_account.table.core.windows.net/Tables('uttable1aee0eff') + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Thu, 17 Jun 2021 16:53:53 GMT + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 204 + message: No Content +version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_aad.test_aad_query_list_tables.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_aad.test_aad_query_list_tables.yaml new file mode 100644 index 000000000000..57ab929d3f9d --- /dev/null +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_aad.test_aad_query_list_tables.yaml @@ -0,0 +1,480 @@ +interactions: +- request: + body: '{"TableName": "table15bb410aa"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '31' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 16:54:03 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 16:54:03 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://fake_table_account.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#Tables/@Element","TableName":"table15bb410aa"}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Thu, 17 Jun 2021 16:54:04 GMT + location: + - https://fake_table_account.table.core.windows.net/Tables('table15bb410aa') + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 201 + message: Created +- request: + body: '{"TableName": "table25bb410aa"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '31' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 16:54:04 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 16:54:04 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://fake_table_account.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#Tables/@Element","TableName":"table25bb410aa"}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Thu, 17 Jun 2021 16:54:04 GMT + location: + - https://fake_table_account.table.core.windows.net/Tables('table25bb410aa') + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 201 + message: Created +- request: + body: '{"TableName": "table35bb410aa"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '31' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 16:54:04 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 16:54:04 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://fake_table_account.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#Tables/@Element","TableName":"table35bb410aa"}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Thu, 17 Jun 2021 16:54:05 GMT + location: + - https://fake_table_account.table.core.windows.net/Tables('table35bb410aa') + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 201 + message: Created +- request: + body: '{"TableName": "table45bb410aa"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '31' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 16:54:04 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 16:54:04 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://fake_table_account.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#Tables/@Element","TableName":"table45bb410aa"}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Thu, 17 Jun 2021 16:54:05 GMT + location: + - https://fake_table_account.table.core.windows.net/Tables('table45bb410aa') + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 16:54:04 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 16:54:04 GMT + x-ms-version: + - '2019-02-02' + method: GET + uri: https://fake_table_account.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#Tables","value":[{"TableName":"table15bb410aa"},{"TableName":"table25bb410aa"},{"TableName":"table35bb410aa"},{"TableName":"table45bb410aa"}]}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Thu, 17 Jun 2021 16:54:05 GMT + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 16:54:05 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 16:54:05 GMT + x-ms-version: + - '2019-02-02' + method: GET + uri: https://fake_table_account.table.core.windows.net/Tables?$filter=TableName%20eq%20%27table25bb410aa%27 + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#Tables","value":[{"TableName":"table25bb410aa"}]}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Thu, 17 Jun 2021 16:54:05 GMT + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 16:54:05 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 16:54:05 GMT + x-ms-version: + - '2019-02-02' + method: GET + uri: https://fake_table_account.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#Tables","value":[{"TableName":"table15bb410aa"},{"TableName":"table25bb410aa"},{"TableName":"table35bb410aa"},{"TableName":"table45bb410aa"}]}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Thu, 17 Jun 2021 16:54:05 GMT + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + Date: + - Thu, 17 Jun 2021 16:54:05 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 16:54:05 GMT + x-ms-version: + - '2019-02-02' + method: DELETE + uri: https://fake_table_account.table.core.windows.net/Tables('table15bb410aa') + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Thu, 17 Jun 2021 16:54:05 GMT + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 204 + message: No Content +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + Date: + - Thu, 17 Jun 2021 16:54:05 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 16:54:05 GMT + x-ms-version: + - '2019-02-02' + method: DELETE + uri: https://fake_table_account.table.core.windows.net/Tables('table25bb410aa') + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Thu, 17 Jun 2021 16:54:05 GMT + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 204 + message: No Content +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + Date: + - Thu, 17 Jun 2021 16:54:05 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 16:54:05 GMT + x-ms-version: + - '2019-02-02' + method: DELETE + uri: https://fake_table_account.table.core.windows.net/Tables('table35bb410aa') + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Thu, 17 Jun 2021 16:54:06 GMT + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 204 + message: No Content +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + Date: + - Thu, 17 Jun 2021 16:54:05 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 16:54:05 GMT + x-ms-version: + - '2019-02-02' + method: DELETE + uri: https://fake_table_account.table.core.windows.net/Tables('table45bb410aa') + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Thu, 17 Jun 2021 16:54:06 GMT + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 204 + message: No Content +version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_aad.test_aad_query_user_filter.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_aad.test_aad_query_user_filter.yaml new file mode 100644 index 000000000000..463e033f20ed --- /dev/null +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_aad.test_aad_query_user_filter.yaml @@ -0,0 +1,290 @@ +interactions: +- request: + body: '{"TableName": "uttable5c0010b8"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '32' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 16:54:06 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 16:54:06 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://fake_table_account.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#Tables/@Element","TableName":"uttable5c0010b8"}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Thu, 17 Jun 2021 16:54:08 GMT + location: + - https://fake_table_account.table.core.windows.net/Tables('uttable5c0010b8') + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 201 + message: Created +- request: + body: '{"PartitionKey": "pk5c0010b8", "PartitionKey@odata.type": "Edm.String", + "RowKey": "rk5c0010b8", "RowKey@odata.type": "Edm.String", "age": 39, "sex": + "male", "sex@odata.type": "Edm.String", "married": true, "deceased": false, + "ratio": 3.1, "ratio@odata.type": "Edm.Double", "evenratio": 3.0, "evenratio@odata.type": + "Edm.Double", "double": 5, "double@odata.type": "Edm.Double", "large": 933311100, + "Birthday": "1973-10-04T00:00:00.000000Z", "Birthday@odata.type": "Edm.DateTime", + "birthday": "1970-10-04T00:00:00.000000Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '711' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 16:54:08 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 16:54:08 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://fake_table_account.table.core.windows.net/uttable5c0010b8 + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#uttable5c0010b8/@Element","odata.etag":"W/\"datetime''2021-06-17T16%3A54%3A09.2782954Z''\"","PartitionKey":"pk5c0010b8","RowKey":"rk5c0010b8","Timestamp":"2021-06-17T16:54:09.2782954Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"double":5.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Thu, 17 Jun 2021 16:54:08 GMT + etag: + - W/"datetime'2021-06-17T16%3A54%3A09.2782954Z'" + location: + - https://fake_table_account.table.core.windows.net/uttable5c0010b8(PartitionKey='pk5c0010b8',RowKey='rk5c0010b8') + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 201 + message: Created +- request: + body: '{"PartitionKey": "pk5c0010b81", "PartitionKey@odata.type": "Edm.String", + "RowKey": "rk5c0010b81", "RowKey@odata.type": "Edm.String", "age": 49, "sex": + "female", "sex@odata.type": "Edm.String", "married": false, "deceased": true, + "ratio": 5.2, "ratio@odata.type": "Edm.Double", "evenratio": 6.0, "evenratio@odata.type": + "Edm.Double", "large": 39999011, "Birthday": "1993-04-01T00:00:00.000000Z", + "Birthday@odata.type": "Edm.DateTime", "birthday": "1990-04-01T00:00:00.000000Z", + "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5LWJpbmFyeQ==", "binary@odata.type": + "Edm.Binary", "other": 40, "clsid": "c8da6455-213e-42d9-9b79-3f9149a57833", + "clsid@odata.type": "Edm.Guid"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '678' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 16:54:08 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 16:54:08 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://fake_table_account.table.core.windows.net/uttable5c0010b8 + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#uttable5c0010b8/@Element","odata.etag":"W/\"datetime''2021-06-17T16%3A54%3A09.4594239Z''\"","PartitionKey":"pk5c0010b81","RowKey":"rk5c0010b81","Timestamp":"2021-06-17T16:54:09.4594239Z","age":49,"sex":"female","married":false,"deceased":true,"ratio":5.2,"evenratio":6.0,"large":39999011,"Birthday@odata.type":"Edm.DateTime","Birthday":"1993-04-01T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1990-04-01T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5LWJpbmFyeQ==","other":40,"clsid@odata.type":"Edm.Guid","clsid":"c8da6455-213e-42d9-9b79-3f9149a57833"}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Thu, 17 Jun 2021 16:54:09 GMT + etag: + - W/"datetime'2021-06-17T16%3A54%3A09.4594239Z'" + location: + - https://fake_table_account.table.core.windows.net/uttable5c0010b8(PartitionKey='pk5c0010b81',RowKey='rk5c0010b81') + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 16:54:08 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 16:54:08 GMT + x-ms-version: + - '2019-02-02' + method: GET + uri: https://fake_table_account.table.core.windows.net/uttable5c0010b8()?$filter=married%20eq%20true + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#uttable5c0010b8","value":[{"odata.etag":"W/\"datetime''2021-06-17T16%3A54%3A09.2782954Z''\"","PartitionKey":"pk5c0010b8","RowKey":"rk5c0010b8","Timestamp":"2021-06-17T16:54:09.2782954Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"double":5.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}]}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Thu, 17 Jun 2021 16:54:09 GMT + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 16:54:08 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 16:54:08 GMT + x-ms-version: + - '2019-02-02' + method: GET + uri: https://fake_table_account.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#Tables","value":[{"TableName":"uttable5c0010b8"}]}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Thu, 17 Jun 2021 16:54:09 GMT + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + Date: + - Thu, 17 Jun 2021 16:54:09 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 16:54:09 GMT + x-ms-version: + - '2019-02-02' + method: DELETE + uri: https://fake_table_account.table.core.windows.net/Tables('uttable5c0010b8') + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Thu, 17 Jun 2021 16:54:09 GMT + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 204 + message: No Content +version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_aad.test_aad_service_properties.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_aad.test_aad_service_properties.yaml new file mode 100644 index 000000000000..736bfba1748a --- /dev/null +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_aad.test_aad_service_properties.yaml @@ -0,0 +1,281 @@ +interactions: +- request: + body: '{"TableName": "pytablesync6c2f111c"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '36' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 16:54:19 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 16:54:19 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://fake_table_account.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#Tables/@Element","TableName":"pytablesync6c2f111c"}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Thu, 17 Jun 2021 16:54:21 GMT + location: + - https://fake_table_account.table.core.windows.net/Tables('pytablesync6c2f111c') + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Date: + - Thu, 17 Jun 2021 16:54:20 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 16:54:20 GMT + x-ms-version: + - '2019-02-02' + method: GET + uri: https://fake_table_account.table.core.windows.net/?restype=service&comp=properties + response: + body: + string: "\uFEFF1.0falsetruefalsefalse1.0truetruetrue71.0truetruetrue5" + headers: + content-type: + - application/xml + date: + - Thu, 17 Jun 2021 16:54:21 GMT + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-ms-version: + - '2019-02-02' + status: + code: 200 + message: OK +- request: + body: ' + + 1.0falsefalsetruefalse' + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '251' + Content-Type: + - application/xml + Date: + - Thu, 17 Jun 2021 16:54:21 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 16:54:21 GMT + x-ms-version: + - '2019-02-02' + method: PUT + uri: https://fake_table_account.table.core.windows.net/?restype=service&comp=properties + response: + body: + string: '' + headers: + date: + - Thu, 17 Jun 2021 16:54:21 GMT + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-ms-version: + - '2019-02-02' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Date: + - Thu, 17 Jun 2021 16:54:21 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 16:54:21 GMT + x-ms-version: + - '2019-02-02' + method: GET + uri: https://fake_table_account.table.core.windows.net/?restype=service&comp=properties + response: + body: + string: "\uFEFF1.0falsetruefalsefalse1.0truetruetrue71.0truetruetrue5" + headers: + content-type: + - application/xml + date: + - Thu, 17 Jun 2021 16:54:22 GMT + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-ms-version: + - '2019-02-02' + status: + code: 200 + message: OK +- request: + body: ' + + 1.0truetruetrue5' + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '271' + Content-Type: + - application/xml + Date: + - Thu, 17 Jun 2021 16:54:21 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 16:54:21 GMT + x-ms-version: + - '2019-02-02' + method: PUT + uri: https://fake_table_account.table.core.windows.net/?restype=service&comp=properties + response: + body: + string: '' + headers: + date: + - Thu, 17 Jun 2021 16:54:22 GMT + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-ms-version: + - '2019-02-02' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Date: + - Thu, 17 Jun 2021 16:54:21 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 16:54:21 GMT + x-ms-version: + - '2019-02-02' + method: GET + uri: https://fake_table_account.table.core.windows.net/?restype=service&comp=properties + response: + body: + string: "\uFEFF1.0falsetruefalsefalse1.0truetruetrue71.0truetruetrue5" + headers: + content-type: + - application/xml + date: + - Thu, 17 Jun 2021 16:54:22 GMT + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-ms-version: + - '2019-02-02' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + Date: + - Thu, 17 Jun 2021 16:54:21 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 16:54:21 GMT + x-ms-version: + - '2019-02-02' + method: DELETE + uri: https://fake_table_account.table.core.windows.net/Tables('pytablesync6c2f111c') + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Thu, 17 Jun 2021 16:54:22 GMT + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 204 + message: No Content +version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_aad.test_aad_table_service_stats.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_aad.test_aad_table_service_stats.yaml new file mode 100644 index 000000000000..b70f3f3e0512 --- /dev/null +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_aad.test_aad_table_service_stats.yaml @@ -0,0 +1,39 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Date: + - Thu, 17 Jun 2021 16:54:22 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 16:54:22 GMT + x-ms-version: + - '2019-02-02' + method: GET + uri: https://fake_table_account-secondary.table.core.windows.net/?restype=service&comp=stats + response: + body: + string: "\uFEFFliveThu,\ + \ 17 Jun 2021 16:51:26 GMT" + headers: + content-type: + - application/xml + date: + - Thu, 17 Jun 2021 16:54:23 GMT + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-ms-version: + - '2019-02-02' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_aad.test_create_table_aad.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_aad.test_create_table_aad.yaml new file mode 100644 index 000000000000..618a09ee8b1c --- /dev/null +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_aad.test_create_table_aad.yaml @@ -0,0 +1,217 @@ +interactions: +- request: + body: '{"TableName": "pytablesyncbd40e5a"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '35' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 15:38:10 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 15:38:10 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://fake_table_account.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#Tables/@Element","TableName":"pytablesyncbd40e5a"}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Thu, 17 Jun 2021 15:38:12 GMT + location: + - https://fake_table_account.table.core.windows.net/Tables('pytablesyncbd40e5a') + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 15:38:11 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 15:38:11 GMT + x-ms-version: + - '2019-02-02' + method: GET + uri: https://fake_table_account.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#Tables","value":[{"TableName":"pytablesyncbd40e5a"}]}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Thu, 17 Jun 2021 15:38:12 GMT + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + Date: + - Thu, 17 Jun 2021 15:38:12 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 15:38:12 GMT + x-ms-version: + - '2019-02-02' + method: DELETE + uri: https://fake_table_account.table.core.windows.net/Tables('pytablesyncbd40e5a') + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Thu, 17 Jun 2021 15:38:12 GMT + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 204 + message: No Content +- request: + body: null + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 15:38:12 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 15:38:12 GMT + x-ms-version: + - '2019-02-02' + method: GET + uri: https://fake_table_account.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#Tables","value":[]}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Thu, 17 Jun 2021 15:38:12 GMT + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + Date: + - Thu, 17 Jun 2021 15:38:12 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 15:38:12 GMT + x-ms-version: + - '2019-02-02' + method: DELETE + uri: https://fake_table_account.table.core.windows.net/Tables('pytablesyncbd40e5a') + response: + body: + string: '{"odata.error":{"code":"ResourceNotFound","message":{"lang":"en-US","value":"The + specified resource does not exist.\nRequestId:ba917a3b-d002-00a6-6c8e-636d3a000000\nTime:2021-06-17T15:38:13.1431172Z"}}}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Thu, 17 Jun 2021 15:38:12 GMT + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 404 + message: Not Found +version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_aad.test_merge_entity.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_aad.test_merge_entity.yaml new file mode 100644 index 000000000000..1d9a23269593 --- /dev/null +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_aad.test_merge_entity.yaml @@ -0,0 +1,286 @@ +interactions: +- request: + body: '{"TableName": "uttabled5360d06"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '32' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 17:38:02 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 17:38:02 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://fake_table_account.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#Tables/@Element","TableName":"uttabled5360d06"}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Thu, 17 Jun 2021 17:38:04 GMT + location: + - https://fake_table_account.table.core.windows.net/Tables('uttabled5360d06') + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 201 + message: Created +- request: + body: '{"PartitionKey": "pkd5360d06", "PartitionKey@odata.type": "Edm.String", + "RowKey": "rkd5360d06", "RowKey@odata.type": "Edm.String", "age": 39, "sex": + "male", "sex@odata.type": "Edm.String", "married": true, "deceased": false, + "ratio": 3.1, "ratio@odata.type": "Edm.Double", "evenratio": 3.0, "evenratio@odata.type": + "Edm.Double", "double": 5, "double@odata.type": "Edm.Double", "large": 933311100, + "Birthday": "1973-10-04T00:00:00.000000Z", "Birthday@odata.type": "Edm.DateTime", + "birthday": "1970-10-04T00:00:00.000000Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '711' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 17:38:04 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 17:38:04 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://fake_table_account.table.core.windows.net/uttabled5360d06 + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#uttabled5360d06/@Element","odata.etag":"W/\"datetime''2021-06-17T17%3A38%3A05.4069206Z''\"","PartitionKey":"pkd5360d06","RowKey":"rkd5360d06","Timestamp":"2021-06-17T17:38:05.4069206Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"double":5.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Thu, 17 Jun 2021 17:38:05 GMT + etag: + - W/"datetime'2021-06-17T17%3A38%3A05.4069206Z'" + location: + - https://fake_table_account.table.core.windows.net/uttabled5360d06(PartitionKey='pkd5360d06',RowKey='rkd5360d06') + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 201 + message: Created +- request: + body: '{"PartitionKey": "pkd5360d06", "PartitionKey@odata.type": "Edm.String", + "RowKey": "rkd5360d06", "RowKey@odata.type": "Edm.String", "age": "abc", "age@odata.type": + "Edm.String", "sex": "female", "sex@odata.type": "Edm.String", "sign": "aquarius", + "sign@odata.type": "Edm.String", "birthday": "1991-10-04T00:00:00.000000Z", + "birthday@odata.type": "Edm.DateTime"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '360' + Content-Type: + - application/json + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 17:38:04 GMT + If-Match: + - '*' + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 17:38:04 GMT + x-ms-version: + - '2019-02-02' + method: PATCH + uri: https://fake_table_account.table.core.windows.net/uttabled5360d06(PartitionKey='pkd5360d06',RowKey='rkd5360d06') + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Thu, 17 Jun 2021 17:38:05 GMT + etag: + - W/"datetime'2021-06-17T17%3A38%3A05.6072567Z'" + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 204 + message: No Content +- request: + body: null + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 17:38:04 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 17:38:04 GMT + x-ms-version: + - '2019-02-02' + method: GET + uri: https://fake_table_account.table.core.windows.net/uttabled5360d06(PartitionKey='pkd5360d06',RowKey='rkd5360d06') + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#uttabled5360d06/@Element","odata.etag":"W/\"datetime''2021-06-17T17%3A38%3A05.6072567Z''\"","PartitionKey":"pkd5360d06","RowKey":"rkd5360d06","Timestamp":"2021-06-17T17:38:05.6072567Z","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","age":"abc","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","birthday@odata.type":"Edm.DateTime","birthday":"1991-10-04T00:00:00Z","clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833","deceased":false,"double":5.0,"evenratio":3.0,"large":933311100,"married":true,"other":20,"ratio":3.1,"sex":"female","sign":"aquarius"}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Thu, 17 Jun 2021 17:38:05 GMT + etag: + - W/"datetime'2021-06-17T17%3A38%3A05.6072567Z'" + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 17:38:05 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 17:38:05 GMT + x-ms-version: + - '2019-02-02' + method: GET + uri: https://fake_table_account.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#Tables","value":[{"TableName":"uttabled5360d06"}]}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Thu, 17 Jun 2021 17:38:05 GMT + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + Date: + - Thu, 17 Jun 2021 17:38:05 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 17:38:05 GMT + x-ms-version: + - '2019-02-02' + method: DELETE + uri: https://fake_table_account.table.core.windows.net/Tables('uttabled5360d06') + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Thu, 17 Jun 2021 17:38:05 GMT + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 204 + message: No Content +version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_aad.test_query_user_filter.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_aad.test_query_user_filter.yaml new file mode 100644 index 000000000000..a260456cedcb --- /dev/null +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_aad.test_query_user_filter.yaml @@ -0,0 +1,227 @@ +interactions: +- request: + body: '{"TableName": "uttable1e750f33"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '32' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 15:36:27 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 15:36:27 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://fake_table_account.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#Tables/@Element","TableName":"uttable1e750f33"}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Thu, 17 Jun 2021 15:36:30 GMT + location: + - https://fake_table_account.table.core.windows.net/Tables('uttable1e750f33') + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 201 + message: Created +- request: + body: '{"PartitionKey": "pk1e750f33", "PartitionKey@odata.type": "Edm.String", + "RowKey": "rk1e750f33", "RowKey@odata.type": "Edm.String", "age": 39, "sex": + "male", "sex@odata.type": "Edm.String", "married": true, "deceased": false, + "ratio": 3.1, "ratio@odata.type": "Edm.Double", "evenratio": 3.0, "evenratio@odata.type": + "Edm.Double", "double": 5, "double@odata.type": "Edm.Double", "large": 933311100, + "Birthday": "1973-10-04T00:00:00.000000Z", "Birthday@odata.type": "Edm.DateTime", + "birthday": "1970-10-04T00:00:00.000000Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '711' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 15:36:29 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 15:36:29 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://fake_table_account.table.core.windows.net/uttable1e750f33 + response: + body: + string: '{"odata.error":{"code":"AuthorizationPermissionMismatch","message":{"lang":"en-US","value":"This + request is not authorized to perform this operation using this permission.\nRequestId:f61f6e4b-c002-0071-578e-633c0f000000\nTime:2021-06-17T15:36:30.5558403Z"}}}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Thu, 17 Jun 2021 15:36:30 GMT + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 403 + message: Forbidden +- request: + body: null + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 15:36:29 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 15:36:29 GMT + x-ms-version: + - '2019-02-02' + method: GET + uri: https://fake_table_account.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#Tables","value":[{"TableName":"uttable1e750f33"},{"TableName":"uttable93571220"}]}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Thu, 17 Jun 2021 15:36:30 GMT + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + Date: + - Thu, 17 Jun 2021 15:36:29 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 15:36:29 GMT + x-ms-version: + - '2019-02-02' + method: DELETE + uri: https://fake_table_account.table.core.windows.net/Tables('uttable1e750f33') + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Thu, 17 Jun 2021 15:36:30 GMT + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 204 + message: No Content +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + Date: + - Thu, 17 Jun 2021 15:36:30 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 15:36:30 GMT + x-ms-version: + - '2019-02-02' + method: DELETE + uri: https://fake_table_account.table.core.windows.net/Tables('uttable93571220') + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Thu, 17 Jun 2021 15:36:30 GMT + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + x-content-type-options: + - nosniff + x-ms-version: + - '2019-02-02' + status: + code: 204 + message: No Content +version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_aad_async.test_aad_access_policy_error.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_aad_async.test_aad_access_policy_error.yaml new file mode 100644 index 000000000000..665c7c52f621 --- /dev/null +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_aad_async.test_aad_access_policy_error.yaml @@ -0,0 +1,72 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/xml + Date: + - Thu, 17 Jun 2021 17:32:42 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 17:32:42 GMT + x-ms-version: + - '2019-02-02' + method: GET + uri: https://fake_table_account.table.core.windows.net/pytableasyncee2113e6?comp=acl + response: + body: + string: 'ResourceNotFoundThe specified resource does not exist. + + RequestId:9cf4e7c7-6002-0043-449e-630e29000000 + + Time:2021-06-17T17:32:44.7764226Z' + headers: + content-length: '322' + content-type: application/xml + date: Thu, 17 Jun 2021 17:32:44 GMT + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + x-ms-error-code: ResourceNotFound + x-ms-version: '2019-02-02' + status: + code: 404 + message: The specified resource does not exist. + url: https://seankaneprim.table.core.windows.net/pytableasyncee2113e6?comp=acl +- request: + body: null + headers: + Accept: + - application/xml + Content-Type: + - application/xml + Date: + - Thu, 17 Jun 2021 17:32:44 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 17:32:44 GMT + x-ms-version: + - '2019-02-02' + method: PUT + uri: https://fake_table_account.table.core.windows.net/pytableasyncee2113e6?comp=acl + response: + body: + string: 'ResourceNotFoundThe specified resource does not exist. + + RequestId:9cf4e819-6002-0043-129e-630e29000000 + + Time:2021-06-17T17:32:44.8975090Z' + headers: + content-length: '322' + content-type: application/xml + date: Thu, 17 Jun 2021 17:32:44 GMT + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + x-ms-error-code: ResourceNotFound + x-ms-version: '2019-02-02' + status: + code: 404 + message: The specified resource does not exist. + url: https://seankaneprim.table.core.windows.net/pytableasyncee2113e6?comp=acl +version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_aad_async.test_aad_batch_all_operations_together.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_aad_async.test_aad_batch_all_operations_together.yaml new file mode 100644 index 000000000000..365b5c063407 --- /dev/null +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_aad_async.test_aad_batch_all_operations_together.yaml @@ -0,0 +1,420 @@ +interactions: +- request: + body: '{"TableName": "uttablec9e417fa"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Content-Length: + - '32' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 17:32:44 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 17:32:44 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://fake_table_account.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#Tables/@Element","TableName":"uttablec9e417fa"}' + headers: + cache-control: no-cache + content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: Thu, 17 Jun 2021 17:32:45 GMT + location: https://fake_table_account.table.core.windows.net/Tables('uttablec9e417fa') + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 201 + message: Created + url: https://seankaneprim.table.core.windows.net/Tables +- request: + body: '{"PartitionKey": "003", "PartitionKey@odata.type": "Edm.String", "RowKey": + "batch_all_operations_together-1", "RowKey@odata.type": "Edm.String", "test": + true, "test2": "value", "test2@odata.type": "Edm.String", "test3": 3, "test4": + 1234567890, "test5": "2021-06-17T21:32:45.280244Z", "test5@odata.type": "Edm.DateTime"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Content-Length: + - '319' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 17:32:45 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 17:32:45 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://fake_table_account.table.core.windows.net/uttablec9e417fa + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#uttablec9e417fa/@Element","odata.etag":"W/\"datetime''2021-06-17T17%3A32%3A46.1881248Z''\"","PartitionKey":"003","RowKey":"batch_all_operations_together-1","Timestamp":"2021-06-17T17:32:46.1881248Z","test":true,"test2":"value","test3":3,"test4":1234567890,"test5@odata.type":"Edm.DateTime","test5":"2021-06-17T21:32:45.280244Z"}' + headers: + cache-control: no-cache + content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: Thu, 17 Jun 2021 17:32:45 GMT + etag: W/"datetime'2021-06-17T17%3A32%3A46.1881248Z'" + location: https://fake_table_account.table.core.windows.net/uttablec9e417fa(PartitionKey='003',RowKey='batch_all_operations_together-1') + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 201 + message: Created + url: https://seankaneprim.table.core.windows.net/uttablec9e417fa +- request: + body: '{"PartitionKey": "003", "PartitionKey@odata.type": "Edm.String", "RowKey": + "batch_all_operations_together-2", "RowKey@odata.type": "Edm.String", "test": + true, "test2": "value", "test2@odata.type": "Edm.String", "test3": 3, "test4": + 1234567890, "test5": "2021-06-17T21:32:45.280244Z", "test5@odata.type": "Edm.DateTime"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Content-Length: + - '319' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 17:32:45 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 17:32:45 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://fake_table_account.table.core.windows.net/uttablec9e417fa + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#uttablec9e417fa/@Element","odata.etag":"W/\"datetime''2021-06-17T17%3A32%3A46.3262232Z''\"","PartitionKey":"003","RowKey":"batch_all_operations_together-2","Timestamp":"2021-06-17T17:32:46.3262232Z","test":true,"test2":"value","test3":3,"test4":1234567890,"test5@odata.type":"Edm.DateTime","test5":"2021-06-17T21:32:45.280244Z"}' + headers: + cache-control: no-cache + content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: Thu, 17 Jun 2021 17:32:46 GMT + etag: W/"datetime'2021-06-17T17%3A32%3A46.3262232Z'" + location: https://fake_table_account.table.core.windows.net/uttablec9e417fa(PartitionKey='003',RowKey='batch_all_operations_together-2') + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 201 + message: Created + url: https://seankaneprim.table.core.windows.net/uttablec9e417fa +- request: + body: '{"PartitionKey": "003", "PartitionKey@odata.type": "Edm.String", "RowKey": + "batch_all_operations_together-3", "RowKey@odata.type": "Edm.String", "test": + true, "test2": "value", "test2@odata.type": "Edm.String", "test3": 3, "test4": + 1234567890, "test5": "2021-06-17T21:32:45.280244Z", "test5@odata.type": "Edm.DateTime"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Content-Length: + - '319' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 17:32:45 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 17:32:45 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://fake_table_account.table.core.windows.net/uttablec9e417fa + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#uttablec9e417fa/@Element","odata.etag":"W/\"datetime''2021-06-17T17%3A32%3A46.4573152Z''\"","PartitionKey":"003","RowKey":"batch_all_operations_together-3","Timestamp":"2021-06-17T17:32:46.4573152Z","test":true,"test2":"value","test3":3,"test4":1234567890,"test5@odata.type":"Edm.DateTime","test5":"2021-06-17T21:32:45.280244Z"}' + headers: + cache-control: no-cache + content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: Thu, 17 Jun 2021 17:32:46 GMT + etag: W/"datetime'2021-06-17T17%3A32%3A46.4573152Z'" + location: https://fake_table_account.table.core.windows.net/uttablec9e417fa(PartitionKey='003',RowKey='batch_all_operations_together-3') + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 201 + message: Created + url: https://seankaneprim.table.core.windows.net/uttablec9e417fa +- request: + body: '{"PartitionKey": "003", "PartitionKey@odata.type": "Edm.String", "RowKey": + "batch_all_operations_together-4", "RowKey@odata.type": "Edm.String", "test": + true, "test2": "value", "test2@odata.type": "Edm.String", "test3": 3, "test4": + 1234567890, "test5": "2021-06-17T21:32:45.280244Z", "test5@odata.type": "Edm.DateTime"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Content-Length: + - '319' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 17:32:45 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 17:32:45 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://fake_table_account.table.core.windows.net/uttablec9e417fa + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#uttablec9e417fa/@Element","odata.etag":"W/\"datetime''2021-06-17T17%3A32%3A46.5864071Z''\"","PartitionKey":"003","RowKey":"batch_all_operations_together-4","Timestamp":"2021-06-17T17:32:46.5864071Z","test":true,"test2":"value","test3":3,"test4":1234567890,"test5@odata.type":"Edm.DateTime","test5":"2021-06-17T21:32:45.280244Z"}' + headers: + cache-control: no-cache + content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: Thu, 17 Jun 2021 17:32:46 GMT + etag: W/"datetime'2021-06-17T17%3A32%3A46.5864071Z'" + location: https://fake_table_account.table.core.windows.net/uttablec9e417fa(PartitionKey='003',RowKey='batch_all_operations_together-4') + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 201 + message: Created + url: https://seankaneprim.table.core.windows.net/uttablec9e417fa +- request: + body: "--batch_959ccfa0-93f0-4975-9bd3-165d90d687b0\r\nContent-Type: multipart/mixed;\ + \ boundary=changeset_bb071ca1-4596-4b1c-9055-f1960454564d\r\n\r\n--changeset_bb071ca1-4596-4b1c-9055-f1960454564d\r\ + \nContent-Type: application/http\r\nContent-Transfer-Encoding: binary\r\nContent-ID:\ + \ 0\r\n\r\nPOST https://seankaneprim.table.core.windows.net/uttablec9e417fa\ + \ HTTP/1.1\r\nx-ms-version: 2019-02-02\r\nDataServiceVersion: 3.0\r\nPrefer:\ + \ return-no-content\r\nContent-Type: application/json;odata=nometadata\r\nAccept:\ + \ application/json;odata=minimalmetadata\r\nContent-Length: 317\r\nx-ms-date:\ + \ Thu, 17 Jun 2021 17:32:45 GMT\r\nDate: Thu, 17 Jun 2021 17:32:45 GMT\r\n\r\ + \n{\"PartitionKey\": \"003\", \"PartitionKey@odata.type\": \"Edm.String\", \"\ + RowKey\": \"batch_all_operations_together\", \"RowKey@odata.type\": \"Edm.String\"\ + , \"test\": true, \"test2\": \"value\", \"test2@odata.type\": \"Edm.String\"\ + , \"test3\": 3, \"test4\": 1234567890, \"test5\": \"2021-06-17T21:32:45.280244Z\"\ + , \"test5@odata.type\": \"Edm.DateTime\"}\r\n--changeset_bb071ca1-4596-4b1c-9055-f1960454564d\r\ + \nContent-Type: application/http\r\nContent-Transfer-Encoding: binary\r\nContent-ID:\ + \ 1\r\n\r\nDELETE https://seankaneprim.table.core.windows.net/uttablec9e417fa(PartitionKey='003',RowKey='batch_all_operations_together-1')\ + \ HTTP/1.1\r\nx-ms-version: 2019-02-02\r\nDataServiceVersion: 3.0\r\nIf-Match:\ + \ *\r\nAccept: application/json;odata=minimalmetadata\r\nx-ms-date: Thu, 17\ + \ Jun 2021 17:32:45 GMT\r\nDate: Thu, 17 Jun 2021 17:32:45 GMT\r\n\r\n\r\n--changeset_bb071ca1-4596-4b1c-9055-f1960454564d\r\ + \nContent-Type: application/http\r\nContent-Transfer-Encoding: binary\r\nContent-ID:\ + \ 2\r\n\r\nPATCH https://seankaneprim.table.core.windows.net/uttablec9e417fa(PartitionKey='003',RowKey='batch_all_operations_together-2')\ + \ HTTP/1.1\r\nx-ms-version: 2019-02-02\r\nDataServiceVersion: 3.0\r\nIf-Match:\ + \ *\r\nContent-Type: application/json\r\nAccept: application/json\r\nContent-Length:\ + \ 320\r\nx-ms-date: Thu, 17 Jun 2021 17:32:45 GMT\r\nDate: Thu, 17 Jun 2021\ + \ 17:32:45 GMT\r\n\r\n{\"PartitionKey\": \"003\", \"PartitionKey@odata.type\"\ + : \"Edm.String\", \"RowKey\": \"batch_all_operations_together-2\", \"RowKey@odata.type\"\ + : \"Edm.String\", \"test\": true, \"test2\": \"value\", \"test2@odata.type\"\ + : \"Edm.String\", \"test3\": 10, \"test4\": 1234567890, \"test5\": \"2021-06-17T21:32:45.280244Z\"\ + , \"test5@odata.type\": \"Edm.DateTime\"}\r\n--changeset_bb071ca1-4596-4b1c-9055-f1960454564d\r\ + \nContent-Type: application/http\r\nContent-Transfer-Encoding: binary\r\nContent-ID:\ + \ 3\r\n\r\nPUT https://seankaneprim.table.core.windows.net/uttablec9e417fa(PartitionKey='003',RowKey='batch_all_operations_together-3')\ + \ HTTP/1.1\r\nx-ms-version: 2019-02-02\r\nDataServiceVersion: 3.0\r\nIf-Match:\ + \ *\r\nContent-Type: application/json\r\nAccept: application/json\r\nContent-Length:\ + \ 321\r\nx-ms-date: Thu, 17 Jun 2021 17:32:45 GMT\r\nDate: Thu, 17 Jun 2021\ + \ 17:32:45 GMT\r\n\r\n{\"PartitionKey\": \"003\", \"PartitionKey@odata.type\"\ + : \"Edm.String\", \"RowKey\": \"batch_all_operations_together-3\", \"RowKey@odata.type\"\ + : \"Edm.String\", \"test\": true, \"test2\": \"value\", \"test2@odata.type\"\ + : \"Edm.String\", \"test3\": 100, \"test4\": 1234567890, \"test5\": \"2021-06-17T21:32:45.280244Z\"\ + , \"test5@odata.type\": \"Edm.DateTime\"}\r\n--changeset_bb071ca1-4596-4b1c-9055-f1960454564d\r\ + \nContent-Type: application/http\r\nContent-Transfer-Encoding: binary\r\nContent-ID:\ + \ 4\r\n\r\nPATCH https://seankaneprim.table.core.windows.net/uttablec9e417fa(PartitionKey='003',RowKey='batch_all_operations_together-4')\ + \ HTTP/1.1\r\nx-ms-version: 2019-02-02\r\nDataServiceVersion: 3.0\r\nContent-Type:\ + \ application/json\r\nAccept: application/json\r\nContent-Length: 320\r\nx-ms-date:\ + \ Thu, 17 Jun 2021 17:32:45 GMT\r\nDate: Thu, 17 Jun 2021 17:32:45 GMT\r\n\r\ + \n{\"PartitionKey\": \"003\", \"PartitionKey@odata.type\": \"Edm.String\", \"\ + RowKey\": \"batch_all_operations_together-4\", \"RowKey@odata.type\": \"Edm.String\"\ + , \"test\": true, \"test2\": \"value\", \"test2@odata.type\": \"Edm.String\"\ + , \"test3\": 10, \"test4\": 1234567890, \"test5\": \"2021-06-17T21:32:45.280244Z\"\ + , \"test5@odata.type\": \"Edm.DateTime\"}\r\n--changeset_bb071ca1-4596-4b1c-9055-f1960454564d\r\ + \nContent-Type: application/http\r\nContent-Transfer-Encoding: binary\r\nContent-ID:\ + \ 5\r\n\r\nPUT https://seankaneprim.table.core.windows.net/uttablec9e417fa(PartitionKey='003',RowKey='batch_all_operations_together-5')\ + \ HTTP/1.1\r\nx-ms-version: 2019-02-02\r\nDataServiceVersion: 3.0\r\nContent-Type:\ + \ application/json\r\nAccept: application/json\r\nContent-Length: 320\r\nx-ms-date:\ + \ Thu, 17 Jun 2021 17:32:45 GMT\r\nDate: Thu, 17 Jun 2021 17:32:45 GMT\r\n\r\ + \n{\"PartitionKey\": \"003\", \"PartitionKey@odata.type\": \"Edm.String\", \"\ + RowKey\": \"batch_all_operations_together-5\", \"RowKey@odata.type\": \"Edm.String\"\ + , \"test\": true, \"test2\": \"value\", \"test2@odata.type\": \"Edm.String\"\ + , \"test3\": 10, \"test4\": 1234567890, \"test5\": \"2021-06-17T21:32:45.280244Z\"\ + , \"test5@odata.type\": \"Edm.DateTime\"}\r\n--changeset_bb071ca1-4596-4b1c-9055-f1960454564d--\r\ + \n\r\n--batch_959ccfa0-93f0-4975-9bd3-165d90d687b0--\r\n" + headers: + Accept: + - application/json + Content-Length: + - '4749' + Content-Type: + - multipart/mixed; boundary=batch_959ccfa0-93f0-4975-9bd3-165d90d687b0 + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 17:32:45 GMT + MaxDataServiceVersion: + - 3.0;NetFx + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 17:32:45 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://fake_table_account.table.core.windows.net/$batch + response: + body: + string: "--batchresponse_b253a6e8-ebfb-41d3-9720-6a9f5c600754\r\nContent-Type:\ + \ multipart/mixed; boundary=changesetresponse_1fdd6b8c-258a-4b29-8cc8-127c194f729d\r\ + \n\r\n--changesetresponse_1fdd6b8c-258a-4b29-8cc8-127c194f729d\r\nContent-Type:\ + \ application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204\ + \ No Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\ + \nPreference-Applied: return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation:\ + \ https://seankaneprim.table.core.windows.net/uttablec9e417fa(PartitionKey='003',RowKey='batch_all_operations_together')\r\ + \nDataServiceId: https://seankaneprim.table.core.windows.net/uttablec9e417fa(PartitionKey='003',RowKey='batch_all_operations_together')\r\ + \nETag: W/\"datetime'2021-06-17T17%3A32%3A46.777543Z'\"\r\n\r\n\r\n--changesetresponse_1fdd6b8c-258a-4b29-8cc8-127c194f729d\r\ + \nContent-Type: application/http\r\nContent-Transfer-Encoding: binary\r\n\r\ + \nHTTP/1.1 204 No Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control:\ + \ no-cache\r\nDataServiceVersion: 1.0;\r\n\r\n\r\n--changesetresponse_1fdd6b8c-258a-4b29-8cc8-127c194f729d\r\ + \nContent-Type: application/http\r\nContent-Transfer-Encoding: binary\r\n\r\ + \nHTTP/1.1 204 No Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control:\ + \ no-cache\r\nDataServiceVersion: 1.0;\r\nETag: W/\"datetime'2021-06-17T17%3A32%3A46.7810374Z'\"\ + \r\n\r\n\r\n--changesetresponse_1fdd6b8c-258a-4b29-8cc8-127c194f729d\r\nContent-Type:\ + \ application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204\ + \ No Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\ + \nDataServiceVersion: 1.0;\r\nETag: W/\"datetime'2021-06-17T17%3A32%3A46.7810374Z'\"\ + \r\n\r\n\r\n--changesetresponse_1fdd6b8c-258a-4b29-8cc8-127c194f729d\r\nContent-Type:\ + \ application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204\ + \ No Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\ + \nDataServiceVersion: 1.0;\r\nETag: W/\"datetime'2021-06-17T17%3A32%3A46.7810374Z'\"\ + \r\n\r\n\r\n--changesetresponse_1fdd6b8c-258a-4b29-8cc8-127c194f729d\r\nContent-Type:\ + \ application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204\ + \ No Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\ + \nDataServiceVersion: 1.0;\r\nETag: W/\"datetime'2021-06-17T17%3A32%3A46.7820379Z'\"\ + \r\n\r\n\r\n--changesetresponse_1fdd6b8c-258a-4b29-8cc8-127c194f729d--\r\n\ + --batchresponse_b253a6e8-ebfb-41d3-9720-6a9f5c600754--\r\n" + headers: + cache-control: no-cache + content-type: multipart/mixed; boundary=batchresponse_b253a6e8-ebfb-41d3-9720-6a9f5c600754 + date: Thu, 17 Jun 2021 17:32:46 GMT + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 202 + message: Accepted + url: https://seankaneprim.table.core.windows.net/$batch +- request: + body: null + headers: + Accept: + - application/json;odata=minimalmetadata + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 17:32:46 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 17:32:46 GMT + x-ms-version: + - '2019-02-02' + method: GET + uri: https://fake_table_account.table.core.windows.net/uttablec9e417fa()?$filter=PartitionKey%20eq%20'003' + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#uttablec9e417fa","value":[{"odata.etag":"W/\"datetime''2021-06-17T17%3A32%3A46.777543Z''\"","PartitionKey":"003","RowKey":"batch_all_operations_together","Timestamp":"2021-06-17T17:32:46.777543Z","test":true,"test2":"value","test3":3,"test4":1234567890,"test5@odata.type":"Edm.DateTime","test5":"2021-06-17T21:32:45.280244Z"},{"odata.etag":"W/\"datetime''2021-06-17T17%3A32%3A46.7810374Z''\"","PartitionKey":"003","RowKey":"batch_all_operations_together-2","Timestamp":"2021-06-17T17:32:46.7810374Z","test":true,"test2":"value","test3":10,"test4":1234567890,"test5@odata.type":"Edm.DateTime","test5":"2021-06-17T21:32:45.280244Z"},{"odata.etag":"W/\"datetime''2021-06-17T17%3A32%3A46.7810374Z''\"","PartitionKey":"003","RowKey":"batch_all_operations_together-3","Timestamp":"2021-06-17T17:32:46.7810374Z","test":true,"test2":"value","test3":100,"test4":1234567890,"test5@odata.type":"Edm.DateTime","test5":"2021-06-17T21:32:45.280244Z"},{"odata.etag":"W/\"datetime''2021-06-17T17%3A32%3A46.7810374Z''\"","PartitionKey":"003","RowKey":"batch_all_operations_together-4","Timestamp":"2021-06-17T17:32:46.7810374Z","test":true,"test2":"value","test3":10,"test4":1234567890,"test5@odata.type":"Edm.DateTime","test5":"2021-06-17T21:32:45.280244Z"},{"odata.etag":"W/\"datetime''2021-06-17T17%3A32%3A46.7820379Z''\"","PartitionKey":"003","RowKey":"batch_all_operations_together-5","Timestamp":"2021-06-17T17:32:46.7820379Z","test":true,"test2":"value","test3":10,"test4":1234567890,"test5@odata.type":"Edm.DateTime","test5":"2021-06-17T21:32:45.280244Z"}]}' + headers: + cache-control: no-cache + content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: Thu, 17 Jun 2021 17:32:46 GMT + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 200 + message: OK + url: https://seankaneprim.table.core.windows.net/uttablec9e417fa()?$filter=PartitionKey%20eq%20'003' +- request: + body: null + headers: + Accept: + - application/json;odata=minimalmetadata + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 17:32:46 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 17:32:46 GMT + x-ms-version: + - '2019-02-02' + method: GET + uri: https://fake_table_account.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#Tables","value":[{"TableName":"uttablec9e417fa"}]}' + headers: + cache-control: no-cache + content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: Thu, 17 Jun 2021 17:32:46 GMT + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 200 + message: OK + url: https://seankaneprim.table.core.windows.net/Tables +- request: + body: null + headers: + Accept: + - application/json + Date: + - Thu, 17 Jun 2021 17:32:46 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 17:32:46 GMT + x-ms-version: + - '2019-02-02' + method: DELETE + uri: https://fake_table_account.table.core.windows.net/Tables('uttablec9e417fa') + response: + body: + string: '' + headers: + cache-control: no-cache + content-length: '0' + date: Thu, 17 Jun 2021 17:32:47 GMT + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 204 + message: No Content + url: https://seankaneprim.table.core.windows.net/Tables('uttablec9e417fa') +version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_aad_async.test_aad_create_table.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_aad_async.test_aad_create_table.yaml new file mode 100644 index 000000000000..749cf2f01a63 --- /dev/null +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_aad_async.test_aad_create_table.yaml @@ -0,0 +1,163 @@ +interactions: +- request: + body: '{"TableName": "pytableasync6c0e10d7"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Content-Length: + - '37' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 17:32:46 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 17:32:46 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://fake_table_account.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#Tables/@Element","TableName":"pytableasync6c0e10d7"}' + headers: + cache-control: no-cache + content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: Thu, 17 Jun 2021 17:32:47 GMT + location: https://fake_table_account.table.core.windows.net/Tables('pytableasync6c0e10d7') + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 201 + message: Created + url: https://seankaneprim.table.core.windows.net/Tables +- request: + body: null + headers: + Accept: + - application/json;odata=minimalmetadata + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 17:32:47 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 17:32:47 GMT + x-ms-version: + - '2019-02-02' + method: GET + uri: https://fake_table_account.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#Tables","value":[{"TableName":"pytableasync6c0e10d7"}]}' + headers: + cache-control: no-cache + content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: Thu, 17 Jun 2021 17:32:47 GMT + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 200 + message: OK + url: https://seankaneprim.table.core.windows.net/Tables +- request: + body: null + headers: + Accept: + - application/json + Date: + - Thu, 17 Jun 2021 17:32:47 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 17:32:47 GMT + x-ms-version: + - '2019-02-02' + method: DELETE + uri: https://fake_table_account.table.core.windows.net/Tables('pytableasync6c0e10d7') + response: + body: + string: '' + headers: + cache-control: no-cache + content-length: '0' + date: Thu, 17 Jun 2021 17:32:48 GMT + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 204 + message: No Content + url: https://seankaneprim.table.core.windows.net/Tables('pytableasync6c0e10d7') +- request: + body: null + headers: + Accept: + - application/json;odata=minimalmetadata + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 17:32:47 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 17:32:47 GMT + x-ms-version: + - '2019-02-02' + method: GET + uri: https://fake_table_account.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#Tables","value":[]}' + headers: + cache-control: no-cache + content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: Thu, 17 Jun 2021 17:32:48 GMT + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 200 + message: OK + url: https://seankaneprim.table.core.windows.net/Tables +- request: + body: null + headers: + Accept: + - application/json + Date: + - Thu, 17 Jun 2021 17:32:48 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 17:32:48 GMT + x-ms-version: + - '2019-02-02' + method: DELETE + uri: https://fake_table_account.table.core.windows.net/Tables('pytableasync6c0e10d7') + response: + body: + string: '{"odata.error":{"code":"ResourceNotFound","message":{"lang":"en-US","value":"The + specified resource does not exist.\nRequestId:658e2a9c-d002-0046-1c9e-63dcf2000000\nTime:2021-06-17T17:32:48.9103428Z"}}}' + headers: + cache-control: no-cache + content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: Thu, 17 Jun 2021 17:32:48 GMT + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 404 + message: Not Found + url: https://seankaneprim.table.core.windows.net/Tables('pytableasync6c0e10d7') +version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_aad_async.test_aad_create_table_tc.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_aad_async.test_aad_create_table_tc.yaml new file mode 100644 index 000000000000..02ec0a57e3b3 --- /dev/null +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_aad_async.test_aad_create_table_tc.yaml @@ -0,0 +1,163 @@ +interactions: +- request: + body: '{"TableName": "pytableasynca0fb120d"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Content-Length: + - '37' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 17:32:48 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 17:32:48 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://fake_table_account.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#Tables/@Element","TableName":"pytableasynca0fb120d"}' + headers: + cache-control: no-cache + content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: Thu, 17 Jun 2021 17:32:49 GMT + location: https://fake_table_account.table.core.windows.net/Tables('pytableasynca0fb120d') + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 201 + message: Created + url: https://seankaneprim.table.core.windows.net/Tables +- request: + body: null + headers: + Accept: + - application/json;odata=minimalmetadata + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 17:32:49 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 17:32:49 GMT + x-ms-version: + - '2019-02-02' + method: GET + uri: https://fake_table_account.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#Tables","value":[{"TableName":"pytableasynca0fb120d"}]}' + headers: + cache-control: no-cache + content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: Thu, 17 Jun 2021 17:32:50 GMT + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 200 + message: OK + url: https://seankaneprim.table.core.windows.net/Tables +- request: + body: null + headers: + Accept: + - application/json + Date: + - Thu, 17 Jun 2021 17:32:50 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 17:32:50 GMT + x-ms-version: + - '2019-02-02' + method: DELETE + uri: https://fake_table_account.table.core.windows.net/Tables('pytableasynca0fb120d') + response: + body: + string: '' + headers: + cache-control: no-cache + content-length: '0' + date: Thu, 17 Jun 2021 17:32:50 GMT + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 204 + message: No Content + url: https://seankaneprim.table.core.windows.net/Tables('pytableasynca0fb120d') +- request: + body: null + headers: + Accept: + - application/json;odata=minimalmetadata + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 17:32:50 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 17:32:50 GMT + x-ms-version: + - '2019-02-02' + method: GET + uri: https://fake_table_account.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#Tables","value":[]}' + headers: + cache-control: no-cache + content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: Thu, 17 Jun 2021 17:32:50 GMT + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 200 + message: OK + url: https://seankaneprim.table.core.windows.net/Tables +- request: + body: null + headers: + Accept: + - application/json + Date: + - Thu, 17 Jun 2021 17:32:50 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 17:32:50 GMT + x-ms-version: + - '2019-02-02' + method: DELETE + uri: https://fake_table_account.table.core.windows.net/Tables('pytableasynca0fb120d') + response: + body: + string: '{"odata.error":{"code":"ResourceNotFound","message":{"lang":"en-US","value":"The + specified resource does not exist.\nRequestId:0b9b8196-7002-0070-319e-635182000000\nTime:2021-06-17T17:32:51.6594986Z"}}}' + headers: + cache-control: no-cache + content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: Thu, 17 Jun 2021 17:32:50 GMT + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 404 + message: Not Found + url: https://seankaneprim.table.core.windows.net/Tables('pytableasynca0fb120d') +version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_aad_async.test_aad_delete_entities.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_aad_async.test_aad_delete_entities.yaml new file mode 100644 index 000000000000..18e5e7a9271a --- /dev/null +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_aad_async.test_aad_delete_entities.yaml @@ -0,0 +1,212 @@ +interactions: +- request: + body: '{"TableName": "uttablea16b1233"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Content-Length: + - '32' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 17:32:51 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 17:32:51 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://fake_table_account.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#Tables/@Element","TableName":"uttablea16b1233"}' + headers: + cache-control: no-cache + content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: Thu, 17 Jun 2021 17:32:52 GMT + location: https://fake_table_account.table.core.windows.net/Tables('uttablea16b1233') + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 201 + message: Created + url: https://seankaneprim.table.core.windows.net/Tables +- request: + body: '{"PartitionKey": "pka16b1233", "PartitionKey@odata.type": "Edm.String", + "RowKey": "rka16b1233", "RowKey@odata.type": "Edm.String", "age": 39, "sex": + "male", "sex@odata.type": "Edm.String", "married": true, "deceased": false, + "ratio": 3.1, "ratio@odata.type": "Edm.Double", "evenratio": 3.0, "evenratio@odata.type": + "Edm.Double", "double": 5, "double@odata.type": "Edm.Double", "large": 933311100, + "Birthday": "1973-10-04T00:00:00.000000Z", "Birthday@odata.type": "Edm.DateTime", + "birthday": "1970-10-04T00:00:00.000000Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Content-Length: + - '711' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 17:32:52 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 17:32:52 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://fake_table_account.table.core.windows.net/uttablea16b1233 + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#uttablea16b1233/@Element","odata.etag":"W/\"datetime''2021-06-17T17%3A32%3A53.1952518Z''\"","PartitionKey":"pka16b1233","RowKey":"rka16b1233","Timestamp":"2021-06-17T17:32:53.1952518Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"double":5.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + headers: + cache-control: no-cache + content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: Thu, 17 Jun 2021 17:32:52 GMT + etag: W/"datetime'2021-06-17T17%3A32%3A53.1952518Z'" + location: https://fake_table_account.table.core.windows.net/uttablea16b1233(PartitionKey='pka16b1233',RowKey='rka16b1233') + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 201 + message: Created + url: https://seankaneprim.table.core.windows.net/uttablea16b1233 +- request: + body: null + headers: + Accept: + - application/json;odata=minimalmetadata + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 17:32:52 GMT + If-Match: + - '*' + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 17:32:52 GMT + x-ms-version: + - '2019-02-02' + method: DELETE + uri: https://fake_table_account.table.core.windows.net/uttablea16b1233(PartitionKey='pka16b1233',RowKey='rka16b1233') + response: + body: + string: '' + headers: + cache-control: no-cache + content-length: '0' + date: Thu, 17 Jun 2021 17:32:52 GMT + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 204 + message: No Content + url: https://seankaneprim.table.core.windows.net/uttablea16b1233(PartitionKey='pka16b1233',RowKey='rka16b1233') +- request: + body: null + headers: + Accept: + - application/json;odata=minimalmetadata + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 17:32:52 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 17:32:52 GMT + x-ms-version: + - '2019-02-02' + method: GET + uri: https://fake_table_account.table.core.windows.net/uttablea16b1233(PartitionKey='pka16b1233',RowKey='rka16b1233') + response: + body: + string: '{"odata.error":{"code":"ResourceNotFound","message":{"lang":"en-US","value":"The + specified resource does not exist.\nRequestId:4cf27d30-4002-0019-269e-6368ce000000\nTime:2021-06-17T17:32:53.4614395Z"}}}' + headers: + cache-control: no-cache + content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: Thu, 17 Jun 2021 17:32:52 GMT + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 404 + message: Not Found + url: https://seankaneprim.table.core.windows.net/uttablea16b1233(PartitionKey='pka16b1233',RowKey='rka16b1233') +- request: + body: null + headers: + Accept: + - application/json;odata=minimalmetadata + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 17:32:52 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 17:32:52 GMT + x-ms-version: + - '2019-02-02' + method: GET + uri: https://fake_table_account.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#Tables","value":[{"TableName":"uttablea16b1233"}]}' + headers: + cache-control: no-cache + content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: Thu, 17 Jun 2021 17:32:52 GMT + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 200 + message: OK + url: https://seankaneprim.table.core.windows.net/Tables +- request: + body: null + headers: + Accept: + - application/json + Date: + - Thu, 17 Jun 2021 17:32:52 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 17:32:52 GMT + x-ms-version: + - '2019-02-02' + method: DELETE + uri: https://fake_table_account.table.core.windows.net/Tables('uttablea16b1233') + response: + body: + string: '' + headers: + cache-control: no-cache + content-length: '0' + date: Thu, 17 Jun 2021 17:32:52 GMT + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 204 + message: No Content + url: https://seankaneprim.table.core.windows.net/Tables('uttablea16b1233') +version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_aad_async.test_aad_insert_entity_dictionary.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_aad_async.test_aad_insert_entity_dictionary.yaml new file mode 100644 index 000000000000..2f5da2c0f476 --- /dev/null +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_aad_async.test_aad_insert_entity_dictionary.yaml @@ -0,0 +1,146 @@ +interactions: +- request: + body: '{"TableName": "uttable5ad11622"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Content-Length: + - '32' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 17:32:53 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 17:32:53 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://fake_table_account.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#Tables/@Element","TableName":"uttable5ad11622"}' + headers: + cache-control: no-cache + content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: Thu, 17 Jun 2021 17:32:55 GMT + location: https://fake_table_account.table.core.windows.net/Tables('uttable5ad11622') + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 201 + message: Created + url: https://seankaneprim.table.core.windows.net/Tables +- request: + body: '{"PartitionKey": "pk5ad11622", "PartitionKey@odata.type": "Edm.String", + "RowKey": "rk5ad11622", "RowKey@odata.type": "Edm.String", "age": 39, "sex": + "male", "sex@odata.type": "Edm.String", "married": true, "deceased": false, + "ratio": 3.1, "ratio@odata.type": "Edm.Double", "evenratio": 3.0, "evenratio@odata.type": + "Edm.Double", "double": 5, "double@odata.type": "Edm.Double", "large": 933311100, + "Birthday": "1973-10-04T00:00:00.000000Z", "Birthday@odata.type": "Edm.DateTime", + "birthday": "1970-10-04T00:00:00.000000Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Content-Length: + - '711' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 17:32:55 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 17:32:55 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://fake_table_account.table.core.windows.net/uttable5ad11622 + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#uttable5ad11622/@Element","odata.etag":"W/\"datetime''2021-06-17T17%3A32%3A56.5574049Z''\"","PartitionKey":"pk5ad11622","RowKey":"rk5ad11622","Timestamp":"2021-06-17T17:32:56.5574049Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"double":5.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + headers: + cache-control: no-cache + content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: Thu, 17 Jun 2021 17:32:55 GMT + etag: W/"datetime'2021-06-17T17%3A32%3A56.5574049Z'" + location: https://fake_table_account.table.core.windows.net/uttable5ad11622(PartitionKey='pk5ad11622',RowKey='rk5ad11622') + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 201 + message: Created + url: https://seankaneprim.table.core.windows.net/uttable5ad11622 +- request: + body: null + headers: + Accept: + - application/json;odata=minimalmetadata + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 17:32:55 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 17:32:55 GMT + x-ms-version: + - '2019-02-02' + method: GET + uri: https://fake_table_account.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#Tables","value":[{"TableName":"uttable5ad11622"}]}' + headers: + cache-control: no-cache + content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: Thu, 17 Jun 2021 17:32:55 GMT + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 200 + message: OK + url: https://seankaneprim.table.core.windows.net/Tables +- request: + body: null + headers: + Accept: + - application/json + Date: + - Thu, 17 Jun 2021 17:32:55 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 17:32:55 GMT + x-ms-version: + - '2019-02-02' + method: DELETE + uri: https://fake_table_account.table.core.windows.net/Tables('uttable5ad11622') + response: + body: + string: '' + headers: + cache-control: no-cache + content-length: '0' + date: Thu, 17 Jun 2021 17:32:55 GMT + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 204 + message: No Content + url: https://seankaneprim.table.core.windows.net/Tables('uttable5ad11622') +version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_aad_async.test_aad_list_entities.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_aad_async.test_aad_list_entities.yaml new file mode 100644 index 000000000000..909c6c29730f --- /dev/null +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_aad_async.test_aad_list_entities.yaml @@ -0,0 +1,290 @@ +interactions: +- request: + body: '{"TableName": "uttable7ecc117c"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Content-Length: + - '32' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 17:33:40 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 17:33:40 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://fake_table_account.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#Tables/@Element","TableName":"uttable7ecc117c"}' + headers: + cache-control: no-cache + content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: Thu, 17 Jun 2021 17:33:41 GMT + location: https://fake_table_account.table.core.windows.net/Tables('uttable7ecc117c') + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 201 + message: Created + url: https://seankaneprim.table.core.windows.net/Tables +- request: + body: '{"TableName": "querytable7ecc117c"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Content-Length: + - '35' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 17:33:41 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 17:33:41 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://fake_table_account.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#Tables/@Element","TableName":"querytable7ecc117c"}' + headers: + cache-control: no-cache + content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: Thu, 17 Jun 2021 17:33:41 GMT + location: https://fake_table_account.table.core.windows.net/Tables('querytable7ecc117c') + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 201 + message: Created + url: https://seankaneprim.table.core.windows.net/Tables +- request: + body: '{"PartitionKey": "pk7ecc117c", "PartitionKey@odata.type": "Edm.String", + "RowKey": "rk7ecc117c1", "RowKey@odata.type": "Edm.String", "age": 39, "sex": + "male", "sex@odata.type": "Edm.String", "married": true, "deceased": false, + "ratio": 3.1, "ratio@odata.type": "Edm.Double", "evenratio": 3.0, "evenratio@odata.type": + "Edm.Double", "double": 5, "double@odata.type": "Edm.Double", "large": 933311100, + "Birthday": "1973-10-04T00:00:00.000000Z", "Birthday@odata.type": "Edm.DateTime", + "birthday": "1970-10-04T00:00:00.000000Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Content-Length: + - '712' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 17:33:41 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 17:33:41 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://fake_table_account.table.core.windows.net/querytable7ecc117c + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#querytable7ecc117c/@Element","odata.etag":"W/\"datetime''2021-06-17T17%3A33%3A42.0849287Z''\"","PartitionKey":"pk7ecc117c","RowKey":"rk7ecc117c1","Timestamp":"2021-06-17T17:33:42.0849287Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"double":5.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + headers: + cache-control: no-cache + content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: Thu, 17 Jun 2021 17:33:41 GMT + etag: W/"datetime'2021-06-17T17%3A33%3A42.0849287Z'" + location: https://fake_table_account.table.core.windows.net/querytable7ecc117c(PartitionKey='pk7ecc117c',RowKey='rk7ecc117c1') + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 201 + message: Created + url: https://seankaneprim.table.core.windows.net/querytable7ecc117c +- request: + body: '{"PartitionKey": "pk7ecc117c", "PartitionKey@odata.type": "Edm.String", + "RowKey": "rk7ecc117c12", "RowKey@odata.type": "Edm.String", "age": 39, "sex": + "male", "sex@odata.type": "Edm.String", "married": true, "deceased": false, + "ratio": 3.1, "ratio@odata.type": "Edm.Double", "evenratio": 3.0, "evenratio@odata.type": + "Edm.Double", "double": 5, "double@odata.type": "Edm.Double", "large": 933311100, + "Birthday": "1973-10-04T00:00:00.000000Z", "Birthday@odata.type": "Edm.DateTime", + "birthday": "1970-10-04T00:00:00.000000Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Content-Length: + - '713' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 17:33:41 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 17:33:41 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://fake_table_account.table.core.windows.net/querytable7ecc117c + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#querytable7ecc117c/@Element","odata.etag":"W/\"datetime''2021-06-17T17%3A33%3A42.2160229Z''\"","PartitionKey":"pk7ecc117c","RowKey":"rk7ecc117c12","Timestamp":"2021-06-17T17:33:42.2160229Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"double":5.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + headers: + cache-control: no-cache + content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: Thu, 17 Jun 2021 17:33:41 GMT + etag: W/"datetime'2021-06-17T17%3A33%3A42.2160229Z'" + location: https://fake_table_account.table.core.windows.net/querytable7ecc117c(PartitionKey='pk7ecc117c',RowKey='rk7ecc117c12') + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 201 + message: Created + url: https://seankaneprim.table.core.windows.net/querytable7ecc117c +- request: + body: null + headers: + Accept: + - application/json;odata=minimalmetadata + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 17:33:41 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 17:33:41 GMT + x-ms-version: + - '2019-02-02' + method: GET + uri: https://fake_table_account.table.core.windows.net/querytable7ecc117c() + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#querytable7ecc117c","value":[{"odata.etag":"W/\"datetime''2021-06-17T17%3A33%3A42.0849287Z''\"","PartitionKey":"pk7ecc117c","RowKey":"rk7ecc117c1","Timestamp":"2021-06-17T17:33:42.0849287Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"double":5.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"},{"odata.etag":"W/\"datetime''2021-06-17T17%3A33%3A42.2160229Z''\"","PartitionKey":"pk7ecc117c","RowKey":"rk7ecc117c12","Timestamp":"2021-06-17T17:33:42.2160229Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"double":5.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}]}' + headers: + cache-control: no-cache + content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: Thu, 17 Jun 2021 17:33:42 GMT + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 200 + message: OK + url: https://seankaneprim.table.core.windows.net/querytable7ecc117c() +- request: + body: null + headers: + Accept: + - application/json;odata=minimalmetadata + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 17:33:41 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 17:33:41 GMT + x-ms-version: + - '2019-02-02' + method: GET + uri: https://fake_table_account.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#Tables","value":[{"TableName":"querytable7ecc117c"},{"TableName":"uttable7ecc117c"}]}' + headers: + cache-control: no-cache + content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: Thu, 17 Jun 2021 17:33:42 GMT + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 200 + message: OK + url: https://seankaneprim.table.core.windows.net/Tables +- request: + body: null + headers: + Accept: + - application/json + Date: + - Thu, 17 Jun 2021 17:33:41 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 17:33:41 GMT + x-ms-version: + - '2019-02-02' + method: DELETE + uri: https://fake_table_account.table.core.windows.net/Tables('querytable7ecc117c') + response: + body: + string: '' + headers: + cache-control: no-cache + content-length: '0' + date: Thu, 17 Jun 2021 17:33:42 GMT + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 204 + message: No Content + url: https://seankaneprim.table.core.windows.net/Tables('querytable7ecc117c') +- request: + body: null + headers: + Accept: + - application/json + Date: + - Thu, 17 Jun 2021 17:33:41 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 17:33:41 GMT + x-ms-version: + - '2019-02-02' + method: DELETE + uri: https://fake_table_account.table.core.windows.net/Tables('uttable7ecc117c') + response: + body: + string: '' + headers: + cache-control: no-cache + content-length: '0' + date: Thu, 17 Jun 2021 17:33:42 GMT + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 204 + message: No Content + url: https://seankaneprim.table.core.windows.net/Tables('uttable7ecc117c') +version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_aad_async.test_aad_query_list_tables.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_aad_async.test_aad_query_list_tables.yaml new file mode 100644 index 000000000000..d4cf04d22eee --- /dev/null +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_aad_async.test_aad_query_list_tables.yaml @@ -0,0 +1,362 @@ +interactions: +- request: + body: '{"TableName": "table1c9861327"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Content-Length: + - '31' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 17:32:59 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 17:32:59 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://fake_table_account.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#Tables/@Element","TableName":"table1c9861327"}' + headers: + cache-control: no-cache + content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: Thu, 17 Jun 2021 17:33:00 GMT + location: https://fake_table_account.table.core.windows.net/Tables('table1c9861327') + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 201 + message: Created + url: https://seankaneprim.table.core.windows.net/Tables +- request: + body: '{"TableName": "table2c9861327"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Content-Length: + - '31' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 17:33:00 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 17:33:00 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://fake_table_account.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#Tables/@Element","TableName":"table2c9861327"}' + headers: + cache-control: no-cache + content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: Thu, 17 Jun 2021 17:33:00 GMT + location: https://fake_table_account.table.core.windows.net/Tables('table2c9861327') + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 201 + message: Created + url: https://seankaneprim.table.core.windows.net/Tables +- request: + body: '{"TableName": "table3c9861327"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Content-Length: + - '31' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 17:33:00 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 17:33:00 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://fake_table_account.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#Tables/@Element","TableName":"table3c9861327"}' + headers: + cache-control: no-cache + content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: Thu, 17 Jun 2021 17:33:00 GMT + location: https://fake_table_account.table.core.windows.net/Tables('table3c9861327') + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 201 + message: Created + url: https://seankaneprim.table.core.windows.net/Tables +- request: + body: '{"TableName": "table4c9861327"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Content-Length: + - '31' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 17:33:00 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 17:33:00 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://fake_table_account.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#Tables/@Element","TableName":"table4c9861327"}' + headers: + cache-control: no-cache + content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: Thu, 17 Jun 2021 17:33:00 GMT + location: https://fake_table_account.table.core.windows.net/Tables('table4c9861327') + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 201 + message: Created + url: https://seankaneprim.table.core.windows.net/Tables +- request: + body: null + headers: + Accept: + - application/json;odata=minimalmetadata + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 17:33:00 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 17:33:00 GMT + x-ms-version: + - '2019-02-02' + method: GET + uri: https://fake_table_account.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#Tables","value":[{"TableName":"table1c9861327"},{"TableName":"table2c9861327"},{"TableName":"table3c9861327"},{"TableName":"table4c9861327"}]}' + headers: + cache-control: no-cache + content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: Thu, 17 Jun 2021 17:33:00 GMT + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 200 + message: OK + url: https://seankaneprim.table.core.windows.net/Tables +- request: + body: null + headers: + Accept: + - application/json;odata=minimalmetadata + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 17:33:00 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 17:33:00 GMT + x-ms-version: + - '2019-02-02' + method: GET + uri: https://fake_table_account.table.core.windows.net/Tables?$filter=TableName%20eq%20'table2c9861327' + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#Tables","value":[{"TableName":"table2c9861327"}]}' + headers: + cache-control: no-cache + content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: Thu, 17 Jun 2021 17:33:01 GMT + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 200 + message: OK + url: https://seankaneprim.table.core.windows.net/Tables?$filter=TableName%20eq%20'table2c9861327' +- request: + body: null + headers: + Accept: + - application/json;odata=minimalmetadata + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 17:33:01 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 17:33:01 GMT + x-ms-version: + - '2019-02-02' + method: GET + uri: https://fake_table_account.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#Tables","value":[{"TableName":"table1c9861327"},{"TableName":"table2c9861327"},{"TableName":"table3c9861327"},{"TableName":"table4c9861327"}]}' + headers: + cache-control: no-cache + content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: Thu, 17 Jun 2021 17:33:01 GMT + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 200 + message: OK + url: https://seankaneprim.table.core.windows.net/Tables +- request: + body: null + headers: + Accept: + - application/json + Date: + - Thu, 17 Jun 2021 17:33:01 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 17:33:01 GMT + x-ms-version: + - '2019-02-02' + method: DELETE + uri: https://fake_table_account.table.core.windows.net/Tables('table1c9861327') + response: + body: + string: '' + headers: + cache-control: no-cache + content-length: '0' + date: Thu, 17 Jun 2021 17:33:01 GMT + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 204 + message: No Content + url: https://seankaneprim.table.core.windows.net/Tables('table1c9861327') +- request: + body: null + headers: + Accept: + - application/json + Date: + - Thu, 17 Jun 2021 17:33:01 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 17:33:01 GMT + x-ms-version: + - '2019-02-02' + method: DELETE + uri: https://fake_table_account.table.core.windows.net/Tables('table2c9861327') + response: + body: + string: '' + headers: + cache-control: no-cache + content-length: '0' + date: Thu, 17 Jun 2021 17:33:01 GMT + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 204 + message: No Content + url: https://seankaneprim.table.core.windows.net/Tables('table2c9861327') +- request: + body: null + headers: + Accept: + - application/json + Date: + - Thu, 17 Jun 2021 17:33:01 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 17:33:01 GMT + x-ms-version: + - '2019-02-02' + method: DELETE + uri: https://fake_table_account.table.core.windows.net/Tables('table3c9861327') + response: + body: + string: '' + headers: + cache-control: no-cache + content-length: '0' + date: Thu, 17 Jun 2021 17:33:01 GMT + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 204 + message: No Content + url: https://seankaneprim.table.core.windows.net/Tables('table3c9861327') +- request: + body: null + headers: + Accept: + - application/json + Date: + - Thu, 17 Jun 2021 17:33:01 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 17:33:01 GMT + x-ms-version: + - '2019-02-02' + method: DELETE + uri: https://fake_table_account.table.core.windows.net/Tables('table4c9861327') + response: + body: + string: '' + headers: + cache-control: no-cache + content-length: '0' + date: Thu, 17 Jun 2021 17:33:01 GMT + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 204 + message: No Content + url: https://seankaneprim.table.core.windows.net/Tables('table4c9861327') +version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_aad_async.test_aad_query_user_filter.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_aad_async.test_aad_query_user_filter.yaml new file mode 100644 index 000000000000..6c2469efa9aa --- /dev/null +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_aad_async.test_aad_query_user_filter.yaml @@ -0,0 +1,224 @@ +interactions: +- request: + body: '{"TableName": "uttablec9d21335"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Content-Length: + - '32' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 17:33:01 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 17:33:01 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://fake_table_account.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#Tables/@Element","TableName":"uttablec9d21335"}' + headers: + cache-control: no-cache + content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: Thu, 17 Jun 2021 17:33:03 GMT + location: https://fake_table_account.table.core.windows.net/Tables('uttablec9d21335') + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 201 + message: Created + url: https://seankaneprim.table.core.windows.net/Tables +- request: + body: '{"PartitionKey": "pkc9d21335", "PartitionKey@odata.type": "Edm.String", + "RowKey": "rkc9d21335", "RowKey@odata.type": "Edm.String", "age": 39, "sex": + "male", "sex@odata.type": "Edm.String", "married": true, "deceased": false, + "ratio": 3.1, "ratio@odata.type": "Edm.Double", "evenratio": 3.0, "evenratio@odata.type": + "Edm.Double", "double": 5, "double@odata.type": "Edm.Double", "large": 933311100, + "Birthday": "1973-10-04T00:00:00.000000Z", "Birthday@odata.type": "Edm.DateTime", + "birthday": "1970-10-04T00:00:00.000000Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Content-Length: + - '711' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 17:33:02 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 17:33:02 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://fake_table_account.table.core.windows.net/uttablec9d21335 + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#uttablec9d21335/@Element","odata.etag":"W/\"datetime''2021-06-17T17%3A33%3A03.7217316Z''\"","PartitionKey":"pkc9d21335","RowKey":"rkc9d21335","Timestamp":"2021-06-17T17:33:03.7217316Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"double":5.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + headers: + cache-control: no-cache + content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: Thu, 17 Jun 2021 17:33:03 GMT + etag: W/"datetime'2021-06-17T17%3A33%3A03.7217316Z'" + location: https://fake_table_account.table.core.windows.net/uttablec9d21335(PartitionKey='pkc9d21335',RowKey='rkc9d21335') + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 201 + message: Created + url: https://seankaneprim.table.core.windows.net/uttablec9d21335 +- request: + body: '{"PartitionKey": "pkc9d213351", "PartitionKey@odata.type": "Edm.String", + "RowKey": "rkc9d213351", "RowKey@odata.type": "Edm.String", "age": 49, "sex": + "female", "sex@odata.type": "Edm.String", "married": false, "deceased": true, + "ratio": 5.2, "ratio@odata.type": "Edm.Double", "evenratio": 6.0, "evenratio@odata.type": + "Edm.Double", "large": 39999011, "Birthday": "1993-04-01T00:00:00.000000Z", + "Birthday@odata.type": "Edm.DateTime", "birthday": "1990-04-01T00:00:00.000000Z", + "birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5LWJpbmFyeQ==", "binary@odata.type": + "Edm.Binary", "other": 40, "clsid": "c8da6455-213e-42d9-9b79-3f9149a57833", + "clsid@odata.type": "Edm.Guid"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Content-Length: + - '678' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 17:33:02 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 17:33:02 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://fake_table_account.table.core.windows.net/uttablec9d21335 + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#uttablec9d21335/@Element","odata.etag":"W/\"datetime''2021-06-17T17%3A33%3A03.8498214Z''\"","PartitionKey":"pkc9d213351","RowKey":"rkc9d213351","Timestamp":"2021-06-17T17:33:03.8498214Z","age":49,"sex":"female","married":false,"deceased":true,"ratio":5.2,"evenratio":6.0,"large":39999011,"Birthday@odata.type":"Edm.DateTime","Birthday":"1993-04-01T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1990-04-01T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5LWJpbmFyeQ==","other":40,"clsid@odata.type":"Edm.Guid","clsid":"c8da6455-213e-42d9-9b79-3f9149a57833"}' + headers: + cache-control: no-cache + content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: Thu, 17 Jun 2021 17:33:03 GMT + etag: W/"datetime'2021-06-17T17%3A33%3A03.8498214Z'" + location: https://fake_table_account.table.core.windows.net/uttablec9d21335(PartitionKey='pkc9d213351',RowKey='rkc9d213351') + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 201 + message: Created + url: https://seankaneprim.table.core.windows.net/uttablec9d21335 +- request: + body: null + headers: + Accept: + - application/json;odata=minimalmetadata + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 17:33:03 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 17:33:03 GMT + x-ms-version: + - '2019-02-02' + method: GET + uri: https://fake_table_account.table.core.windows.net/uttablec9d21335()?$filter=married%20eq%20true + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#uttablec9d21335","value":[{"odata.etag":"W/\"datetime''2021-06-17T17%3A33%3A03.7217316Z''\"","PartitionKey":"pkc9d21335","RowKey":"rkc9d21335","Timestamp":"2021-06-17T17:33:03.7217316Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"double":5.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}]}' + headers: + cache-control: no-cache + content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: Thu, 17 Jun 2021 17:33:03 GMT + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 200 + message: OK + url: https://seankaneprim.table.core.windows.net/uttablec9d21335()?$filter=married%20eq%20true +- request: + body: null + headers: + Accept: + - application/json;odata=minimalmetadata + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 17:33:03 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 17:33:03 GMT + x-ms-version: + - '2019-02-02' + method: GET + uri: https://fake_table_account.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#Tables","value":[{"TableName":"uttablec9d21335"}]}' + headers: + cache-control: no-cache + content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: Thu, 17 Jun 2021 17:33:03 GMT + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 200 + message: OK + url: https://seankaneprim.table.core.windows.net/Tables +- request: + body: null + headers: + Accept: + - application/json + Date: + - Thu, 17 Jun 2021 17:33:03 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 17:33:03 GMT + x-ms-version: + - '2019-02-02' + method: DELETE + uri: https://fake_table_account.table.core.windows.net/Tables('uttablec9d21335') + response: + body: + string: '' + headers: + cache-control: no-cache + content-length: '0' + date: Thu, 17 Jun 2021 17:33:04 GMT + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 204 + message: No Content + url: https://seankaneprim.table.core.windows.net/Tables('uttablec9d21335') +version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_aad_async.test_aad_service_properties.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_aad_async.test_aad_service_properties.yaml new file mode 100644 index 000000000000..4eb19ab1a90a --- /dev/null +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_aad_async.test_aad_service_properties.yaml @@ -0,0 +1,221 @@ +interactions: +- request: + body: '{"TableName": "pytableasyncdc7e1399"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Content-Length: + - '37' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 17:33:03 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 17:33:03 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://fake_table_account.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#Tables/@Element","TableName":"pytableasyncdc7e1399"}' + headers: + cache-control: no-cache + content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: Thu, 17 Jun 2021 17:33:04 GMT + location: https://fake_table_account.table.core.windows.net/Tables('pytableasyncdc7e1399') + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 201 + message: Created + url: https://seankaneprim.table.core.windows.net/Tables +- request: + body: null + headers: + Accept: + - application/xml + Date: + - Thu, 17 Jun 2021 17:33:04 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 17:33:04 GMT + x-ms-version: + - '2019-02-02' + method: GET + uri: https://fake_table_account.table.core.windows.net/?restype=service&comp=properties + response: + body: + string: "\uFEFF1.0falsetruefalsefalse1.0truetruetrue71.0truetruetrue5" + headers: + content-type: application/xml + date: Thu, 17 Jun 2021 17:33:04 GMT + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-ms-version: '2019-02-02' + status: + code: 200 + message: OK + url: https://seankaneprim.table.core.windows.net/?restype=service&comp=properties +- request: + body: ' + + 1.0falsefalsetruefalse' + headers: + Accept: + - application/xml + Content-Length: + - '251' + Content-Type: + - application/xml + Date: + - Thu, 17 Jun 2021 17:33:04 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 17:33:04 GMT + x-ms-version: + - '2019-02-02' + method: PUT + uri: https://fake_table_account.table.core.windows.net/?restype=service&comp=properties + response: + body: + string: '' + headers: + date: Thu, 17 Jun 2021 17:33:05 GMT + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-ms-version: '2019-02-02' + status: + code: 202 + message: Accepted + url: https://seankaneprim.table.core.windows.net/?restype=service&comp=properties +- request: + body: null + headers: + Accept: + - application/xml + Date: + - Thu, 17 Jun 2021 17:33:04 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 17:33:04 GMT + x-ms-version: + - '2019-02-02' + method: GET + uri: https://fake_table_account.table.core.windows.net/?restype=service&comp=properties + response: + body: + string: "\uFEFF1.0falsetruefalsefalse1.0truetruetrue71.0truetruetrue5" + headers: + content-type: application/xml + date: Thu, 17 Jun 2021 17:33:05 GMT + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-ms-version: '2019-02-02' + status: + code: 200 + message: OK + url: https://seankaneprim.table.core.windows.net/?restype=service&comp=properties +- request: + body: ' + + 1.0truetruetrue5' + headers: + Accept: + - application/xml + Content-Length: + - '271' + Content-Type: + - application/xml + Date: + - Thu, 17 Jun 2021 17:33:04 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 17:33:04 GMT + x-ms-version: + - '2019-02-02' + method: PUT + uri: https://fake_table_account.table.core.windows.net/?restype=service&comp=properties + response: + body: + string: '' + headers: + date: Thu, 17 Jun 2021 17:33:05 GMT + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-ms-version: '2019-02-02' + status: + code: 202 + message: Accepted + url: https://seankaneprim.table.core.windows.net/?restype=service&comp=properties +- request: + body: null + headers: + Accept: + - application/xml + Date: + - Thu, 17 Jun 2021 17:33:05 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 17:33:05 GMT + x-ms-version: + - '2019-02-02' + method: GET + uri: https://fake_table_account.table.core.windows.net/?restype=service&comp=properties + response: + body: + string: "\uFEFF1.0falsetruefalsefalse1.0truetruetrue71.0truetruetrue5" + headers: + content-type: application/xml + date: Thu, 17 Jun 2021 17:33:05 GMT + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-ms-version: '2019-02-02' + status: + code: 200 + message: OK + url: https://seankaneprim.table.core.windows.net/?restype=service&comp=properties +- request: + body: null + headers: + Accept: + - application/json + Date: + - Thu, 17 Jun 2021 17:33:05 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 17:33:05 GMT + x-ms-version: + - '2019-02-02' + method: DELETE + uri: https://fake_table_account.table.core.windows.net/Tables('pytableasyncdc7e1399') + response: + body: + string: '' + headers: + cache-control: no-cache + content-length: '0' + date: Thu, 17 Jun 2021 17:33:05 GMT + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 204 + message: No Content + url: https://seankaneprim.table.core.windows.net/Tables('pytableasyncdc7e1399') +version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_aad_async.test_aad_table_service_stats.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_aad_async.test_aad_table_service_stats.yaml new file mode 100644 index 000000000000..b17ad20e1972 --- /dev/null +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_aad_async.test_aad_table_service_stats.yaml @@ -0,0 +1,31 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/xml + Date: + - Thu, 17 Jun 2021 17:33:05 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 17:33:05 GMT + x-ms-version: + - '2019-02-02' + method: GET + uri: https://fake_table_account-secondary.table.core.windows.net/?restype=service&comp=stats + response: + body: + string: "\uFEFFliveThu,\ + \ 17 Jun 2021 17:28:41 GMT" + headers: + content-type: application/xml + date: Thu, 17 Jun 2021 17:33:07 GMT + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-ms-version: '2019-02-02' + status: + code: 200 + message: OK + url: https://seankaneprim-secondary.table.core.windows.net/?restype=service&comp=stats +version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_aad_async.test_create_table_aad.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_aad_async.test_create_table_aad.yaml new file mode 100644 index 000000000000..5c4061d0eb4e --- /dev/null +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_aad_async.test_create_table_aad.yaml @@ -0,0 +1,100 @@ +interactions: +- request: + body: '{"TableName": "pytableasync6d3510d7"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Content-Length: + - '37' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 15:30:49 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 15:30:49 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://fake_table_account.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#Tables/@Element","TableName":"pytableasync6d3510d7"}' + headers: + cache-control: no-cache + content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: Thu, 17 Jun 2021 15:30:51 GMT + location: https://fake_table_account.table.core.windows.net/Tables('pytableasync6d3510d7') + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 201 + message: Created + url: https://seankaneprim.table.core.windows.net/Tables +- request: + body: null + headers: + Accept: + - application/json;odata=minimalmetadata + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 15:30:50 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 15:30:50 GMT + x-ms-version: + - '2019-02-02' + method: GET + uri: https://fake_table_account.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#Tables","value":[{"TableName":"pytableasync6d3510d7"}]}' + headers: + cache-control: no-cache + content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: Thu, 17 Jun 2021 15:30:51 GMT + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 200 + message: OK + url: https://seankaneprim.table.core.windows.net/Tables +- request: + body: null + headers: + Accept: + - application/json + Date: + - Thu, 17 Jun 2021 15:30:51 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 15:30:51 GMT + x-ms-version: + - '2019-02-02' + method: DELETE + uri: https://fake_table_account.table.core.windows.net/Tables('pytableasync6d3510d7') + response: + body: + string: '' + headers: + cache-control: no-cache + content-length: '0' + date: Thu, 17 Jun 2021 15:30:51 GMT + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 204 + message: No Content + url: https://seankaneprim.table.core.windows.net/Tables('pytableasync6d3510d7') +version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_aad_async.test_insert_entity_dictionary.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_aad_async.test_insert_entity_dictionary.yaml new file mode 100644 index 000000000000..0e724eb5907a --- /dev/null +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_aad_async.test_insert_entity_dictionary.yaml @@ -0,0 +1,145 @@ +interactions: +- request: + body: '{"TableName": "uttable8af149d"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Content-Length: + - '31' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 15:30:51 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 15:30:51 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://fake_table_account.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#Tables/@Element","TableName":"uttable8af149d"}' + headers: + cache-control: no-cache + content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: Thu, 17 Jun 2021 15:30:52 GMT + location: https://fake_table_account.table.core.windows.net/Tables('uttable8af149d') + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 201 + message: Created + url: https://seankaneprim.table.core.windows.net/Tables +- request: + body: '{"PartitionKey": "pk8af149d", "PartitionKey@odata.type": "Edm.String", + "RowKey": "rk8af149d", "RowKey@odata.type": "Edm.String", "age": 39, "sex": + "male", "sex@odata.type": "Edm.String", "married": true, "deceased": false, + "ratio": 3.1, "ratio@odata.type": "Edm.Double", "evenratio": 3.0, "evenratio@odata.type": + "Edm.Double", "double": 5, "double@odata.type": "Edm.Double", "large": 933311100, + "Birthday": "1973-10-04T00:00:00.000000Z", "Birthday@odata.type": "Edm.DateTime", + "birthday": "1970-10-04T00:00:00.000000Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Content-Length: + - '709' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 15:30:52 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 15:30:52 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://fake_table_account.table.core.windows.net/uttable8af149d + response: + body: + string: '{"odata.error":{"code":"AuthorizationPermissionMismatch","message":{"lang":"en-US","value":"This + request is not authorized to perform this operation using this permission.\nRequestId:cb245a47-f002-0018-448d-630543000000\nTime:2021-06-17T15:30:53.1276408Z"}}}' + headers: + cache-control: no-cache + content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: Thu, 17 Jun 2021 15:30:52 GMT + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 403 + message: Forbidden + url: https://seankaneprim.table.core.windows.net/uttable8af149d +- request: + body: null + headers: + Accept: + - application/json;odata=minimalmetadata + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 15:30:52 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 15:30:52 GMT + x-ms-version: + - '2019-02-02' + method: GET + uri: https://fake_table_account.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#Tables","value":[{"TableName":"uttable8af149d"}]}' + headers: + cache-control: no-cache + content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: Thu, 17 Jun 2021 15:30:52 GMT + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 200 + message: OK + url: https://seankaneprim.table.core.windows.net/Tables +- request: + body: null + headers: + Accept: + - application/json + Date: + - Thu, 17 Jun 2021 15:30:52 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 15:30:52 GMT + x-ms-version: + - '2019-02-02' + method: DELETE + uri: https://fake_table_account.table.core.windows.net/Tables('uttable8af149d') + response: + body: + string: '' + headers: + cache-control: no-cache + content-length: '0' + date: Thu, 17 Jun 2021 15:30:52 GMT + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 204 + message: No Content + url: https://seankaneprim.table.core.windows.net/Tables('uttable8af149d') +version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_aad_async.test_merge_entity.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_aad_async.test_merge_entity.yaml new file mode 100644 index 000000000000..508fead5bec3 --- /dev/null +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_aad_async.test_merge_entity.yaml @@ -0,0 +1,221 @@ +interactions: +- request: + body: '{"TableName": "uttable2cb20f83"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Content-Length: + - '32' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 17:38:15 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 17:38:15 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://fake_table_account.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#Tables/@Element","TableName":"uttable2cb20f83"}' + headers: + cache-control: no-cache + content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: Thu, 17 Jun 2021 17:38:17 GMT + location: https://fake_table_account.table.core.windows.net/Tables('uttable2cb20f83') + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 201 + message: Created + url: https://seankaneprim.table.core.windows.net/Tables +- request: + body: '{"PartitionKey": "pk2cb20f83", "PartitionKey@odata.type": "Edm.String", + "RowKey": "rk2cb20f83", "RowKey@odata.type": "Edm.String", "age": 39, "sex": + "male", "sex@odata.type": "Edm.String", "married": true, "deceased": false, + "ratio": 3.1, "ratio@odata.type": "Edm.Double", "evenratio": 3.0, "evenratio@odata.type": + "Edm.Double", "double": 5, "double@odata.type": "Edm.Double", "large": 933311100, + "Birthday": "1973-10-04T00:00:00.000000Z", "Birthday@odata.type": "Edm.DateTime", + "birthday": "1970-10-04T00:00:00.000000Z", "birthday@odata.type": "Edm.DateTime", + "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": + "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Content-Length: + - '711' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 17:38:16 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 17:38:16 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://fake_table_account.table.core.windows.net/uttable2cb20f83 + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#uttable2cb20f83/@Element","odata.etag":"W/\"datetime''2021-06-17T17%3A38%3A17.8076186Z''\"","PartitionKey":"pk2cb20f83","RowKey":"rk2cb20f83","Timestamp":"2021-06-17T17:38:17.8076186Z","age":39,"sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"double":5.0,"large":933311100,"Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}' + headers: + cache-control: no-cache + content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: Thu, 17 Jun 2021 17:38:17 GMT + etag: W/"datetime'2021-06-17T17%3A38%3A17.8076186Z'" + location: https://fake_table_account.table.core.windows.net/uttable2cb20f83(PartitionKey='pk2cb20f83',RowKey='rk2cb20f83') + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 201 + message: Created + url: https://seankaneprim.table.core.windows.net/uttable2cb20f83 +- request: + body: '{"PartitionKey": "pk2cb20f83", "PartitionKey@odata.type": "Edm.String", + "RowKey": "rk2cb20f83", "RowKey@odata.type": "Edm.String", "age": "abc", "age@odata.type": + "Edm.String", "sex": "female", "sex@odata.type": "Edm.String", "sign": "aquarius", + "sign@odata.type": "Edm.String", "birthday": "1991-10-04T00:00:00.000000Z", + "birthday@odata.type": "Edm.DateTime"}' + headers: + Accept: + - application/json + Content-Length: + - '360' + Content-Type: + - application/json + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 17:38:17 GMT + If-Match: + - '*' + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 17:38:17 GMT + x-ms-version: + - '2019-02-02' + method: PATCH + uri: https://fake_table_account.table.core.windows.net/uttable2cb20f83(PartitionKey='pk2cb20f83',RowKey='rk2cb20f83') + response: + body: + string: '' + headers: + cache-control: no-cache + content-length: '0' + date: Thu, 17 Jun 2021 17:38:17 GMT + etag: W/"datetime'2021-06-17T17%3A38%3A17.9330141Z'" + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 204 + message: No Content + url: https://seankaneprim.table.core.windows.net/uttable2cb20f83(PartitionKey='pk2cb20f83',RowKey='rk2cb20f83') +- request: + body: null + headers: + Accept: + - application/json;odata=minimalmetadata + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 17:38:17 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 17:38:17 GMT + x-ms-version: + - '2019-02-02' + method: GET + uri: https://fake_table_account.table.core.windows.net/uttable2cb20f83(PartitionKey='pk2cb20f83',RowKey='rk2cb20f83') + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#uttable2cb20f83/@Element","odata.etag":"W/\"datetime''2021-06-17T17%3A38%3A17.9330141Z''\"","PartitionKey":"pk2cb20f83","RowKey":"rk2cb20f83","Timestamp":"2021-06-17T17:38:17.9330141Z","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","age":"abc","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","birthday@odata.type":"Edm.DateTime","birthday":"1991-10-04T00:00:00Z","clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833","deceased":false,"double":5.0,"evenratio":3.0,"large":933311100,"married":true,"other":20,"ratio":3.1,"sex":"female","sign":"aquarius"}' + headers: + cache-control: no-cache + content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: Thu, 17 Jun 2021 17:38:17 GMT + etag: W/"datetime'2021-06-17T17%3A38%3A17.9330141Z'" + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 200 + message: OK + url: https://seankaneprim.table.core.windows.net/uttable2cb20f83(PartitionKey='pk2cb20f83',RowKey='rk2cb20f83') +- request: + body: null + headers: + Accept: + - application/json;odata=minimalmetadata + DataServiceVersion: + - '3.0' + Date: + - Thu, 17 Jun 2021 17:38:17 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 17:38:17 GMT + x-ms-version: + - '2019-02-02' + method: GET + uri: https://fake_table_account.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#Tables","value":[{"TableName":"uttable2cb20f83"}]}' + headers: + cache-control: no-cache + content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: Thu, 17 Jun 2021 17:38:17 GMT + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 200 + message: OK + url: https://seankaneprim.table.core.windows.net/Tables +- request: + body: null + headers: + Accept: + - application/json + Date: + - Thu, 17 Jun 2021 17:38:17 GMT + User-Agent: + - azsdk-python-data-tables/12.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Jun 2021 17:38:17 GMT + x-ms-version: + - '2019-02-02' + method: DELETE + uri: https://fake_table_account.table.core.windows.net/Tables('uttable2cb20f83') + response: + body: + string: '' + headers: + cache-control: no-cache + content-length: '0' + date: Thu, 17 Jun 2021 17:38:17 GMT + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 204 + message: No Content + url: https://seankaneprim.table.core.windows.net/Tables('uttable2cb20f83') +version: 1 diff --git a/sdk/tables/azure-data-tables/tests/test_table_aad.py b/sdk/tables/azure-data-tables/tests/test_table_aad.py new file mode 100644 index 000000000000..438aa18ebbbb --- /dev/null +++ b/sdk/tables/azure-data-tables/tests/test_table_aad.py @@ -0,0 +1,310 @@ +# coding: utf-8 + +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- +import pytest +from datetime import datetime +import sys + +from devtools_testutils import AzureTestCase + +from azure.core.exceptions import HttpResponseError, ResourceNotFoundError +from azure.data.tables import ( + TableServiceClient, + TableClient, + TableAnalyticsLogging, + TableMetrics, + TableRetentionPolicy, + EntityProperty, + EdmType, + TableEntity, + TransactionOperation, + UpdateMode, +) + +from _shared.testcase import TableTestCase +from preparers import tables_decorator, tables_decorator + +# ------------------------------------------------------------------------------ + + +class StorageTableTest(AzureTestCase, TableTestCase): + @tables_decorator + def test_aad_create_table(self, tables_storage_account_name): + try: + account_url = self.account_url(tables_storage_account_name, "table") + ts = TableServiceClient(credential=self.get_token_credential(), endpoint=account_url) + table_name = self._get_table_reference() + ts.create_table(table_name) + + if table_name not in [t.name for t in ts.list_tables()]: + raise AssertionError("Table could not be found") + + ts.delete_table(table_name) + if table_name in [t.name for t in ts.list_tables()]: + raise AssertionError("Table was not deleted") + + finally: + ts.delete_table(table_name) + + @tables_decorator + def test_aad_query_list_tables(self, tables_storage_account_name): + try: + account_url = self.account_url(tables_storage_account_name, "table") + ts = TableServiceClient(credential=self.get_token_credential(), endpoint=account_url) + table_name1 = self._get_table_reference(prefix="table1") + table_name2 = self._get_table_reference(prefix="table2") + table_name3 = self._get_table_reference(prefix="table3") + table_name4 = self._get_table_reference(prefix="table4") + ts.create_table(table_name1) + ts.create_table(table_name2) + ts.create_table(table_name3) + ts.create_table(table_name4) + + count = 0 + for table in ts.list_tables(): + count += 1 + + assert count == 4 + + query_filter = "TableName eq '{}'".format(table_name2) + count = 0 + for table in ts.query_tables(query_filter): + count += 1 + assert table.name == table_name2 + assert count == 1 + + finally: + for table in ts.list_tables(): + ts.delete_table(table.name) + + @tables_decorator + def test_aad_create_table_tc(self, tables_storage_account_name): + try: + account_url = self.account_url(tables_storage_account_name, "table") + ts = TableServiceClient(credential=self.get_token_credential(), endpoint=account_url) + table_name = self._get_table_reference() + table_client = TableClient( + credential=self.get_token_credential(), endpoint=account_url, table_name=table_name + ) + table_client.create_table() + + if table_name not in [t.name for t in ts.list_tables()]: + raise AssertionError("Table could not be found") + + table_client.delete_table() + if table_name in [t.name for t in ts.list_tables()]: + raise AssertionError("Table was not deleted") + + finally: + ts.delete_table(table_name) + + @tables_decorator + def test_aad_service_properties(self, tables_storage_account_name): + try: + account_url = self.account_url(tables_storage_account_name, "table") + ts = TableServiceClient(credential=self.get_token_credential(), endpoint=account_url) + table_name = self._get_table_reference() + created = ts.create_table(table_name) + + assert created.table_name == table_name + + properties = ts.get_service_properties() + ts.set_service_properties(analytics_logging=TableAnalyticsLogging(write=True)) + # have to wait for return to service + p = ts.get_service_properties() + # have to wait for return to service + ts.set_service_properties( + minute_metrics=TableMetrics( + enabled=True, include_apis=True, retention_policy=TableRetentionPolicy(enabled=True, days=5) + ) + ) + + ps = ts.get_service_properties() + finally: + ts.delete_table(table_name) + + @tables_decorator + def test_aad_table_service_stats(self, tables_storage_account_name): + tsc = TableServiceClient( + self.account_url(tables_storage_account_name, "table"), credential=self.get_token_credential() + ) + stats = tsc.get_service_stats(raw_response_hook=self.override_response_body_with_live_status) + self._assert_stats_default(stats) + + @tables_decorator + def test_aad_insert_entity_dictionary(self, tables_storage_account_name): + + self._set_up(tables_storage_account_name, self.get_token_credential()) + try: + entity = self._create_random_entity_dict() + + resp = self.table.create_entity(entity=entity) + + self._assert_valid_metadata(resp) + finally: + self._tear_down() + + @tables_decorator + def test_aad_query_user_filter(self, tables_storage_account_name): + + self._set_up(tables_storage_account_name, self.get_token_credential()) + try: + entity, _ = self._insert_two_opposite_entities() + + entities = self.table.query_entities("married eq @my_param", parameters={"my_param": entity["married"]}) + + assert entities is not None + length = 0 + for e in entities: + self._assert_default_entity(e) + length += 1 + + assert length == 1 + finally: + self._tear_down() + + @pytest.mark.skipif(sys.version_info < (3, 0), reason="requires Python3") + @tables_decorator + def test_aad_batch_all_operations_together(self, tables_storage_account_name): + + self._set_up(tables_storage_account_name, self.get_token_credential()) + try: + + entity = TableEntity() + entity["PartitionKey"] = "003" + entity["RowKey"] = "batch_all_operations_together-1" + entity["test"] = EntityProperty(True, EdmType.BOOLEAN) + entity["test2"] = "value" + entity["test3"] = 3 + entity["test4"] = EntityProperty(1234567890, EdmType.INT32) + entity["test5"] = datetime.utcnow() + + self.table.create_entity(entity) + entity["RowKey"] = "batch_all_operations_together-2" + self.table.create_entity(entity) + entity["RowKey"] = "batch_all_operations_together-3" + self.table.create_entity(entity) + entity["RowKey"] = "batch_all_operations_together-4" + self.table.create_entity(entity) + transaction_count = 0 + + batch = [] + entity["RowKey"] = "batch_all_operations_together" + batch.append((TransactionOperation.CREATE, entity.copy())) + transaction_count += 1 + + entity["RowKey"] = "batch_all_operations_together-1" + batch.append((TransactionOperation.DELETE, entity.copy())) + transaction_count += 1 + + entity["RowKey"] = "batch_all_operations_together-2" + entity["test3"] = 10 + batch.append((TransactionOperation.UPDATE, entity.copy())) + transaction_count += 1 + + entity["RowKey"] = "batch_all_operations_together-3" + entity["test3"] = 100 + batch.append((TransactionOperation.UPDATE, entity.copy(), {"mode": UpdateMode.REPLACE})) + transaction_count += 1 + + entity["RowKey"] = "batch_all_operations_together-4" + entity["test3"] = 10 + batch.append((TransactionOperation.UPSERT, entity.copy())) + transaction_count += 1 + + entity["RowKey"] = "batch_all_operations_together-5" + batch.append((TransactionOperation.UPSERT, entity.copy(), {"mode": UpdateMode.REPLACE})) + transaction_count += 1 + + transaction_result = self.table.submit_transaction(batch) + + self._assert_valid_batch_transaction(transaction_result, transaction_count) + assert "etag" in transaction_result[0] + assert "etag" not in transaction_result[1] + assert "etag" in transaction_result[2] + assert "etag" in transaction_result[3] + assert "etag" in transaction_result[4] + assert "etag" in transaction_result[5] + + entities = list(self.table.query_entities("PartitionKey eq '003'")) + assert 5 == len(entities) + finally: + self._tear_down() + + @tables_decorator + def test_aad_access_policy_error(self, tables_storage_account_name): + account_url = self.account_url(tables_storage_account_name, "table") + table_name = self._get_table_reference() + table_client = TableClient(credential=self.get_token_credential(), endpoint=account_url, table_name=table_name) + + with pytest.raises(HttpResponseError): + table_client.get_table_access_policy() + + with pytest.raises(HttpResponseError): + table_client.set_table_access_policy(signed_identifiers={}) + + @tables_decorator + def test_aad_delete_entities(self, tables_storage_account_name): + self._set_up(tables_storage_account_name, self.get_token_credential()) + try: + entity, _ = self._insert_random_entity() + self.table.delete_entity(entity) + + with pytest.raises(ResourceNotFoundError): + self.table.get_entity(entity["PartitionKey"], entity["RowKey"]) + + finally: + self._tear_down() + + @tables_decorator + def test_aad_query_user_filter(self, tables_storage_account_name): + + self._set_up(tables_storage_account_name, self.get_token_credential()) + try: + entity, _ = self._insert_two_opposite_entities() + + entities = self.table.query_entities("married eq @my_param", parameters={"my_param": entity["married"]}) + + assert entities is not None + length = 0 + for e in entities: + self._assert_default_entity(e) + length += 1 + + assert length == 1 + finally: + self._tear_down() + + @tables_decorator + def test_aad_list_entities(self, tables_storage_account_name): + + self._set_up(tables_storage_account_name, self.get_token_credential()) + try: + table = self._create_query_table(2) + + entities = list(table.list_entities()) + + assert len(entities) == 2 + for entity in entities: + self._assert_default_entity(entity) + finally: + self._tear_down() + + @tables_decorator + def test_merge_entity(self, tables_storage_account_name): + self._set_up(tables_storage_account_name, self.get_token_credential()) + try: + entity, _ = self._insert_random_entity() + + sent_entity = self._create_updated_entity_dict(entity["PartitionKey"], entity["RowKey"]) + resp = self.table.update_entity(mode=UpdateMode.MERGE, entity=sent_entity) + + self._assert_valid_metadata(resp) + received_entity = self.table.get_entity(entity["PartitionKey"], entity["RowKey"]) + self._assert_merged_entity(received_entity) + finally: + self._tear_down() diff --git a/sdk/tables/azure-data-tables/tests/test_table_aad_async.py b/sdk/tables/azure-data-tables/tests/test_table_aad_async.py new file mode 100644 index 000000000000..afc65fd29ce9 --- /dev/null +++ b/sdk/tables/azure-data-tables/tests/test_table_aad_async.py @@ -0,0 +1,309 @@ +# coding: utf-8 + +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- +import pytest +from datetime import datetime +import sys + +from devtools_testutils import AzureTestCase + +from azure.data.tables.aio import TableServiceClient, TableClient + +from azure.core.exceptions import HttpResponseError, ResourceNotFoundError +from azure.data.tables import ( + TableAnalyticsLogging, + TableMetrics, + TableRetentionPolicy, + EntityProperty, + EdmType, + TableEntity, + TransactionOperation, + UpdateMode, +) + +from _shared.asynctestcase import AsyncTableTestCase +from async_preparers import tables_decorator_async + + +class TableTestAsync(AzureTestCase, AsyncTableTestCase): + @tables_decorator_async + async def test_aad_create_table(self, tables_storage_account_name): + try: + account_url = self.account_url(tables_storage_account_name, "table") + ts = TableServiceClient(credential=self.get_token_credential(), endpoint=account_url) + table_name = self._get_table_reference() + await ts.create_table(table_name) + + if table_name not in [t.name async for t in ts.list_tables()]: + raise AssertionError("Table could not be found") + + await ts.delete_table(table_name) + if table_name in [t.name async for t in ts.list_tables()]: + raise AssertionError("Table was not deleted") + + finally: + await ts.delete_table(table_name) + + @tables_decorator_async + async def test_aad_query_list_tables(self, tables_storage_account_name): + try: + account_url = self.account_url(tables_storage_account_name, "table") + ts = TableServiceClient(credential=self.get_token_credential(), endpoint=account_url) + table_name1 = self._get_table_reference(prefix="table1") + table_name2 = self._get_table_reference(prefix="table2") + table_name3 = self._get_table_reference(prefix="table3") + table_name4 = self._get_table_reference(prefix="table4") + await ts.create_table(table_name1) + await ts.create_table(table_name2) + await ts.create_table(table_name3) + await ts.create_table(table_name4) + + count = 0 + async for table in ts.list_tables(): + count += 1 + + assert count == 4 + + query_filter = "TableName eq '{}'".format(table_name2) + count = 0 + async for table in ts.query_tables(query_filter): + count += 1 + assert table.name == table_name2 + assert count == 1 + + finally: + async for table in ts.list_tables(): + await ts.delete_table(table.name) + + @tables_decorator_async + async def test_aad_create_table_tc(self, tables_storage_account_name): + try: + account_url = self.account_url(tables_storage_account_name, "table") + ts = TableServiceClient(credential=self.get_token_credential(), endpoint=account_url) + table_name = self._get_table_reference() + table_client = TableClient( + credential=self.get_token_credential(), endpoint=account_url, table_name=table_name + ) + await table_client.create_table() + + if table_name not in [t.name async for t in ts.list_tables()]: + raise AssertionError("Table could not be found") + + await table_client.delete_table() + if table_name in [t.name async for t in ts.list_tables()]: + raise AssertionError("Table was not deleted") + + finally: + await ts.delete_table(table_name) + + @tables_decorator_async + async def test_aad_service_properties(self, tables_storage_account_name): + try: + account_url = self.account_url(tables_storage_account_name, "table") + ts = TableServiceClient(credential=self.get_token_credential(), endpoint=account_url) + table_name = self._get_table_reference() + created = await ts.create_table(table_name) + + assert created.table_name == table_name + + properties = await ts.get_service_properties() + await ts.set_service_properties(analytics_logging=TableAnalyticsLogging(write=True)) + # have to wait async for return to service + p = await ts.get_service_properties() + # have to wait async for return to service + await ts.set_service_properties( + minute_metrics=TableMetrics( + enabled=True, include_apis=True, retention_policy=TableRetentionPolicy(enabled=True, days=5) + ) + ) + + ps = await ts.get_service_properties() + finally: + await ts.delete_table(table_name) + + @tables_decorator_async + async def test_aad_table_service_stats(self, tables_storage_account_name): + tsc = TableServiceClient( + self.account_url(tables_storage_account_name, "table"), credential=self.get_token_credential() + ) + stats = await tsc.get_service_stats(raw_response_hook=self.override_response_body_with_live_status) + self._assert_stats_default(stats) + + @tables_decorator_async + async def test_aad_insert_entity_dictionary(self, tables_storage_account_name): + + await self._set_up(tables_storage_account_name, self.get_token_credential()) + try: + entity = self._create_random_entity_dict() + resp = await self.table.create_entity(entity=entity) + + self._assert_valid_metadata(resp) + finally: + await self._tear_down() + + @tables_decorator_async + async def test_aad_query_user_filter(self, tables_storage_account_name): + + await self._set_up(tables_storage_account_name, self.get_token_credential()) + try: + entity, _ = await self._insert_two_opposite_entities() + + entities = self.table.query_entities("married eq @my_param", parameters={"my_param": entity["married"]}) + + assert entities is not None + length = 0 + async for e in entities: + self._assert_default_entity(e) + length += 1 + + assert length == 1 + finally: + await self._tear_down() + + @pytest.mark.skipif(sys.version_info < (3, 0), reason="requires Python3") + @tables_decorator_async + async def test_aad_batch_all_operations_together(self, tables_storage_account_name): + await self._set_up(tables_storage_account_name, self.get_token_credential()) + try: + + entity = TableEntity() + entity["PartitionKey"] = "003" + entity["RowKey"] = "batch_all_operations_together-1" + entity["test"] = EntityProperty(True, EdmType.BOOLEAN) + entity["test2"] = "value" + entity["test3"] = 3 + entity["test4"] = EntityProperty(1234567890, EdmType.INT32) + entity["test5"] = datetime.utcnow() + + await self.table.create_entity(entity) + entity["RowKey"] = "batch_all_operations_together-2" + await self.table.create_entity(entity) + entity["RowKey"] = "batch_all_operations_together-3" + await self.table.create_entity(entity) + entity["RowKey"] = "batch_all_operations_together-4" + await self.table.create_entity(entity) + transaction_count = 0 + + batch = [] + entity["RowKey"] = "batch_all_operations_together" + batch.append((TransactionOperation.CREATE, entity.copy())) + transaction_count += 1 + + entity["RowKey"] = "batch_all_operations_together-1" + batch.append((TransactionOperation.DELETE, entity.copy())) + transaction_count += 1 + + entity["RowKey"] = "batch_all_operations_together-2" + entity["test3"] = 10 + batch.append((TransactionOperation.UPDATE, entity.copy())) + transaction_count += 1 + + entity["RowKey"] = "batch_all_operations_together-3" + entity["test3"] = 100 + batch.append((TransactionOperation.UPDATE, entity.copy(), {"mode": UpdateMode.REPLACE})) + transaction_count += 1 + + entity["RowKey"] = "batch_all_operations_together-4" + entity["test3"] = 10 + batch.append((TransactionOperation.UPSERT, entity.copy())) + transaction_count += 1 + + entity["RowKey"] = "batch_all_operations_together-5" + batch.append((TransactionOperation.UPSERT, entity.copy(), {"mode": UpdateMode.REPLACE})) + transaction_count += 1 + + transaction_result = await self.table.submit_transaction(batch) + + self._assert_valid_batch_transaction(transaction_result, transaction_count) + assert "etag" in transaction_result[0] + assert "etag" not in transaction_result[1] + assert "etag" in transaction_result[2] + assert "etag" in transaction_result[3] + assert "etag" in transaction_result[4] + assert "etag" in transaction_result[5] + + entity_count = 0 + async for e in self.table.query_entities("PartitionKey eq '003'"): + entity_count += 1 + assert 5 == entity_count + finally: + await self._tear_down() + + @tables_decorator_async + async def test_aad_access_policy_error(self, tables_storage_account_name): + account_url = self.account_url(tables_storage_account_name, "table") + table_name = self._get_table_reference() + table_client = TableClient(credential=self.get_token_credential(), endpoint=account_url, table_name=table_name) + + with pytest.raises(HttpResponseError): + await table_client.get_table_access_policy() + + with pytest.raises(HttpResponseError): + await table_client.set_table_access_policy(signed_identifiers={}) + + @tables_decorator_async + async def test_aad_delete_entities(self, tables_storage_account_name): + await self._set_up(tables_storage_account_name, self.get_token_credential()) + try: + entity, _ = await self._insert_random_entity() + await self.table.delete_entity(entity) + + with pytest.raises(ResourceNotFoundError): + await self.table.get_entity(entity["PartitionKey"], entity["RowKey"]) + + finally: + await self._tear_down() + + @tables_decorator_async + async def test_aad_query_user_filter(self, tables_storage_account_name): + + await self._set_up(tables_storage_account_name, self.get_token_credential()) + try: + entity, _ = await self._insert_two_opposite_entities() + + entities = self.table.query_entities("married eq @my_param", parameters={"my_param": entity["married"]}) + + assert entities is not None + length = 0 + async for e in entities: + self._assert_default_entity(e) + length += 1 + + assert length == 1 + finally: + await self._tear_down() + + @tables_decorator_async + async def test_aad_list_entities(self, tables_storage_account_name): + await self._set_up(tables_storage_account_name, self.get_token_credential()) + try: + table = await self._create_query_table(2) + + entities = table.list_entities() + + count = 0 + async for entity in entities: + self._assert_default_entity(entity) + count += 1 + assert count == 2 + finally: + await self._tear_down() + + @tables_decorator_async + async def test_merge_entity(self, tables_storage_account_name): + await self._set_up(tables_storage_account_name, self.get_token_credential()) + try: + entity, _ = await self._insert_random_entity() + + sent_entity = self._create_updated_entity_dict(entity["PartitionKey"], entity["RowKey"]) + resp = await self.table.update_entity(mode=UpdateMode.MERGE, entity=sent_entity) + + self._assert_valid_metadata(resp) + received_entity = await self.table.get_entity(entity["PartitionKey"], entity["RowKey"]) + self._assert_merged_entity(received_entity) + finally: + await self._tear_down() diff --git a/sdk/tables/azure-data-tables/tests/test_table_service_stats.py b/sdk/tables/azure-data-tables/tests/test_table_service_stats.py index 9015d974e9b7..6658e702d677 100644 --- a/sdk/tables/azure-data-tables/tests/test_table_service_stats.py +++ b/sdk/tables/azure-data-tables/tests/test_table_service_stats.py @@ -9,25 +9,9 @@ from _shared.testcase import TableTestCase from preparers import tables_decorator -SERVICE_UNAVAILABLE_RESP_BODY = 'unavailable ' - -SERVICE_LIVE_RESP_BODY = 'liveWed, 19 Jan 2021 22:28:43 GMT ' - # --Test Class ----------------------------------------------------------------- class TableServiceStatsTest(AzureTestCase, TableTestCase): - @staticmethod - def override_response_body_with_unavailable_status(response): - response.http_response.text = lambda _: SERVICE_UNAVAILABLE_RESP_BODY - - @staticmethod - def override_response_body_with_live_status(response): - response.http_response.text = lambda _: SERVICE_LIVE_RESP_BODY - # --Test cases per service --------------------------------------- @tables_decorator def test_table_service_stats_f(self, tables_storage_account_name, tables_primary_storage_account_key): diff --git a/sdk/tables/test-resources.json b/sdk/tables/test-resources.json index 8cfc1e35bfe0..1658eecf704d 100644 --- a/sdk/tables/test-resources.json +++ b/sdk/tables/test-resources.json @@ -4,10 +4,18 @@ "parameters": { "baseName": { "type": "String" + }, + "testApplicationOid": { + "type": "string", + "metadata": { + "description": "The principal to assign the role to. This is application object id." + } } }, "variables": { "mgmtApiVersion": "2019-04-01", + "authorizationApiVersion": "2018-09-01-preview", + "blobDataContributorRoleId": "[concat('/subscriptions/', subscription().subscriptionId, '/providers/Microsoft.Authorization/roleDefinitions/0a9a7e1f-b9d0-4cc4-a60d-0319b160aaa3')]", "location": "[resourceGroup().location]", "primaryAccountName": "[concat(parameters('baseName'), 'prim')]", "encryption": { @@ -29,6 +37,15 @@ } }, "resources": [ + { + "type": "Microsoft.Authorization/roleAssignments", + "apiVersion": "[variables('authorizationApiVersion')]", + "name": "[guid(concat('tableDataContributorRoleId', resourceGroup().id))]", + "properties": { + "roleDefinitionId": "[variables('blobDataContributorRoleId')]", + "principalId": "[parameters('testApplicationOid')]" + } + }, { "type": "Microsoft.Storage/storageAccounts", "apiVersion": "[variables('mgmtApiVersion')]",