[Tabes] Allow empty strings as partition and row keys (#18586)

* Allow empty strings as partition and row keys

* Update changelog

* Add transaction test
This commit is contained in:
Jose Manuel Heredia Hidalgo 2021-11-09 10:45:07 -08:00 коммит произвёл GitHub
Родитель 6f833a8708
Коммит 8d8f718044
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
12 изменённых файлов: 1269 добавлений и 8 удалений

Просмотреть файл

@ -17,6 +17,7 @@
- Issue #17407 - Correctly handle etag in select filter. [#18211](https://github.com/Azure/azure-sdk-for-js/pull/18211)
- Issue #18079 - Correctly handle creating entities with properties containing empty strings "". Fixes Insert throws "Unknown EDM type object" error with property value { value: "", type: "String" }. [#18211](https://github.com/Azure/azure-sdk-for-js/pull/18211)
- Issue #18148 - Correctly deserialize Decimal numbers checking for isSafeInteger. Fixes listEntities always returns an Int32 type for a value of "1.23456789012346e+24". [#18211](https://github.com/Azure/azure-sdk-for-js/pull/18211)
- Issue #18521 - `upsertEntity` doesn't work with "" for partition or row keys. [#18586](https://github.com/Azure/azure-sdk-for-js/pull/18586)
### Other Changes

Просмотреть файл

@ -0,0 +1,130 @@
{
"recordings": [
{
"method": "POST",
"url": "https://fakeaccount.table.core.windows.net/Tables",
"query": {},
"requestBody": "{\"TableName\":\"batchTableTestSASConnectionStringbrowser\"}",
"status": 201,
"response": "{\"odata.metadata\":\"https://fakeaccount.table.core.windows.net/$metadata#Tables/@Element\",\"TableName\":\"batchTableTestSASConnectionStringbrowser\"}",
"responseHeaders": {
"cache-control": "no-cache",
"content-type": "application/json;odata=minimalmetadata;streaming=true;charset=utf-8",
"date": "Tue, 09 Nov 2021 01:43:44 GMT",
"location": "https://fakeaccount.table.core.windows.net/Tables('batchTableTestSASConnectionStringbrowser')",
"server": "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0",
"transfer-encoding": "chunked",
"x-content-type-options": "nosniff",
"x-ms-client-request-id": "767ef3ef-832f-46ef-ad80-65056b523bb3",
"x-ms-request-id": "72ab8bb7-f002-0086-580b-d5d56d000000",
"x-ms-version": "2019-02-02"
}
},
{
"method": "POST",
"url": "https://fakeaccount.table.core.windows.net/$batch",
"query": {},
"requestBody": "--batch_fakeId\r\ncontent-type: multipart/mixed; boundary=changeset_fakeId\r\n\r\n\r\n--changeset_fakeId\r\ncontent-type: application/http\r\ncontent-transfer-encoding: binary\r\n\r\nPOST https://fakeaccount.table.core.windows.net/batchTableTestSASConnectionStringbrowser HTTP/1.1\r\ncontent-type: application/json;odata=nometadata\r\naccept: application/json;odata=minimalmetadata\r\ndataserviceversion: 3.0\r\nprefer: return-no-content\r\n\r\n\r\n{\"PartitionKey\":\"\",\"RowKey\":\"\",\"value\":\"\"}\r\n--changeset_fakeId--\r\n--batch_fakeId--\r\n",
"status": 202,
"response": "--batchresponse_93575211-3475-4bac-8ab6-c4a16abe59f4\r\nContent-Type: multipart/mixed; boundary=changesetresponse_74b897b3-5986-4ebe-b626-b55503d8fd77\r\n\r\n--changesetresponse_74b897b3-5986-4ebe-b626-b55503d8fd77\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://fakeaccount.table.core.windows.net/batchTableTestSASConnectionStringbrowser(PartitionKey='',RowKey='')\r\nDataServiceId: https://fakeaccount.table.core.windows.net/batchTableTestSASConnectionStringbrowser(PartitionKey='',RowKey='')\r\nETag: W/\"datetime'2021-11-09T01%3A43%3A44.9196245Z'\"\r\n\r\n\r\n--changesetresponse_74b897b3-5986-4ebe-b626-b55503d8fd77--\r\n--batchresponse_93575211-3475-4bac-8ab6-c4a16abe59f4--\r\n",
"responseHeaders": {
"cache-control": "no-cache",
"content-type": "multipart/mixed; boundary=batchresponse_93575211-3475-4bac-8ab6-c4a16abe59f4",
"date": "Tue, 09 Nov 2021 01:43:44 GMT",
"server": "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0",
"transfer-encoding": "chunked",
"x-content-type-options": "nosniff",
"x-ms-client-request-id": "305bbf60-0835-4728-94f5-e6df98c65736",
"x-ms-request-id": "72ab8bc8-f002-0086-670b-d5d56d000000",
"x-ms-version": "2019-02-02"
}
},
{
"method": "POST",
"url": "https://fakeaccount.table.core.windows.net/$batch",
"query": {},
"requestBody": "--batch_fakeId\r\ncontent-type: multipart/mixed; boundary=changeset_fakeId\r\n\r\n\r\n--changeset_fakeId\r\ncontent-type: application/http\r\ncontent-transfer-encoding: binary\r\n\r\nPATCH https://fakeaccount.table.core.windows.net/batchTableTestSASConnectionStringbrowser(PartitionKey='',RowKey='') HTTP/1.1\r\ncontent-type: application/json\r\ndataserviceversion: 3.0\r\naccept: application/json\r\nif-match: *\r\n\r\n\r\n{\"PartitionKey\":\"\",\"RowKey\":\"\",\"value\":\"updated\"}\r\n--changeset_fakeId--\r\n--batch_fakeId--\r\n",
"status": 202,
"response": "--batchresponse_90e53545-2960-4962-860f-bbfdd3244eb6\r\nContent-Type: multipart/mixed; boundary=changesetresponse_8f3d5dbd-7798-4e78-8aef-1f54e6568614\r\n\r\n--changesetresponse_8f3d5dbd-7798-4e78-8aef-1f54e6568614\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-11-09T01%3A43%3A44.9540603Z'\"\r\n\r\n\r\n--changesetresponse_8f3d5dbd-7798-4e78-8aef-1f54e6568614--\r\n--batchresponse_90e53545-2960-4962-860f-bbfdd3244eb6--\r\n",
"responseHeaders": {
"cache-control": "no-cache",
"content-type": "multipart/mixed; boundary=batchresponse_90e53545-2960-4962-860f-bbfdd3244eb6",
"date": "Tue, 09 Nov 2021 01:43:44 GMT",
"server": "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0",
"transfer-encoding": "chunked",
"x-content-type-options": "nosniff",
"x-ms-client-request-id": "733171a4-bd6c-4032-9936-08bc6207a5e7",
"x-ms-request-id": "72ab8bd5-f002-0086-740b-d5d56d000000",
"x-ms-version": "2019-02-02"
}
},
{
"method": "GET",
"url": "https://fakeaccount.table.core.windows.net/batchTableTestSASConnectionStringbrowser(PartitionKey='',RowKey='')",
"query": {},
"requestBody": null,
"status": 200,
"response": "{\"odata.metadata\":\"https://fakeaccount.table.core.windows.net/$metadata#batchTableTestSASConnectionStringbrowser/@Element\",\"odata.etag\":\"W/\\\"datetime'2021-11-09T01%3A43%3A44.9540603Z'\\\"\",\"PartitionKey\":\"\",\"RowKey\":\"\",\"Timestamp\":\"2021-11-09T01:43:44.9540603Z\",\"value\":\"updated\"}",
"responseHeaders": {
"access-control-allow-origin": "*",
"access-control-expose-headers": "x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,X-Content-Type-Options,Cache-Control,ETag,Content-Type,Content-Length,Date,Transfer-Encoding",
"cache-control": "no-cache",
"content-type": "application/json;odata=minimalmetadata;streaming=true;charset=utf-8",
"date": "Tue, 09 Nov 2021 01:43:44 GMT",
"etag": "W/\"datetime'2021-11-09T01%3A43%3A44.9540603Z'\"",
"server": "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0",
"transfer-encoding": "chunked",
"x-content-type-options": "nosniff",
"x-ms-client-request-id": "3ca867d9-34ca-4d90-bdc6-9c60cad70f65",
"x-ms-request-id": "72ab8be5-f002-0086-030b-d5d56d000000",
"x-ms-version": "2019-02-02"
}
},
{
"method": "POST",
"url": "https://fakeaccount.table.core.windows.net/$batch",
"query": {},
"requestBody": "--batch_fakeId\r\ncontent-type: multipart/mixed; boundary=changeset_fakeId\r\n\r\n\r\n--changeset_fakeId\r\ncontent-type: application/http\r\ncontent-transfer-encoding: binary\r\n\r\nPATCH https://fakeaccount.table.core.windows.net/batchTableTestSASConnectionStringbrowser(PartitionKey='',RowKey='') HTTP/1.1\r\ncontent-type: application/json\r\ndataserviceversion: 3.0\r\naccept: application/json\r\n\r\n\r\n{\"PartitionKey\":\"\",\"RowKey\":\"\",\"value\":\"upserted\"}\r\n--changeset_fakeId--\r\n--batch_fakeId--\r\n",
"status": 202,
"response": "--batchresponse_f367fca4-44dd-4ad6-825d-ada210b42d45\r\nContent-Type: multipart/mixed; boundary=changesetresponse_4991fbc8-8a55-4af7-a96c-96dac22f2b0d\r\n\r\n--changesetresponse_4991fbc8-8a55-4af7-a96c-96dac22f2b0d\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-11-09T01%3A43%3A45.0250208Z'\"\r\n\r\n\r\n--changesetresponse_4991fbc8-8a55-4af7-a96c-96dac22f2b0d--\r\n--batchresponse_f367fca4-44dd-4ad6-825d-ada210b42d45--\r\n",
"responseHeaders": {
"cache-control": "no-cache",
"content-type": "multipart/mixed; boundary=batchresponse_f367fca4-44dd-4ad6-825d-ada210b42d45",
"date": "Tue, 09 Nov 2021 01:43:44 GMT",
"server": "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0",
"transfer-encoding": "chunked",
"x-content-type-options": "nosniff",
"x-ms-client-request-id": "014a1994-0e8e-44b1-9d2e-02e7724ae80d",
"x-ms-request-id": "72ab8bee-f002-0086-0c0b-d5d56d000000",
"x-ms-version": "2019-02-02"
}
},
{
"method": "GET",
"url": "https://fakeaccount.table.core.windows.net/batchTableTestSASConnectionStringbrowser(PartitionKey='',RowKey='')",
"query": {},
"requestBody": null,
"status": 200,
"response": "{\"odata.metadata\":\"https://fakeaccount.table.core.windows.net/$metadata#batchTableTestSASConnectionStringbrowser/@Element\",\"odata.etag\":\"W/\\\"datetime'2021-11-09T01%3A43%3A45.0250208Z'\\\"\",\"PartitionKey\":\"\",\"RowKey\":\"\",\"Timestamp\":\"2021-11-09T01:43:45.0250208Z\",\"value\":\"upserted\"}",
"responseHeaders": {
"access-control-allow-origin": "*",
"access-control-expose-headers": "x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,X-Content-Type-Options,Cache-Control,ETag,Content-Type,Content-Length,Date,Transfer-Encoding",
"cache-control": "no-cache",
"content-type": "application/json;odata=minimalmetadata;streaming=true;charset=utf-8",
"date": "Tue, 09 Nov 2021 01:43:44 GMT",
"etag": "W/\"datetime'2021-11-09T01%3A43%3A45.0250208Z'\"",
"server": "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0",
"transfer-encoding": "chunked",
"x-content-type-options": "nosniff",
"x-ms-client-request-id": "989579fc-3efc-4846-b36a-139a4a70dff5",
"x-ms-request-id": "72ab8bfc-f002-0086-1a0b-d5d56d000000",
"x-ms-version": "2019-02-02"
}
}
],
"uniqueTestInfo": {
"uniqueName": {},
"newDate": {}
},
"hash": "7b0a08c45bb96eef84516e204b3068f4"
}

Просмотреть файл

@ -0,0 +1,226 @@
{
"recordings": [
{
"method": "POST",
"url": "https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token",
"query": {},
"requestBody": "response_type=token&grant_type=client_credentials&client_id=azure_client_id&client_secret=azure_client_secret&scope=https%3A%2F%2Fsanitized%2F",
"status": 200,
"response": "{\"token_type\":\"Bearer\",\"expires_in\":86399,\"ext_expires_in\":86399,\"access_token\":\"access_token\"}",
"responseHeaders": {
"cache-control": "no-store, no-cache",
"content-length": "1318",
"content-type": "application/json; charset=utf-8",
"date": "Tue, 09 Nov 2021 01:43:43 GMT",
"expires": "-1",
"nel": "{\"report_to\":\"network-errors\",\"max_age\":86400,\"success_fraction\":0.001,\"failure_fraction\":1.0}",
"p3p": "CP=\"DSP CUR OTPi IND OTRi ONL FIN\"",
"pragma": "no-cache",
"referrer-policy": "strict-origin-when-cross-origin",
"report-to": "{\"group\":\"network-errors\",\"max_age\":86400,\"endpoints\":[{\"url\":\"https://identity.nel.measure.office.net/api/report?catId=GW+estsfd+wst\"}]}",
"strict-transport-security": "max-age=31536000; includeSubDomains",
"x-content-type-options": "nosniff",
"x-ms-ests-server": "2.1.12197.4 - WUS2 ProdSlices",
"x-ms-request-id": "b650d5ba-104c-476c-9aba-d312289da200"
}
},
{
"method": "POST",
"url": "https://fakeaccount.table.core.windows.net/Tables",
"query": {},
"requestBody": "{\"TableName\":\"batchTableTestTokenCredentialbrowser\"}",
"status": 201,
"response": "{\"odata.metadata\":\"https://fakeaccount.table.core.windows.net/$metadata#Tables/@Element\",\"TableName\":\"batchTableTestTokenCredentialbrowser\"}",
"responseHeaders": {
"cache-control": "no-cache",
"content-type": "application/json;odata=minimalmetadata;streaming=true;charset=utf-8",
"date": "Tue, 09 Nov 2021 01:43:43 GMT",
"location": "https://fakeaccount.table.core.windows.net/Tables('batchTableTestTokenCredentialbrowser')",
"server": "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0",
"transfer-encoding": "chunked",
"x-content-type-options": "nosniff",
"x-ms-client-request-id": "0717ed3a-14ae-4760-b543-d0781299654e",
"x-ms-request-id": "72ab8a39-f002-0086-6b0b-d5d56d000000",
"x-ms-version": "2019-02-02"
}
},
{
"method": "POST",
"url": "https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token",
"query": {},
"requestBody": "response_type=token&grant_type=client_credentials&client_id=azure_client_id&client_secret=azure_client_secret&scope=https%3A%2F%2Fstorage.azure.com%2F.default",
"status": 200,
"response": "{\"token_type\":\"Bearer\",\"expires_in\":86399,\"ext_expires_in\":86399,\"access_token\":\"access_token\"}",
"responseHeaders": {
"cache-control": "no-store, no-cache",
"content-length": "1318",
"content-type": "application/json; charset=utf-8",
"date": "Tue, 09 Nov 2021 01:43:43 GMT",
"expires": "-1",
"nel": "{\"report_to\":\"network-errors\",\"max_age\":86400,\"success_fraction\":0.001,\"failure_fraction\":1.0}",
"p3p": "CP=\"DSP CUR OTPi IND OTRi ONL FIN\"",
"pragma": "no-cache",
"referrer-policy": "strict-origin-when-cross-origin",
"report-to": "{\"group\":\"network-errors\",\"max_age\":86400,\"endpoints\":[{\"url\":\"https://identity.nel.measure.office.net/api/report?catId=GW+estsfd+wst\"}]}",
"strict-transport-security": "max-age=31536000; includeSubDomains",
"x-content-type-options": "nosniff",
"x-ms-ests-server": "2.1.12197.4 - NCUS ProdSlices",
"x-ms-request-id": "11a136a1-24c7-44a6-9358-f4622d629900"
}
},
{
"method": "POST",
"url": "https://fakeaccount.table.core.windows.net/$batch",
"query": {},
"requestBody": "--batch_fakeId\r\ncontent-type: multipart/mixed; boundary=changeset_fakeId\r\n\r\n\r\n--changeset_fakeId\r\ncontent-type: application/http\r\ncontent-transfer-encoding: binary\r\n\r\nPOST https://fakeaccount.table.core.windows.net/batchTableTestTokenCredentialbrowser HTTP/1.1\r\ncontent-type: application/json;odata=nometadata\r\naccept: application/json;odata=minimalmetadata\r\ndataserviceversion: 3.0\r\nprefer: return-no-content\r\n\r\n\r\n{\"PartitionKey\":\"\",\"RowKey\":\"\",\"value\":\"\"}\r\n--changeset_fakeId--\r\n--batch_fakeId--\r\n",
"status": 202,
"response": "--batchresponse_6e13a322-2732-4e9f-9755-cd84df08baa1\r\nContent-Type: multipart/mixed; boundary=changesetresponse_8b7dd9b9-32d4-4a86-a9a1-1ea42d15a6b3\r\n\r\n--changesetresponse_8b7dd9b9-32d4-4a86-a9a1-1ea42d15a6b3\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://fakeaccount.table.core.windows.net/batchTableTestTokenCredentialbrowser(PartitionKey='',RowKey='')\r\nDataServiceId: https://fakeaccount.table.core.windows.net/batchTableTestTokenCredentialbrowser(PartitionKey='',RowKey='')\r\nETag: W/\"datetime'2021-11-09T01%3A43%3A44.3249645Z'\"\r\n\r\n\r\n--changesetresponse_8b7dd9b9-32d4-4a86-a9a1-1ea42d15a6b3--\r\n--batchresponse_6e13a322-2732-4e9f-9755-cd84df08baa1--\r\n",
"responseHeaders": {
"cache-control": "no-cache",
"content-type": "multipart/mixed; boundary=batchresponse_6e13a322-2732-4e9f-9755-cd84df08baa1",
"date": "Tue, 09 Nov 2021 01:43:44 GMT",
"server": "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0",
"transfer-encoding": "chunked",
"x-content-type-options": "nosniff",
"x-ms-client-request-id": "6387a3b6-2d35-4719-baf8-5f94c721444a",
"x-ms-request-id": "72ab8a98-f002-0086-410b-d5d56d000000",
"x-ms-version": "2019-02-02"
}
},
{
"method": "POST",
"url": "https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token",
"query": {},
"requestBody": "response_type=token&grant_type=client_credentials&client_id=azure_client_id&client_secret=azure_client_secret&scope=https%3A%2F%2Fsanitized%2F",
"status": 200,
"response": "{\"token_type\":\"Bearer\",\"expires_in\":86399,\"ext_expires_in\":86399,\"access_token\":\"access_token\"}",
"responseHeaders": {
"cache-control": "no-store, no-cache",
"content-length": "1318",
"content-type": "application/json; charset=utf-8",
"date": "Tue, 09 Nov 2021 01:43:43 GMT",
"expires": "-1",
"nel": "{\"report_to\":\"network-errors\",\"max_age\":86400,\"success_fraction\":0.001,\"failure_fraction\":1.0}",
"p3p": "CP=\"DSP CUR OTPi IND OTRi ONL FIN\"",
"pragma": "no-cache",
"referrer-policy": "strict-origin-when-cross-origin",
"report-to": "{\"group\":\"network-errors\",\"max_age\":86400,\"endpoints\":[{\"url\":\"https://identity.nel.measure.office.net/api/report?catId=GW+estsfd+wst\"}]}",
"strict-transport-security": "max-age=31536000; includeSubDomains",
"x-content-type-options": "nosniff",
"x-ms-ests-server": "2.1.12197.4 - WUS2 ProdSlices",
"x-ms-request-id": "1c420248-3065-4517-b630-098199b9c000"
}
},
{
"method": "POST",
"url": "https://fakeaccount.table.core.windows.net/$batch",
"query": {},
"requestBody": "--batch_fakeId\r\ncontent-type: multipart/mixed; boundary=changeset_fakeId\r\n\r\n\r\n--changeset_fakeId\r\ncontent-type: application/http\r\ncontent-transfer-encoding: binary\r\n\r\nPATCH https://fakeaccount.table.core.windows.net/batchTableTestTokenCredentialbrowser(PartitionKey='',RowKey='') HTTP/1.1\r\ncontent-type: application/json\r\ndataserviceversion: 3.0\r\naccept: application/json\r\nif-match: *\r\n\r\n\r\n{\"PartitionKey\":\"\",\"RowKey\":\"\",\"value\":\"updated\"}\r\n--changeset_fakeId--\r\n--batch_fakeId--\r\n",
"status": 202,
"response": "--batchresponse_75362d28-e993-46b4-b364-bb674e1058ec\r\nContent-Type: multipart/mixed; boundary=changesetresponse_78590898-be8a-45c9-bead-3bd0606d2f1d\r\n\r\n--changesetresponse_78590898-be8a-45c9-bead-3bd0606d2f1d\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-11-09T01%3A43%3A44.4543389Z'\"\r\n\r\n\r\n--changesetresponse_78590898-be8a-45c9-bead-3bd0606d2f1d--\r\n--batchresponse_75362d28-e993-46b4-b364-bb674e1058ec--\r\n",
"responseHeaders": {
"cache-control": "no-cache",
"content-type": "multipart/mixed; boundary=batchresponse_75362d28-e993-46b4-b364-bb674e1058ec",
"date": "Tue, 09 Nov 2021 01:43:44 GMT",
"server": "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0",
"transfer-encoding": "chunked",
"x-content-type-options": "nosniff",
"x-ms-client-request-id": "08d78159-ee83-4cc7-b513-96ba5f9a93d5",
"x-ms-request-id": "72ab8add-f002-0086-040b-d5d56d000000",
"x-ms-version": "2019-02-02"
}
},
{
"method": "GET",
"url": "https://fakeaccount.table.core.windows.net/batchTableTestTokenCredentialbrowser(PartitionKey='',RowKey='')",
"query": {},
"requestBody": null,
"status": 200,
"response": "{\"odata.metadata\":\"https://fakeaccount.table.core.windows.net/$metadata#batchTableTestTokenCredentialbrowser/@Element\",\"odata.etag\":\"W/\\\"datetime'2021-11-09T01%3A43%3A44.4543389Z'\\\"\",\"PartitionKey\":\"\",\"RowKey\":\"\",\"Timestamp\":\"2021-11-09T01:43:44.4543389Z\",\"value\":\"updated\"}",
"responseHeaders": {
"access-control-allow-origin": "*",
"access-control-expose-headers": "x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,X-Content-Type-Options,Cache-Control,ETag,Content-Type,Content-Length,Date,Transfer-Encoding",
"cache-control": "no-cache",
"content-type": "application/json;odata=minimalmetadata;streaming=true;charset=utf-8",
"date": "Tue, 09 Nov 2021 01:43:44 GMT",
"etag": "W/\"datetime'2021-11-09T01%3A43%3A44.4543389Z'\"",
"server": "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0",
"transfer-encoding": "chunked",
"x-content-type-options": "nosniff",
"x-ms-client-request-id": "d14cd146-50cb-468d-b2ab-04b24026a909",
"x-ms-request-id": "72ab8af7-f002-0086-1e0b-d5d56d000000",
"x-ms-version": "2019-02-02"
}
},
{
"method": "POST",
"url": "https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token",
"query": {},
"requestBody": "response_type=token&grant_type=client_credentials&client_id=azure_client_id&client_secret=azure_client_secret&scope=https%3A%2F%2Fsanitized%2F",
"status": 200,
"response": "{\"token_type\":\"Bearer\",\"expires_in\":86399,\"ext_expires_in\":86399,\"access_token\":\"access_token\"}",
"responseHeaders": {
"cache-control": "no-store, no-cache",
"content-length": "1318",
"content-type": "application/json; charset=utf-8",
"date": "Tue, 09 Nov 2021 01:43:43 GMT",
"expires": "-1",
"nel": "{\"report_to\":\"network-errors\",\"max_age\":86400,\"success_fraction\":0.001,\"failure_fraction\":1.0}",
"p3p": "CP=\"DSP CUR OTPi IND OTRi ONL FIN\"",
"pragma": "no-cache",
"referrer-policy": "strict-origin-when-cross-origin",
"report-to": "{\"group\":\"network-errors\",\"max_age\":86400,\"endpoints\":[{\"url\":\"https://identity.nel.measure.office.net/api/report?catId=GW+estsfd+wst\"}]}",
"strict-transport-security": "max-age=31536000; includeSubDomains",
"x-content-type-options": "nosniff",
"x-ms-ests-server": "2.1.12197.4 - NCUS ProdSlices",
"x-ms-request-id": "11a136a1-24c7-44a6-9358-f46230629900"
}
},
{
"method": "POST",
"url": "https://fakeaccount.table.core.windows.net/$batch",
"query": {},
"requestBody": "--batch_fakeId\r\ncontent-type: multipart/mixed; boundary=changeset_fakeId\r\n\r\n\r\n--changeset_fakeId\r\ncontent-type: application/http\r\ncontent-transfer-encoding: binary\r\n\r\nPATCH https://fakeaccount.table.core.windows.net/batchTableTestTokenCredentialbrowser(PartitionKey='',RowKey='') HTTP/1.1\r\ncontent-type: application/json\r\ndataserviceversion: 3.0\r\naccept: application/json\r\n\r\n\r\n{\"PartitionKey\":\"\",\"RowKey\":\"\",\"value\":\"upserted\"}\r\n--changeset_fakeId--\r\n--batch_fakeId--\r\n",
"status": 202,
"response": "--batchresponse_faba90ea-a2a3-40ed-b3f7-13a7a3f704e4\r\nContent-Type: multipart/mixed; boundary=changesetresponse_363a8095-9d9a-465b-a412-98ed64e05040\r\n\r\n--changesetresponse_363a8095-9d9a-465b-a412-98ed64e05040\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-11-09T01%3A43%3A44.6912069Z'\"\r\n\r\n\r\n--changesetresponse_363a8095-9d9a-465b-a412-98ed64e05040--\r\n--batchresponse_faba90ea-a2a3-40ed-b3f7-13a7a3f704e4--\r\n",
"responseHeaders": {
"cache-control": "no-cache",
"content-type": "multipart/mixed; boundary=batchresponse_faba90ea-a2a3-40ed-b3f7-13a7a3f704e4",
"date": "Tue, 09 Nov 2021 01:43:44 GMT",
"server": "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0",
"transfer-encoding": "chunked",
"x-content-type-options": "nosniff",
"x-ms-client-request-id": "5d1e213f-13e8-4ce2-b84c-fe1b3ff48f17",
"x-ms-request-id": "72ab8b5a-f002-0086-7e0b-d5d56d000000",
"x-ms-version": "2019-02-02"
}
},
{
"method": "GET",
"url": "https://fakeaccount.table.core.windows.net/batchTableTestTokenCredentialbrowser(PartitionKey='',RowKey='')",
"query": {},
"requestBody": null,
"status": 200,
"response": "{\"odata.metadata\":\"https://fakeaccount.table.core.windows.net/$metadata#batchTableTestTokenCredentialbrowser/@Element\",\"odata.etag\":\"W/\\\"datetime'2021-11-09T01%3A43%3A44.6912069Z'\\\"\",\"PartitionKey\":\"\",\"RowKey\":\"\",\"Timestamp\":\"2021-11-09T01:43:44.6912069Z\",\"value\":\"upserted\"}",
"responseHeaders": {
"access-control-allow-origin": "*",
"access-control-expose-headers": "x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,X-Content-Type-Options,Cache-Control,ETag,Content-Type,Content-Length,Date,Transfer-Encoding",
"cache-control": "no-cache",
"content-type": "application/json;odata=minimalmetadata;streaming=true;charset=utf-8",
"date": "Tue, 09 Nov 2021 01:43:44 GMT",
"etag": "W/\"datetime'2021-11-09T01%3A43%3A44.6912069Z'\"",
"server": "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0",
"transfer-encoding": "chunked",
"x-content-type-options": "nosniff",
"x-ms-client-request-id": "8ea2a72f-8f34-4d34-b209-407b31e4d379",
"x-ms-request-id": "72ab8b70-f002-0086-130b-d5d56d000000",
"x-ms-version": "2019-02-02"
}
}
],
"uniqueTestInfo": {
"uniqueName": {},
"newDate": {}
},
"hash": "7b0a08c45bb96eef84516e204b3068f4"
}

Просмотреть файл

@ -0,0 +1,71 @@
{
"recordings": [
{
"method": "POST",
"url": "https://fakeaccount.table.core.windows.net/tableClientTestSASConnectionStringbrowser",
"query": {},
"requestBody": "{\"PartitionKey\":\"\",\"RowKey\":\"\",\"testField\":\"testEntity\"}",
"status": 204,
"response": "",
"responseHeaders": {
"cache-control": "no-cache",
"content-length": "0",
"dataserviceid": "https://fakeaccount.table.core.windows.net/tableClientTestSASConnectionStringbrowser(PartitionKey='',RowKey='')",
"date": "Tue, 09 Nov 2021 00:41:30 GMT",
"etag": "W/\"datetime'2021-11-09T00%3A41%3A30.9763195Z'\"",
"location": "https://fakeaccount.table.core.windows.net/tableClientTestSASConnectionStringbrowser(PartitionKey='',RowKey='')",
"preference-applied": "return-no-content",
"server": "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0",
"x-content-type-options": "nosniff",
"x-ms-client-request-id": "7a225b50-1f61-4497-917d-f80edd01a429",
"x-ms-request-id": "157d7f1a-4002-0071-3f02-d5f386000000",
"x-ms-version": "2019-02-02"
}
},
{
"method": "GET",
"url": "https://fakeaccount.table.core.windows.net/tableClientTestSASConnectionStringbrowser(PartitionKey='',RowKey='')",
"query": {},
"requestBody": null,
"status": 200,
"response": "{\"odata.metadata\":\"https://fakeaccount.table.core.windows.net/$metadata#tableClientTestSASConnectionStringbrowser/@Element\",\"odata.etag\":\"W/\\\"datetime'2021-11-09T00%3A41%3A30.9763195Z'\\\"\",\"PartitionKey\":\"\",\"RowKey\":\"\",\"Timestamp\":\"2021-11-09T00:41:30.9763195Z\",\"testField\":\"testEntity\"}",
"responseHeaders": {
"access-control-allow-origin": "*",
"access-control-expose-headers": "x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,X-Content-Type-Options,Cache-Control,ETag,Content-Type,Content-Length,Date,Transfer-Encoding",
"cache-control": "no-cache",
"content-type": "application/json;odata=minimalmetadata;streaming=true;charset=utf-8",
"date": "Tue, 09 Nov 2021 00:41:30 GMT",
"etag": "W/\"datetime'2021-11-09T00%3A41%3A30.9763195Z'\"",
"server": "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0",
"transfer-encoding": "chunked",
"x-content-type-options": "nosniff",
"x-ms-client-request-id": "ac2879d6-a007-4a7c-af53-5636586b585b",
"x-ms-request-id": "157d7f27-4002-0071-4b02-d5f386000000",
"x-ms-version": "2019-02-02"
}
},
{
"method": "DELETE",
"url": "https://fakeaccount.table.core.windows.net/tableClientTestSASConnectionStringbrowser(PartitionKey='',RowKey='')",
"query": {},
"requestBody": null,
"status": 204,
"response": "",
"responseHeaders": {
"cache-control": "no-cache",
"content-length": "0",
"date": "Tue, 09 Nov 2021 00:41:30 GMT",
"server": "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0",
"x-content-type-options": "nosniff",
"x-ms-client-request-id": "fea3475b-022f-4d7c-a5dd-cac5289293cb",
"x-ms-request-id": "157d7f33-4002-0071-5502-d5f386000000",
"x-ms-version": "2019-02-02"
}
}
],
"uniqueTestInfo": {
"uniqueName": {},
"newDate": {}
},
"hash": "f4386d26ed3bfdd9ade4150a30d22eb7"
}

Просмотреть файл

@ -0,0 +1,95 @@
{
"recordings": [
{
"method": "POST",
"url": "https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token",
"query": {},
"requestBody": "response_type=token&grant_type=client_credentials&client_id=azure_client_id&client_secret=azure_client_secret&scope=https%3A%2F%2Fsanitized%2F",
"status": 200,
"response": "{\"token_type\":\"Bearer\",\"expires_in\":86399,\"ext_expires_in\":86399,\"access_token\":\"access_token\"}",
"responseHeaders": {
"cache-control": "no-store, no-cache",
"content-length": "1318",
"content-type": "application/json; charset=utf-8",
"date": "Tue, 09 Nov 2021 00:41:30 GMT",
"expires": "-1",
"nel": "{\"report_to\":\"network-errors\",\"max_age\":86400,\"success_fraction\":0.001,\"failure_fraction\":1.0}",
"p3p": "CP=\"DSP CUR OTPi IND OTRi ONL FIN\"",
"pragma": "no-cache",
"referrer-policy": "strict-origin-when-cross-origin",
"report-to": "{\"group\":\"network-errors\",\"max_age\":86400,\"endpoints\":[{\"url\":\"https://identity.nel.measure.office.net/api/report?catId=GW+estsfd+wst\"}]}",
"strict-transport-security": "max-age=31536000; includeSubDomains",
"x-content-type-options": "nosniff",
"x-ms-ests-server": "2.1.12197.4 - NCUS ProdSlices",
"x-ms-request-id": "a9246bf2-1cfd-4504-b409-a4f23f0eaa00"
}
},
{
"method": "POST",
"url": "https://fakeaccount.table.core.windows.net/tableClientTestTokenCredentialbrowser",
"query": {},
"requestBody": "{\"PartitionKey\":\"\",\"RowKey\":\"\",\"testField\":\"testEntity\"}",
"status": 204,
"response": "",
"responseHeaders": {
"cache-control": "no-cache",
"content-length": "0",
"dataserviceid": "https://fakeaccount.table.core.windows.net/tableClientTestTokenCredentialbrowser(PartitionKey='',RowKey='')",
"date": "Tue, 09 Nov 2021 00:41:29 GMT",
"etag": "W/\"datetime'2021-11-09T00%3A41%3A30.6904816Z'\"",
"location": "https://fakeaccount.table.core.windows.net/tableClientTestTokenCredentialbrowser(PartitionKey='',RowKey='')",
"preference-applied": "return-no-content",
"server": "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0",
"x-content-type-options": "nosniff",
"x-ms-client-request-id": "1549374d-b609-4923-a79d-8943737909d3",
"x-ms-request-id": "157d7ea7-4002-0071-5602-d5f386000000",
"x-ms-version": "2019-02-02"
}
},
{
"method": "GET",
"url": "https://fakeaccount.table.core.windows.net/tableClientTestTokenCredentialbrowser(PartitionKey='',RowKey='')",
"query": {},
"requestBody": null,
"status": 200,
"response": "{\"odata.metadata\":\"https://fakeaccount.table.core.windows.net/$metadata#tableClientTestTokenCredentialbrowser/@Element\",\"odata.etag\":\"W/\\\"datetime'2021-11-09T00%3A41%3A30.6904816Z'\\\"\",\"PartitionKey\":\"\",\"RowKey\":\"\",\"Timestamp\":\"2021-11-09T00:41:30.6904816Z\",\"testField\":\"testEntity\"}",
"responseHeaders": {
"access-control-allow-origin": "*",
"access-control-expose-headers": "x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,X-Content-Type-Options,Cache-Control,ETag,Content-Type,Content-Length,Date,Transfer-Encoding",
"cache-control": "no-cache",
"content-type": "application/json;odata=minimalmetadata;streaming=true;charset=utf-8",
"date": "Tue, 09 Nov 2021 00:41:29 GMT",
"etag": "W/\"datetime'2021-11-09T00%3A41%3A30.6904816Z'\"",
"server": "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0",
"transfer-encoding": "chunked",
"x-content-type-options": "nosniff",
"x-ms-client-request-id": "4db8e48e-e626-4640-be34-8d9284d01a14",
"x-ms-request-id": "157d7ebd-4002-0071-6802-d5f386000000",
"x-ms-version": "2019-02-02"
}
},
{
"method": "DELETE",
"url": "https://fakeaccount.table.core.windows.net/tableClientTestTokenCredentialbrowser(PartitionKey='',RowKey='')",
"query": {},
"requestBody": null,
"status": 204,
"response": "",
"responseHeaders": {
"cache-control": "no-cache",
"content-length": "0",
"date": "Tue, 09 Nov 2021 00:41:30 GMT",
"server": "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0",
"x-content-type-options": "nosniff",
"x-ms-client-request-id": "b7f9f76a-47b4-4a69-a237-65afee450c79",
"x-ms-request-id": "157d7ed4-4002-0071-7f02-d5f386000000",
"x-ms-version": "2019-02-02"
}
}
],
"uniqueTestInfo": {
"uniqueName": {},
"newDate": {}
},
"hash": "f4386d26ed3bfdd9ade4150a30d22eb7"
}

Просмотреть файл

@ -0,0 +1,163 @@
let nock = require('nock');
module.exports.hash = "1aa68a918ecb32fa9fcc4e9eda4f3f45";
module.exports.testInfo = {"uniqueName":{},"newDate":{}}
nock('https://fakeaccount.table.core.windows.net:443', {"encodedQueryParams":true})
.post('/Tables', {"TableName":"batchTableTestSASConnectionStringnode"})
.query(true)
.reply(201, {"odata.metadata":"https://fakeaccount.table.core.windows.net/$metadata#Tables/@Element","TableName":"batchTableTestSASConnectionStringnode"}, [
'Cache-Control',
'no-cache',
'Transfer-Encoding',
'chunked',
'Content-Type',
'application/json;odata=minimalmetadata;streaming=true;charset=utf-8',
'Location',
"https://fakeaccount.table.core.windows.net/Tables('batchTableTestSASConnectionStringnode')",
'Server',
'Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0',
'x-ms-request-id',
'58e1c53d-9002-0133-6c0b-d59ec7000000',
'x-ms-client-request-id',
'4084d65e-ae4d-4c90-ad5f-31eece0a18b9',
'x-ms-version',
'2019-02-02',
'X-Content-Type-Options',
'nosniff',
'Date',
'Tue, 09 Nov 2021 01:43:40 GMT'
]);
nock('https://fakeaccount.table.core.windows.net:443', {"encodedQueryParams":true})
.post('/$batch', "--batch_fakeId\r\ncontent-type: multipart/mixed; boundary=changeset_fakeId\r\n\r\n\r\n--changeset_fakeId\r\ncontent-type: application/http\r\ncontent-transfer-encoding: binary\r\n\r\nPOST https://fakeaccount.table.core.windows.net/batchTableTestSASConnectionStringnode HTTP/1.1\r\ncontent-type: application/json;odata=nometadata\r\naccept: application/json;odata=minimalmetadata\r\ndataserviceversion: 3.0\r\nprefer: return-no-content\r\n\r\n\r\n{\"PartitionKey\":\"\",\"RowKey\":\"\",\"value\":\"\"}\r\n--changeset_fakeId--\r\n--batch_fakeId--\r\n")
.query(true)
.reply(202, "--batchresponse_371d892f-7b5e-4b82-9cfa-f75276cc91ac\r\nContent-Type: multipart/mixed; boundary=changesetresponse_3fc01029-ca4e-4125-b602-5dbe2fdb4ddd\r\n\r\n--changesetresponse_3fc01029-ca4e-4125-b602-5dbe2fdb4ddd\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://fakeaccount.table.core.windows.net/batchTableTestSASConnectionStringnode(PartitionKey='',RowKey='')\r\nDataServiceId: https://fakeaccount.table.core.windows.net/batchTableTestSASConnectionStringnode(PartitionKey='',RowKey='')\r\nETag: W/\"datetime'2021-11-09T01%3A43%3A40.8051516Z'\"\r\n\r\n\r\n--changesetresponse_3fc01029-ca4e-4125-b602-5dbe2fdb4ddd--\r\n--batchresponse_371d892f-7b5e-4b82-9cfa-f75276cc91ac--\r\n", [
'Cache-Control',
'no-cache',
'Transfer-Encoding',
'chunked',
'Content-Type',
'multipart/mixed; boundary=batchresponse_371d892f-7b5e-4b82-9cfa-f75276cc91ac',
'Server',
'Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0',
'x-ms-request-id',
'58e1c560-9002-0133-0c0b-d59ec7000000',
'x-ms-client-request-id',
'081dd516-30c0-4367-aa1a-ff9606bb8277',
'x-ms-version',
'2019-02-02',
'X-Content-Type-Options',
'nosniff',
'Date',
'Tue, 09 Nov 2021 01:43:40 GMT'
]);
nock('https://fakeaccount.table.core.windows.net:443', {"encodedQueryParams":true})
.post('/$batch', "--batch_fakeId\r\ncontent-type: multipart/mixed; boundary=changeset_fakeId\r\n\r\n\r\n--changeset_fakeId\r\ncontent-type: application/http\r\ncontent-transfer-encoding: binary\r\n\r\nPATCH https://fakeaccount.table.core.windows.net/batchTableTestSASConnectionStringnode(PartitionKey='',RowKey='') HTTP/1.1\r\ncontent-type: application/json\r\ndataserviceversion: 3.0\r\naccept: application/json\r\nif-match: *\r\n\r\n\r\n{\"PartitionKey\":\"\",\"RowKey\":\"\",\"value\":\"updated\"}\r\n--changeset_fakeId--\r\n--batch_fakeId--\r\n")
.query(true)
.reply(202, "--batchresponse_07ec33a5-6718-4402-bc42-551e9dfe8660\r\nContent-Type: multipart/mixed; boundary=changesetresponse_7d5b7ade-0150-411c-bfd3-40e0699bb2fe\r\n\r\n--changesetresponse_7d5b7ade-0150-411c-bfd3-40e0699bb2fe\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-11-09T01%3A43%3A40.8413527Z'\"\r\n\r\n\r\n--changesetresponse_7d5b7ade-0150-411c-bfd3-40e0699bb2fe--\r\n--batchresponse_07ec33a5-6718-4402-bc42-551e9dfe8660--\r\n", [
'Cache-Control',
'no-cache',
'Transfer-Encoding',
'chunked',
'Content-Type',
'multipart/mixed; boundary=batchresponse_07ec33a5-6718-4402-bc42-551e9dfe8660',
'Server',
'Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0',
'x-ms-request-id',
'58e1c576-9002-0133-210b-d59ec7000000',
'x-ms-client-request-id',
'e8457e6a-7459-41fb-8c68-2ab304f532c0',
'x-ms-version',
'2019-02-02',
'X-Content-Type-Options',
'nosniff',
'Date',
'Tue, 09 Nov 2021 01:43:40 GMT'
]);
nock('https://fakeaccount.table.core.windows.net:443', {"encodedQueryParams":true})
.get(`/batchTableTestSASConnectionStringnode(PartitionKey='',RowKey='')`)
.query(true)
.reply(200, {"odata.metadata":"https://fakeaccount.table.core.windows.net/$metadata#batchTableTestSASConnectionStringnode/@Element","odata.etag":"W/\"datetime'2021-11-09T01%3A43%3A40.8413527Z'\"","PartitionKey":"","RowKey":"","Timestamp":"2021-11-09T01:43:40.8413527Z","value":"updated"}, [
'Cache-Control',
'no-cache',
'Transfer-Encoding',
'chunked',
'Content-Type',
'application/json;odata=minimalmetadata;streaming=true;charset=utf-8',
'ETag',
`W/"datetime'2021-11-09T01%3A43%3A40.8413527Z'"`,
'Server',
'Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0',
'x-ms-request-id',
'58e1c587-9002-0133-320b-d59ec7000000',
'x-ms-client-request-id',
'c1662e8c-bb6d-4181-8a2c-3c49c28f191c',
'x-ms-version',
'2019-02-02',
'X-Content-Type-Options',
'nosniff',
'Access-Control-Expose-Headers',
'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,X-Content-Type-Options,Cache-Control,ETag,Content-Type,Content-Length,Date,Transfer-Encoding',
'Access-Control-Allow-Origin',
'*',
'Date',
'Tue, 09 Nov 2021 01:43:40 GMT'
]);
nock('https://fakeaccount.table.core.windows.net:443', {"encodedQueryParams":true})
.post('/$batch', "--batch_fakeId\r\ncontent-type: multipart/mixed; boundary=changeset_fakeId\r\n\r\n\r\n--changeset_fakeId\r\ncontent-type: application/http\r\ncontent-transfer-encoding: binary\r\n\r\nPATCH https://fakeaccount.table.core.windows.net/batchTableTestSASConnectionStringnode(PartitionKey='',RowKey='') HTTP/1.1\r\ncontent-type: application/json\r\ndataserviceversion: 3.0\r\naccept: application/json\r\n\r\n\r\n{\"PartitionKey\":\"\",\"RowKey\":\"\",\"value\":\"upserted\"}\r\n--changeset_fakeId--\r\n--batch_fakeId--\r\n")
.query(true)
.reply(202, "--batchresponse_941691c7-93bd-4b80-b624-0d50b1d2ad8f\r\nContent-Type: multipart/mixed; boundary=changesetresponse_28a45cab-7502-424c-8c15-e7dc4212f588\r\n\r\n--changesetresponse_28a45cab-7502-424c-8c15-e7dc4212f588\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-11-09T01%3A43%3A40.9153114Z'\"\r\n\r\n\r\n--changesetresponse_28a45cab-7502-424c-8c15-e7dc4212f588--\r\n--batchresponse_941691c7-93bd-4b80-b624-0d50b1d2ad8f--\r\n", [
'Cache-Control',
'no-cache',
'Transfer-Encoding',
'chunked',
'Content-Type',
'multipart/mixed; boundary=batchresponse_941691c7-93bd-4b80-b624-0d50b1d2ad8f',
'Server',
'Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0',
'x-ms-request-id',
'58e1c59c-9002-0133-450b-d59ec7000000',
'x-ms-client-request-id',
'f61d90bd-8d63-4ee5-a9c8-18f6afcd0458',
'x-ms-version',
'2019-02-02',
'X-Content-Type-Options',
'nosniff',
'Date',
'Tue, 09 Nov 2021 01:43:40 GMT'
]);
nock('https://fakeaccount.table.core.windows.net:443', {"encodedQueryParams":true})
.get(`/batchTableTestSASConnectionStringnode(PartitionKey='',RowKey='')`)
.query(true)
.reply(200, {"odata.metadata":"https://fakeaccount.table.core.windows.net/$metadata#batchTableTestSASConnectionStringnode/@Element","odata.etag":"W/\"datetime'2021-11-09T01%3A43%3A40.9153114Z'\"","PartitionKey":"","RowKey":"","Timestamp":"2021-11-09T01:43:40.9153114Z","value":"upserted"}, [
'Cache-Control',
'no-cache',
'Transfer-Encoding',
'chunked',
'Content-Type',
'application/json;odata=minimalmetadata;streaming=true;charset=utf-8',
'ETag',
`W/"datetime'2021-11-09T01%3A43%3A40.9153114Z'"`,
'Server',
'Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0',
'x-ms-request-id',
'58e1c5b2-9002-0133-590b-d59ec7000000',
'x-ms-client-request-id',
'0a92f140-ab46-49e9-9b87-6d47d1466183',
'x-ms-version',
'2019-02-02',
'X-Content-Type-Options',
'nosniff',
'Access-Control-Expose-Headers',
'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,X-Content-Type-Options,Cache-Control,ETag,Content-Type,Content-Length,Date,Transfer-Encoding',
'Access-Control-Allow-Origin',
'*',
'Date',
'Tue, 09 Nov 2021 01:43:40 GMT'
]);

Просмотреть файл

@ -0,0 +1,263 @@
let nock = require('nock');
module.exports.hash = "1aa68a918ecb32fa9fcc4e9eda4f3f45";
module.exports.testInfo = { "uniqueName": {}, "newDate": {} }
nock('https://login.microsoftonline.com:443', { "encodedQueryParams": true })
.get('/common/discovery/instance')
.query(true)
.reply(200, { "tenant_discovery_endpoint": "https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/v2.0/.well-known/openid-configuration", "api-version": "1.1", "metadata": [{ "preferred_network": "login.microsoftonline.com", "preferred_cache": "login.windows.net", "aliases": ["login.microsoftonline.com", "login.windows.net", "login.microsoft.com", "sts.windows.net"] }, { "preferred_network": "login.partner.microsoftonline.cn", "preferred_cache": "login.partner.microsoftonline.cn", "aliases": ["login.partner.microsoftonline.cn", "login.chinacloudapi.cn"] }, { "preferred_network": "login.microsoftonline.de", "preferred_cache": "login.microsoftonline.de", "aliases": ["login.microsoftonline.de"] }, { "preferred_network": "login.microsoftonline.us", "preferred_cache": "login.microsoftonline.us", "aliases": ["login.microsoftonline.us", "login.usgovcloudapi.net"] }, { "preferred_network": "login-us.microsoftonline.com", "preferred_cache": "login-us.microsoftonline.com", "aliases": ["login-us.microsoftonline.com"] }] }, [
'Cache-Control',
'max-age=86400, private',
'Content-Type',
'application/json; charset=utf-8',
'Strict-Transport-Security',
'max-age=31536000; includeSubDomains',
'X-Content-Type-Options',
'nosniff',
'Access-Control-Allow-Origin',
'*',
'Access-Control-Allow-Methods',
'GET, OPTIONS',
'P3P',
'CP="DSP CUR OTPi IND OTRi ONL FIN"',
'x-ms-request-id',
'20c21895-1a18-42b2-be76-531df0c3af00',
'x-ms-ests-server',
'2.1.12171.15 - SCUS ProdSlices',
'Set-Cookie',
'fpc=AmZBqsVKBthPr-757buCe8w; expires=Thu, 09-Dec-2021 01:43:39 GMT; path=/; secure; HttpOnly; SameSite=None',
'Set-Cookie',
'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrhocsyTyFJScIZLOIqPKuBf7JsFVNra-G96omn-Rb6hj925yYf3AiTslMdNTm5qNQAdOrL679kxYZ5e_snt2VnsG_t0cKtU2R4QuG8XZpyKmJJOAt-UQ7BBGYjMGLUQlf3otBmva6FWpn3k4I6ukWxa5nzD7mRJUq9ntis_uzh3cgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None',
'Set-Cookie',
'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly',
'Set-Cookie',
'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly',
'Date',
'Tue, 09 Nov 2021 01:43:39 GMT',
'Content-Length',
'980'
]);
nock('https://login.microsoftonline.com:443', { "encodedQueryParams": true })
.get('/88888888-8888-8888-8888-888888888888/v2.0/.well-known/openid-configuration')
.reply(200, { "token_endpoint": "https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token", "token_endpoint_auth_methods_supported": ["client_secret_post", "private_key_jwt", "client_secret_basic"], "jwks_uri": "https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/discovery/v2.0/keys", "response_modes_supported": ["query", "fragment", "form_post"], "subject_types_supported": ["pairwise"], "id_token_signing_alg_values_supported": ["RS256"], "response_types_supported": ["code", "id_token", "code id_token", "id_token token"], "scopes_supported": ["openid", "profile", "email", "offline_access"], "issuer": "https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/v2.0", "request_uri_parameter_supported": false, "userinfo_endpoint": "https://graph.microsoft.com/oidc/userinfo", "authorization_endpoint": "https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/authorize", "device_authorization_endpoint": "https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/devicecode", "http_logout_supported": true, "frontchannel_logout_supported": true, "end_session_endpoint": "https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/logout", "claims_supported": ["sub", "iss", "cloud_instance_name", "cloud_instance_host_name", "cloud_graph_host_name", "msgraph_host", "aud", "exp", "iat", "auth_time", "acr", "nonce", "preferred_username", "name", "tid", "ver", "at_hash", "c_hash", "email"], "kerberos_endpoint": "https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/kerberos", "tenant_region_scope": "WW", "cloud_instance_name": "microsoftonline.com", "cloud_graph_host_name": "graph.windows.net", "msgraph_host": "graph.microsoft.com", "rbac_url": "https://pas.windows.net" }, [
'Cache-Control',
'max-age=86400, private',
'Content-Type',
'application/json; charset=utf-8',
'Strict-Transport-Security',
'max-age=31536000; includeSubDomains',
'X-Content-Type-Options',
'nosniff',
'Access-Control-Allow-Origin',
'*',
'Access-Control-Allow-Methods',
'GET, OPTIONS',
'P3P',
'CP="DSP CUR OTPi IND OTRi ONL FIN"',
'x-ms-request-id',
'c32f5b8f-7521-4c8d-b841-264c9c7bb900',
'x-ms-ests-server',
'2.1.12197.4 - WUS2 ProdSlices',
'Set-Cookie',
'fpc=Al0W8jksIadPthDu5FBbpV4; expires=Thu, 09-Dec-2021 01:43:39 GMT; path=/; secure; HttpOnly; SameSite=None',
'Set-Cookie',
'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrN9dL7rvuFw4RUzKoutDgz-bP-WrV2bNMqBK0z93ipEivFrR5J8tBNsn9QISd9it44ADKWZvyAFO6RJn1h9DUmgIiGPNKhhM5zEmVldhLHYDeib-DikONq6BJ1LwUHWortfS_7F-YUOhLsg3NcHbUKnRlgG2He_j1N5NWXKhqY2UgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None',
'Set-Cookie',
'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly',
'Set-Cookie',
'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly',
'Date',
'Tue, 09 Nov 2021 01:43:39 GMT',
'Content-Length',
'1753'
]);
nock('https://login.microsoftonline.com:443', { "encodedQueryParams": true })
.post('/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token', "client_id=azure_client_id&scope=https%3A%2F%2Fsanitized%2F&grant_type=client_credentials&x-client-SKU=msal.js.node&x-client-VER=1.3.2&x-client-OS=linux&x-client-CPU=x64&x-ms-lib-capability=retry-after, h429&x-client-current-telemetry=5|771,2,,,|,&x-client-last-telemetry=5|0|||0,0&client-request-id=7b31bf47-4740-4685-8dfb-f9c296401b2a&client_secret=azure_client_secret&claims=%7B%22access_token%22%3A%7B%22xms_cc%22%3A%7B%22values%22%3A%5B%22cp1%22%5D%7D%7D%7D")
.reply(200, { "token_type": "Bearer", "expires_in": 86399, "ext_expires_in": 86399, "access_token": "access_token" }, [
'Cache-Control',
'no-store, no-cache',
'Pragma',
'no-cache',
'Content-Type',
'application/json; charset=utf-8',
'Expires',
'-1',
'Strict-Transport-Security',
'max-age=31536000; includeSubDomains',
'X-Content-Type-Options',
'nosniff',
'P3P',
'CP="DSP CUR OTPi IND OTRi ONL FIN"',
'x-ms-request-id',
'ccb20cb1-6f40-4498-b2d4-32c2b15daa00',
'x-ms-ests-server',
'2.1.12197.4 - NCUS ProdSlices',
'x-ms-clitelem',
'1,0,0,,',
'Set-Cookie',
'fpc=Arj2C0gLlYRNiwBHQA7LHVfJVDEwAQAAAEzJG9kOAAAA; expires=Thu, 09-Dec-2021 01:43:40 GMT; path=/; secure; HttpOnly; SameSite=None',
'Set-Cookie',
'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly',
'Set-Cookie',
'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly',
'Date',
'Tue, 09 Nov 2021 01:43:40 GMT',
'Content-Length',
'1318'
]);
nock('https://fakeaccount.table.core.windows.net:443', { "encodedQueryParams": true })
.post('/Tables', { "TableName": "batchTableTestTokenCredentialnode" })
.reply(201, { "odata.metadata": "https://fakeaccount.table.core.windows.net/$metadata#Tables/@Element", "TableName": "batchTableTestTokenCredentialnode" }, [
'Cache-Control',
'no-cache',
'Transfer-Encoding',
'chunked',
'Content-Type',
'application/json;odata=minimalmetadata;streaming=true;charset=utf-8',
'Location',
"https://fakeaccount.table.core.windows.net/Tables('batchTableTestTokenCredentialnode')",
'Server',
'Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0',
'x-ms-request-id',
'58e1c467-9002-0133-240b-d59ec7000000',
'x-ms-client-request-id',
'79dfdd1e-2687-4647-a7c4-5a28e5c3095a',
'x-ms-version',
'2019-02-02',
'X-Content-Type-Options',
'nosniff',
'Date',
'Tue, 09 Nov 2021 01:43:40 GMT'
]);
nock('https://fakeaccount.table.core.windows.net:443', { "encodedQueryParams": true })
.post('/$batch', "--batch_fakeId\r\ncontent-type: multipart/mixed; boundary=changeset_fakeId\r\n\r\n\r\n--changeset_fakeId\r\ncontent-type: application/http\r\ncontent-transfer-encoding: binary\r\n\r\nPOST https://fakeaccount.table.core.windows.net/batchTableTestTokenCredentialnode HTTP/1.1\r\ncontent-type: application/json;odata=nometadata\r\naccept: application/json;odata=minimalmetadata\r\ndataserviceversion: 3.0\r\nprefer: return-no-content\r\n\r\n\r\n{\"PartitionKey\":\"\",\"RowKey\":\"\",\"value\":\"\"}\r\n--changeset_fakeId--\r\n--batch_fakeId--\r\n")
.reply(202, "--batchresponse_a92b7076-8702-4318-8507-6cd580f1edb5\r\nContent-Type: multipart/mixed; boundary=changesetresponse_42c060d3-5863-4fc2-9eb2-e265212f80a3\r\n\r\n--changesetresponse_42c060d3-5863-4fc2-9eb2-e265212f80a3\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://fakeaccount.table.core.windows.net/batchTableTestTokenCredentialnode(PartitionKey='',RowKey='')\r\nDataServiceId: https://fakeaccount.table.core.windows.net/batchTableTestTokenCredentialnode(PartitionKey='',RowKey='')\r\nETag: W/\"datetime'2021-11-09T01%3A43%3A40.499321Z'\"\r\n\r\n\r\n--changesetresponse_42c060d3-5863-4fc2-9eb2-e265212f80a3--\r\n--batchresponse_a92b7076-8702-4318-8507-6cd580f1edb5--\r\n", [
'Cache-Control',
'no-cache',
'Transfer-Encoding',
'chunked',
'Content-Type',
'multipart/mixed; boundary=batchresponse_a92b7076-8702-4318-8507-6cd580f1edb5',
'Server',
'Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0',
'x-ms-request-id',
'58e1c4b5-9002-0133-6a0b-d59ec7000000',
'x-ms-client-request-id',
'089038f7-870b-451b-a68d-d4fc835bff2f',
'x-ms-version',
'2019-02-02',
'X-Content-Type-Options',
'nosniff',
'Date',
'Tue, 09 Nov 2021 01:43:40 GMT'
]);
nock('https://fakeaccount.table.core.windows.net:443', { "encodedQueryParams": true })
.post('/$batch', "--batch_fakeId\r\ncontent-type: multipart/mixed; boundary=changeset_fakeId\r\n\r\n\r\n--changeset_fakeId\r\ncontent-type: application/http\r\ncontent-transfer-encoding: binary\r\n\r\nPATCH https://fakeaccount.table.core.windows.net/batchTableTestTokenCredentialnode(PartitionKey='',RowKey='') HTTP/1.1\r\ncontent-type: application/json\r\ndataserviceversion: 3.0\r\naccept: application/json\r\nif-match: *\r\n\r\n\r\n{\"PartitionKey\":\"\",\"RowKey\":\"\",\"value\":\"updated\"}\r\n--changeset_fakeId--\r\n--batch_fakeId--\r\n")
.reply(202, "--batchresponse_ffee660c-e56a-4107-af4d-51fda22d7f6f\r\nContent-Type: multipart/mixed; boundary=changesetresponse_0fe141bf-2f97-49aa-873f-d3967464c348\r\n\r\n--changesetresponse_0fe141bf-2f97-49aa-873f-d3967464c348\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-11-09T01%3A43%3A40.5435185Z'\"\r\n\r\n\r\n--changesetresponse_0fe141bf-2f97-49aa-873f-d3967464c348--\r\n--batchresponse_ffee660c-e56a-4107-af4d-51fda22d7f6f--\r\n", [
'Cache-Control',
'no-cache',
'Transfer-Encoding',
'chunked',
'Content-Type',
'multipart/mixed; boundary=batchresponse_ffee660c-e56a-4107-af4d-51fda22d7f6f',
'Server',
'Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0',
'x-ms-request-id',
'58e1c4ce-9002-0133-020b-d59ec7000000',
'x-ms-client-request-id',
'b0b37b1d-9977-4c4a-aa37-7f1e09814da7',
'x-ms-version',
'2019-02-02',
'X-Content-Type-Options',
'nosniff',
'Date',
'Tue, 09 Nov 2021 01:43:40 GMT'
]);
nock('https://fakeaccount.table.core.windows.net:443', { "encodedQueryParams": true })
.get(`/batchTableTestTokenCredentialnode(PartitionKey='',RowKey='')`)
.reply(200, { "odata.metadata": "https://fakeaccount.table.core.windows.net/$metadata#batchTableTestTokenCredentialnode/@Element", "odata.etag": "W/\"datetime'2021-11-09T01%3A43%3A40.5435185Z'\"", "PartitionKey": "", "RowKey": "", "Timestamp": "2021-11-09T01:43:40.5435185Z", "value": "updated" }, [
'Cache-Control',
'no-cache',
'Transfer-Encoding',
'chunked',
'Content-Type',
'application/json;odata=minimalmetadata;streaming=true;charset=utf-8',
'ETag',
`W/"datetime'2021-11-09T01%3A43%3A40.5435185Z'"`,
'Server',
'Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0',
'x-ms-request-id',
'58e1c4e5-9002-0133-180b-d59ec7000000',
'x-ms-client-request-id',
'a0fcf1ea-de3b-4803-883f-24cfb97c819f',
'x-ms-version',
'2019-02-02',
'X-Content-Type-Options',
'nosniff',
'Access-Control-Expose-Headers',
'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,X-Content-Type-Options,Cache-Control,ETag,Content-Type,Content-Length,Date,Transfer-Encoding',
'Access-Control-Allow-Origin',
'*',
'Date',
'Tue, 09 Nov 2021 01:43:40 GMT'
]);
nock('https://fakeaccount.table.core.windows.net:443', { "encodedQueryParams": true })
.post('/$batch', "--batch_fakeId\r\ncontent-type: multipart/mixed; boundary=changeset_fakeId\r\n\r\n\r\n--changeset_fakeId\r\ncontent-type: application/http\r\ncontent-transfer-encoding: binary\r\n\r\nPATCH https://fakeaccount.table.core.windows.net/batchTableTestTokenCredentialnode(PartitionKey='',RowKey='') HTTP/1.1\r\ncontent-type: application/json\r\ndataserviceversion: 3.0\r\naccept: application/json\r\n\r\n\r\n{\"PartitionKey\":\"\",\"RowKey\":\"\",\"value\":\"upserted\"}\r\n--changeset_fakeId--\r\n--batch_fakeId--\r\n")
.reply(202, "--batchresponse_f995a456-1a59-4cab-9c47-6a5354bc13a6\r\nContent-Type: multipart/mixed; boundary=changesetresponse_dda9eb47-5e12-4080-9cd9-9a94a329bd74\r\n\r\n--changesetresponse_dda9eb47-5e12-4080-9cd9-9a94a329bd74\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-11-09T01%3A43%3A40.6264728Z'\"\r\n\r\n\r\n--changesetresponse_dda9eb47-5e12-4080-9cd9-9a94a329bd74--\r\n--batchresponse_f995a456-1a59-4cab-9c47-6a5354bc13a6--\r\n", [
'Cache-Control',
'no-cache',
'Transfer-Encoding',
'chunked',
'Content-Type',
'multipart/mixed; boundary=batchresponse_f995a456-1a59-4cab-9c47-6a5354bc13a6',
'Server',
'Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0',
'x-ms-request-id',
'58e1c4fd-9002-0133-300b-d59ec7000000',
'x-ms-client-request-id',
'4fb9ccaa-1bad-4fb8-affb-8d4f90b9ef32',
'x-ms-version',
'2019-02-02',
'X-Content-Type-Options',
'nosniff',
'Date',
'Tue, 09 Nov 2021 01:43:40 GMT'
]);
nock('https://fakeaccount.table.core.windows.net:443', { "encodedQueryParams": true })
.get(`/batchTableTestTokenCredentialnode(PartitionKey='',RowKey='')`)
.reply(200, { "odata.metadata": "https://fakeaccount.table.core.windows.net/$metadata#batchTableTestTokenCredentialnode/@Element", "odata.etag": "W/\"datetime'2021-11-09T01%3A43%3A40.6264728Z'\"", "PartitionKey": "", "RowKey": "", "Timestamp": "2021-11-09T01:43:40.6264728Z", "value": "upserted" }, [
'Cache-Control',
'no-cache',
'Transfer-Encoding',
'chunked',
'Content-Type',
'application/json;odata=minimalmetadata;streaming=true;charset=utf-8',
'ETag',
`W/"datetime'2021-11-09T01%3A43%3A40.6264728Z'"`,
'Server',
'Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0',
'x-ms-request-id',
'58e1c512-9002-0133-450b-d59ec7000000',
'x-ms-client-request-id',
'36d3268c-8da8-44e9-beb4-86c971075abc',
'x-ms-version',
'2019-02-02',
'X-Content-Type-Options',
'nosniff',
'Access-Control-Expose-Headers',
'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,X-Content-Type-Options,Cache-Control,ETag,Content-Type,Content-Length,Date,Transfer-Encoding',
'Access-Control-Allow-Origin',
'*',
'Date',
'Tue, 09 Nov 2021 01:43:40 GMT'
]);

Просмотреть файл

@ -0,0 +1,87 @@
let nock = require('nock');
module.exports.hash = "bc232e4b36253a7a7c22fa8a40d13ad3";
module.exports.testInfo = {"uniqueName":{},"newDate":{}}
nock('https://fakeaccount.table.core.windows.net:443', {"encodedQueryParams":true})
.post('/tableClientTestSASConnectionStringnode', {"PartitionKey":"","RowKey":"","testField":"testEntity"})
.query(true)
.reply(204, "", [
'Cache-Control',
'no-cache',
'Content-Length',
'0',
'ETag',
`W/"datetime'2021-11-09T00%3A41%3A25.3706118Z'"`,
'Location',
"https://fakeaccount.table.core.windows.net/tableClientTestSASConnectionStringnode(PartitionKey='',RowKey='')",
'Server',
'Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0',
'x-ms-request-id',
'72974220-f002-0086-5c02-d5d56d000000',
'x-ms-client-request-id',
'345e610b-7dac-4909-8988-eb816e634f77',
'x-ms-version',
'2019-02-02',
'X-Content-Type-Options',
'nosniff',
'Preference-Applied',
'return-no-content',
'DataServiceId',
"https://fakeaccount.table.core.windows.net/tableClientTestSASConnectionStringnode(PartitionKey='',RowKey='')",
'Date',
'Tue, 09 Nov 2021 00:41:24 GMT'
]);
nock('https://fakeaccount.table.core.windows.net:443', {"encodedQueryParams":true})
.get(`/tableClientTestSASConnectionStringnode(PartitionKey='',RowKey='')`)
.query(true)
.reply(200, {"odata.metadata":"https://fakeaccount.table.core.windows.net/$metadata#tableClientTestSASConnectionStringnode/@Element","odata.etag":"W/\"datetime'2021-11-09T00%3A41%3A25.3706118Z'\"","PartitionKey":"","RowKey":"","Timestamp":"2021-11-09T00:41:25.3706118Z","testField":"testEntity"}, [
'Cache-Control',
'no-cache',
'Transfer-Encoding',
'chunked',
'Content-Type',
'application/json;odata=minimalmetadata;streaming=true;charset=utf-8',
'ETag',
`W/"datetime'2021-11-09T00%3A41%3A25.3706118Z'"`,
'Server',
'Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0',
'x-ms-request-id',
'7297422f-f002-0086-6b02-d5d56d000000',
'x-ms-client-request-id',
'234119a2-f5f9-4396-9a3c-9d325f868677',
'x-ms-version',
'2019-02-02',
'X-Content-Type-Options',
'nosniff',
'Access-Control-Expose-Headers',
'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,X-Content-Type-Options,Cache-Control,ETag,Content-Type,Content-Length,Date,Transfer-Encoding',
'Access-Control-Allow-Origin',
'*',
'Date',
'Tue, 09 Nov 2021 00:41:24 GMT'
]);
nock('https://fakeaccount.table.core.windows.net:443', {"encodedQueryParams":true})
.delete(`/tableClientTestSASConnectionStringnode(PartitionKey='',RowKey='')`)
.query(true)
.reply(204, "", [
'Cache-Control',
'no-cache',
'Content-Length',
'0',
'Server',
'Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0',
'x-ms-request-id',
'7297423a-f002-0086-7602-d5d56d000000',
'x-ms-client-request-id',
'71d40580-09d9-4f3c-b5fe-81a3b6fd9441',
'x-ms-version',
'2019-02-02',
'X-Content-Type-Options',
'nosniff',
'Date',
'Tue, 09 Nov 2021 00:41:24 GMT'
]);

Просмотреть файл

@ -0,0 +1,190 @@
let nock = require('nock');
module.exports.hash = "bc232e4b36253a7a7c22fa8a40d13ad3";
module.exports.testInfo = { "uniqueName": {}, "newDate": {} }
nock('https://login.microsoftonline.com:443', { "encodedQueryParams": true })
.get('/common/discovery/instance')
.query(true)
.reply(200, { "tenant_discovery_endpoint": "https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/v2.0/.well-known/openid-configuration", "api-version": "1.1", "metadata": [{ "preferred_network": "login.microsoftonline.com", "preferred_cache": "login.windows.net", "aliases": ["login.microsoftonline.com", "login.windows.net", "login.microsoft.com", "sts.windows.net"] }, { "preferred_network": "login.partner.microsoftonline.cn", "preferred_cache": "login.partner.microsoftonline.cn", "aliases": ["login.partner.microsoftonline.cn", "login.chinacloudapi.cn"] }, { "preferred_network": "login.microsoftonline.de", "preferred_cache": "login.microsoftonline.de", "aliases": ["login.microsoftonline.de"] }, { "preferred_network": "login.microsoftonline.us", "preferred_cache": "login.microsoftonline.us", "aliases": ["login.microsoftonline.us", "login.usgovcloudapi.net"] }, { "preferred_network": "login-us.microsoftonline.com", "preferred_cache": "login-us.microsoftonline.com", "aliases": ["login-us.microsoftonline.com"] }] }, [
'Cache-Control',
'max-age=86400, private',
'Content-Type',
'application/json; charset=utf-8',
'Strict-Transport-Security',
'max-age=31536000; includeSubDomains',
'X-Content-Type-Options',
'nosniff',
'Access-Control-Allow-Origin',
'*',
'Access-Control-Allow-Methods',
'GET, OPTIONS',
'P3P',
'CP="DSP CUR OTPi IND OTRi ONL FIN"',
'x-ms-request-id',
'e41712a8-4716-44fe-b9d0-40fd139bc400',
'x-ms-ests-server',
'2.1.12171.15 - EUS ProdSlices',
'Set-Cookie',
'fpc=AnztuPKK-sdPs9DTjkxIl2I; expires=Thu, 09-Dec-2021 00:41:24 GMT; path=/; secure; HttpOnly; SameSite=None',
'Set-Cookie',
'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7Wevr_bMEB0YssoNv07xZL3R_YGp9mCVHxusH85pDr2xJ08BdOcIPqwj2CKy2AZrzE7ZwgxRFfilDwkwEYgAxWfJlzYJ4ZOp9NhPN02zCDhyXEOJcH618uuAJdUSMJ60XmGnCUaYyyC6XKbI7wkJLIMRwr-N2rU77qRoyR-DJNR6TqdwgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None',
'Set-Cookie',
'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly',
'Set-Cookie',
'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly',
'Date',
'Tue, 09 Nov 2021 00:41:24 GMT',
'Content-Length',
'980'
]);
nock('https://login.microsoftonline.com:443', { "encodedQueryParams": true })
.get('/88888888-8888-8888-8888-888888888888/v2.0/.well-known/openid-configuration')
.reply(200, { "token_endpoint": "https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token", "token_endpoint_auth_methods_supported": ["client_secret_post", "private_key_jwt", "client_secret_basic"], "jwks_uri": "https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/discovery/v2.0/keys", "response_modes_supported": ["query", "fragment", "form_post"], "subject_types_supported": ["pairwise"], "id_token_signing_alg_values_supported": ["RS256"], "response_types_supported": ["code", "id_token", "code id_token", "id_token token"], "scopes_supported": ["openid", "profile", "email", "offline_access"], "issuer": "https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/v2.0", "request_uri_parameter_supported": false, "userinfo_endpoint": "https://graph.microsoft.com/oidc/userinfo", "authorization_endpoint": "https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/authorize", "device_authorization_endpoint": "https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/devicecode", "http_logout_supported": true, "frontchannel_logout_supported": true, "end_session_endpoint": "https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/logout", "claims_supported": ["sub", "iss", "cloud_instance_name", "cloud_instance_host_name", "cloud_graph_host_name", "msgraph_host", "aud", "exp", "iat", "auth_time", "acr", "nonce", "preferred_username", "name", "tid", "ver", "at_hash", "c_hash", "email"], "kerberos_endpoint": "https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/kerberos", "tenant_region_scope": "WW", "cloud_instance_name": "microsoftonline.com", "cloud_graph_host_name": "graph.windows.net", "msgraph_host": "graph.microsoft.com", "rbac_url": "https://pas.windows.net" }, [
'Cache-Control',
'max-age=86400, private',
'Content-Type',
'application/json; charset=utf-8',
'Strict-Transport-Security',
'max-age=31536000; includeSubDomains',
'X-Content-Type-Options',
'nosniff',
'Access-Control-Allow-Origin',
'*',
'Access-Control-Allow-Methods',
'GET, OPTIONS',
'P3P',
'CP="DSP CUR OTPi IND OTRi ONL FIN"',
'x-ms-request-id',
'3698112b-cd73-416e-af8a-3f15d67cdc00',
'x-ms-ests-server',
'2.1.12197.4 - EUS ProdSlices',
'Set-Cookie',
'fpc=Ahp8tip9AYNEmGR70MYJ17E; expires=Thu, 09-Dec-2021 00:41:24 GMT; path=/; secure; HttpOnly; SameSite=None',
'Set-Cookie',
'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrxiGD0RRhwqM2ELhZk67naYXyYQnyNpPC_opJq66b5Mo0ULjXMF_OaHUlvRwcZQdsueJ8bymVyOg_yNG0HgV-c9CV4icFJzj1eg31iFYlKAKNX9eUPVRXsy6ctdQgsCFH3mLiTBJu-sb5z8rubBNgSmh5HRtEH-QD9fBNBMeHt8cgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None',
'Set-Cookie',
'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly',
'Set-Cookie',
'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly',
'Date',
'Tue, 09 Nov 2021 00:41:24 GMT',
'Content-Length',
'1753'
]);
nock('https://login.microsoftonline.com:443', { "encodedQueryParams": true })
.post('/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token', "client_id=azure_client_id&scope=https%3A%2F%2Fsanitized%2F&grant_type=client_credentials&x-client-SKU=msal.js.node&x-client-VER=1.3.2&x-client-OS=linux&x-client-CPU=x64&x-ms-lib-capability=retry-after, h429&x-client-current-telemetry=5|771,2,,,|,&x-client-last-telemetry=5|0|||0,0&client-request-id=c708fe9e-d415-4645-8a69-9bc37be6c0cc&client_secret=azure_client_secret&claims=%7B%22access_token%22%3A%7B%22xms_cc%22%3A%7B%22values%22%3A%5B%22cp1%22%5D%7D%7D%7D")
.reply(200, { "token_type": "Bearer", "expires_in": 86399, "ext_expires_in": 86399, "access_token": "access_token" }, [
'Cache-Control',
'no-store, no-cache',
'Pragma',
'no-cache',
'Content-Type',
'application/json; charset=utf-8',
'Expires',
'-1',
'Strict-Transport-Security',
'max-age=31536000; includeSubDomains',
'X-Content-Type-Options',
'nosniff',
'P3P',
'CP="DSP CUR OTPi IND OTRi ONL FIN"',
'x-ms-request-id',
'0989961c-71ed-479a-8c98-50978930b000',
'x-ms-ests-server',
'2.1.12197.4 - WUS2 ProdSlices',
'x-ms-clitelem',
'1,0,0,,',
'Set-Cookie',
'fpc=AjXbfY_FdpFMgyxjyYlLbPvJVDEwAQAAALS6G9kOAAAA; expires=Thu, 09-Dec-2021 00:41:25 GMT; path=/; secure; HttpOnly; SameSite=None',
'Set-Cookie',
'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly',
'Set-Cookie',
'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly',
'Date',
'Tue, 09 Nov 2021 00:41:24 GMT',
'Content-Length',
'1318'
]);
nock('https://fakeaccount.table.core.windows.net:443', { "encodedQueryParams": true })
.post('/tableClientTestTokenCredentialnode', { "PartitionKey": "", "RowKey": "", "testField": "testEntity" })
.reply(204, "", [
'Cache-Control',
'no-cache',
'Content-Length',
'0',
'ETag',
`W/"datetime'2021-11-09T00%3A41%3A25.1447408Z'"`,
'Location',
"https://fakeaccount.table.core.windows.net/tableClientTestTokenCredentialnode(PartitionKey='',RowKey='')",
'Server',
'Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0',
'x-ms-request-id',
'729741ca-f002-0086-0b02-d5d56d000000',
'x-ms-client-request-id',
'3d6c9ed4-67d3-414e-94dc-db9979f48e5f',
'x-ms-version',
'2019-02-02',
'X-Content-Type-Options',
'nosniff',
'Preference-Applied',
'return-no-content',
'DataServiceId',
"https://fakeaccount.table.core.windows.net/tableClientTestTokenCredentialnode(PartitionKey='',RowKey='')",
'Date',
'Tue, 09 Nov 2021 00:41:24 GMT'
]);
nock('https://fakeaccount.table.core.windows.net:443', { "encodedQueryParams": true })
.get(`/tableClientTestTokenCredentialnode(PartitionKey='',RowKey='')`)
.reply(200, { "odata.metadata": "https://fakeaccount.table.core.windows.net/$metadata#tableClientTestTokenCredentialnode/@Element", "odata.etag": "W/\"datetime'2021-11-09T00%3A41%3A25.1447408Z'\"", "PartitionKey": "", "RowKey": "", "Timestamp": "2021-11-09T00:41:25.1447408Z", "testField": "testEntity" }, [
'Cache-Control',
'no-cache',
'Transfer-Encoding',
'chunked',
'Content-Type',
'application/json;odata=minimalmetadata;streaming=true;charset=utf-8',
'ETag',
`W/"datetime'2021-11-09T00%3A41%3A25.1447408Z'"`,
'Server',
'Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0',
'x-ms-request-id',
'729741de-f002-0086-1d02-d5d56d000000',
'x-ms-client-request-id',
'11715219-5690-4d0d-bbcc-126538462a4b',
'x-ms-version',
'2019-02-02',
'X-Content-Type-Options',
'nosniff',
'Access-Control-Expose-Headers',
'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,X-Content-Type-Options,Cache-Control,ETag,Content-Type,Content-Length,Date,Transfer-Encoding',
'Access-Control-Allow-Origin',
'*',
'Date',
'Tue, 09 Nov 2021 00:41:24 GMT'
]);
nock('https://fakeaccount.table.core.windows.net:443', { "encodedQueryParams": true })
.delete(`/tableClientTestTokenCredentialnode(PartitionKey='',RowKey='')`)
.reply(204, "", [
'Cache-Control',
'no-cache',
'Content-Length',
'0',
'Server',
'Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0',
'x-ms-request-id',
'729741ee-f002-0086-2c02-d5d56d000000',
'x-ms-client-request-id',
'8fd7941c-4d26-489a-a9a0-6d75cf42cb66',
'x-ms-version',
'2019-02-02',
'X-Content-Type-Options',
'nosniff',
'Date',
'Tue, 09 Nov 2021 00:41:24 GMT'
]);

Просмотреть файл

@ -708,10 +708,6 @@ export class TableClient {
const { span, updatedOptions } = createSpan(`TableClient-updateEntity-${mode}`, options);
try {
if (!entity.partitionKey || !entity.rowKey) {
throw new Error("partitionKey and rowKey must be defined");
}
const partitionKey = escapeQuotes(entity.partitionKey);
const rowKey = escapeQuotes(entity.rowKey);
@ -784,10 +780,6 @@ export class TableClient {
const { span, updatedOptions } = createSpan(`TableClient-upsertEntity-${mode}`, options);
try {
if (!entity.partitionKey || !entity.rowKey) {
throw new Error("partitionKey and rowKey must be defined");
}
const partitionKey = escapeQuotes(entity.partitionKey);
const rowKey = escapeQuotes(entity.rowKey);

Просмотреть файл

@ -226,6 +226,28 @@ authModes.forEach((authMode) => {
assert.equal(result.testField, testEntity.testField);
});
it("should createEntity empty partition and row keys", async () => {
type TestType = { testField: string };
const testEntity: TableEntity<TestType> = {
partitionKey: "",
rowKey: "",
testField: "testEntity"
};
let createResult: FullOperationResponse | undefined;
let deleteResult: FullOperationResponse | undefined;
await client.createEntity(testEntity, { onResponse: (res) => (createResult = res) });
const result = await client.getEntity<TestType>(testEntity.partitionKey, testEntity.rowKey);
await client.deleteEntity(testEntity.partitionKey, testEntity.rowKey, {
onResponse: (res) => (deleteResult = res)
});
assert.equal(deleteResult?.status, 204);
assert.equal(createResult?.status, 204);
assert.equal(result.partitionKey, testEntity.partitionKey);
assert.equal(result.rowKey, testEntity.rowKey);
assert.equal(result.testField, testEntity.testField);
});
it("should select specific properties", async () => {
const testEntity = {
partitionKey: `P2_${suffix}`,

Просмотреть файл

@ -225,5 +225,26 @@ authModes.forEach((authMode) => {
assert.equal(entityCount, 6);
});
it("should support empty partition and row keys", async () => {
const actions1: TransactionAction[] = [
["create", { partitionKey: "", rowKey: "", value: "" }]
];
await client.submitTransaction(actions1);
await client.submitTransaction([
["update", { partitionKey: "", rowKey: "", value: "updated" }]
]);
let entity = await client.getEntity("", "");
assert.equal(entity.value, "updated");
await client.submitTransaction([
["upsert", { partitionKey: "", rowKey: "", value: "upserted" }]
]);
entity = await client.getEntity("", "");
assert.equal(entity.value, "upserted");
});
});
});