diff --git a/libraries/botbuilder-azure/src/cosmosDbStorage.ts b/libraries/botbuilder-azure/src/cosmosDbStorage.ts index 535f848497..92036a6206 100644 --- a/libraries/botbuilder-azure/src/cosmosDbStorage.ts +++ b/libraries/botbuilder-azure/src/cosmosDbStorage.ts @@ -48,6 +48,7 @@ export interface CosmosDbStorageSettings { documentCollectionRequestOptions?: RequestOptions; /** * (Optional) partitionKey that are passed when the document CosmosDbStorage is created. + * @deprecated Please use [[CosmosDbPartitionedStorage]]. See https://github.com/microsoft/botframework-sdk/issues/5467 */ partitionKey?: string; } diff --git a/libraries/botbuilder-azure/tests/TestData/BlobStorage/key_update.json b/libraries/botbuilder-azure/tests/TestData/BlobStorage - Base Storage Tests/create_an_object.json similarity index 66% rename from libraries/botbuilder-azure/tests/TestData/BlobStorage/key_update.json rename to libraries/botbuilder-azure/tests/TestData/BlobStorage - Base Storage Tests/create_an_object.json index 5c70aa1878..572605d5c9 100644 --- a/libraries/botbuilder-azure/tests/TestData/BlobStorage/key_update.json +++ b/libraries/botbuilder-azure/tests/TestData/BlobStorage - Base Storage Tests/create_an_object.json @@ -2,12 +2,12 @@ { "scope": "http://127.0.0.1:10000", "method": "PUT", - "path": "/devstoreaccount1/test/keyUpdate", + "path": "/devstoreaccount1/test/createPoco", "body": { - "id": "keyUpdate", - "realId": "keyUpdate", + "id": "createPoco", + "realId": "createPoco", "document": { - "count": 1 + "id": 1 } }, "status": 201, @@ -16,51 +16,85 @@ "Transfer-Encoding", "chunked", "Content-MD5", - "mRHqsKf9ZPSGe3627DcIFg==", + "0oggDrDUjV81m/z5A1GUxw==", "Last-Modified", - "Fri, 26 Oct 2018 14:59:47 GMT", + "Thu, 12 Dec 2019 23:27:13 GMT", "ETag", - "\"0x8D63B53AC0D21D0\"", + "\"0x8D77F5AD196F510\"", "Server", "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-request-id", - "5952e647-12f7-43aa-8f7c-d8f235d35e11", + "f15206d4-c545-44d2-9d36-3bbcdad53e71", "x-ms-version", "2018-03-28", "x-ms-request-server-encrypted", "true", "Date", - "Fri, 26 Oct 2018 14:59:47 GMT" + "Thu, 12 Dec 2019 23:27:13 GMT" + ] + }, + { + "scope": "http://127.0.0.1:10000", + "method": "PUT", + "path": "/devstoreaccount1/test/createPocoStoreItem", + "body": { + "id": "createPocoStoreItem", + "realId": "createPocoStoreItem", + "document": { + "id": 2 + } + }, + "status": 201, + "response": "", + "rawHeaders": [ + "Transfer-Encoding", + "chunked", + "Content-MD5", + "5JeqCrMTe0GsO1yvwrZArw==", + "Last-Modified", + "Thu, 12 Dec 2019 23:27:13 GMT", + "ETag", + "\"0x8D77F5AD19B88F0\"", + "Server", + "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-request-id", + "cb6ec39e-aca9-4569-8f5b-b796d3d15005", + "x-ms-version", + "2018-03-28", + "x-ms-request-server-encrypted", + "true", + "Date", + "Thu, 12 Dec 2019 23:27:13 GMT" ] }, { "scope": "http://127.0.0.1:10000", "method": "HEAD", - "path": "/devstoreaccount1/test/keyUpdate", + "path": "/devstoreaccount1/test/createPoco", "body": "", "status": 200, "response": "", "rawHeaders": [ "Content-Length", - "62", + "61", "Content-Type", "application/octet-stream", "Content-MD5", - "mRHqsKf9ZPSGe3627DcIFg==", + "0oggDrDUjV81m/z5A1GUxw==", "Last-Modified", - "Fri, 26 Oct 2018 14:59:47 GMT", + "Thu, 12 Dec 2019 23:27:13 GMT", "Accept-Ranges", "bytes", "ETag", - "\"0x8D63B53AC0D21D0\"", + "\"0x8D77F5AD196F510\"", "Server", "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-request-id", - "45d93f19-131d-4cce-b2fe-eb4ca4dc6928", + "989c1b4d-c654-42a1-ac6d-887b28aa3d84", "x-ms-version", "2018-03-28", "x-ms-creation-time", - "Fri, 26 Oct 2018 14:59:47 GMT", + "Thu, 12 Dec 2019 23:27:13 GMT", "x-ms-lease-status", "unlocked", "x-ms-lease-state", @@ -70,67 +104,37 @@ "x-ms-server-encrypted", "true", "Date", - "Fri, 26 Oct 2018 14:59:47 GMT" + "Thu, 12 Dec 2019 23:27:13 GMT" ] }, { "scope": "http://127.0.0.1:10000", "method": "HEAD", - "path": "/devstoreaccount1/test/keyUpdate?comp=metadata", + "path": "/devstoreaccount1/test/createPocoStoreItem", "body": "", "status": 200, "response": "", - "rawHeaders": [ - "Transfer-Encoding", - "chunked", - "Last-Modified", - "Fri, 26 Oct 2018 14:59:47 GMT", - "ETag", - "\"0x8D63B53AC0D21D0\"", - "Server", - "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-request-id", - "eecf6edb-a15d-4f34-8b95-be490ba0eddf", - "x-ms-version", - "2018-03-28", - "Date", - "Fri, 26 Oct 2018 14:59:47 GMT" - ] - }, - { - "scope": "http://127.0.0.1:10000", - "method": "GET", - "path": "/devstoreaccount1/test/keyUpdate", - "body": "", - "status": 200, - "response": { - "id": "keyUpdate", - "realId": "keyUpdate", - "document": { - "count": 1 - } - }, "rawHeaders": [ "Content-Length", - "62", + "79", "Content-Type", "application/octet-stream", "Content-MD5", - "mRHqsKf9ZPSGe3627DcIFg==", + "5JeqCrMTe0GsO1yvwrZArw==", "Last-Modified", - "Fri, 26 Oct 2018 14:59:47 GMT", + "Thu, 12 Dec 2019 23:27:13 GMT", "Accept-Ranges", "bytes", "ETag", - "\"0x8D63B53AC0D21D0\"", + "\"0x8D77F5AD19B88F0\"", "Server", "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-request-id", - "8e8739ec-806a-4ca0-80da-263cec6209b0", + "ff141205-b9b9-4cc5-90e4-470b029ca425", "x-ms-version", "2018-03-28", "x-ms-creation-time", - "Fri, 26 Oct 2018 14:59:47 GMT", + "Thu, 12 Dec 2019 23:27:13 GMT", "x-ms-lease-status", "unlocked", "x-ms-lease-state", @@ -140,143 +144,137 @@ "x-ms-server-encrypted", "true", "Date", - "Fri, 26 Oct 2018 14:59:47 GMT" + "Thu, 12 Dec 2019 23:27:13 GMT" ] }, { "scope": "http://127.0.0.1:10000", - "method": "PUT", - "path": "/devstoreaccount1/test/keyUpdate", - "body": { - "id": "keyUpdate", - "realId": "keyUpdate", - "document": { - "count": 2, - "eTag": "\"0x8D63B53AC0D21D0\"" - } - }, - "status": 201, + "method": "HEAD", + "path": "/devstoreaccount1/test/createPoco?comp=metadata", + "body": "", + "status": 200, "response": "", "rawHeaders": [ "Transfer-Encoding", "chunked", - "Content-MD5", - "iHKPjhQvE6jTZeLXy3ckLA==", "Last-Modified", - "Fri, 26 Oct 2018 14:59:47 GMT", + "Thu, 12 Dec 2019 23:27:13 GMT", "ETag", - "\"0x8D63B53AC3DF5D0\"", + "\"0x8D77F5AD196F510\"", "Server", "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-request-id", - "44503f68-0334-4b69-a968-3f151da5e0bf", + "3de8edc2-a470-478f-aa21-77a579353b65", "x-ms-version", "2018-03-28", - "x-ms-request-server-encrypted", - "true", "Date", - "Fri, 26 Oct 2018 14:59:47 GMT" + "Thu, 12 Dec 2019 23:27:13 GMT" ] }, { "scope": "http://127.0.0.1:10000", "method": "HEAD", - "path": "/devstoreaccount1/test/keyUpdate", + "path": "/devstoreaccount1/test/createPocoStoreItem?comp=metadata", "body": "", "status": 200, "response": "", "rawHeaders": [ - "Content-Length", - "93", - "Content-Type", - "application/octet-stream", - "Content-MD5", - "iHKPjhQvE6jTZeLXy3ckLA==", + "Transfer-Encoding", + "chunked", "Last-Modified", - "Fri, 26 Oct 2018 14:59:47 GMT", - "Accept-Ranges", - "bytes", + "Thu, 12 Dec 2019 23:27:13 GMT", "ETag", - "\"0x8D63B53AC3DF5D0\"", + "\"0x8D77F5AD19B88F0\"", "Server", "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-request-id", - "2d6e27da-db37-40f4-bfc0-5930663dd0eb", + "c46f7cff-c039-4952-a908-e16d3827a555", "x-ms-version", "2018-03-28", - "x-ms-creation-time", - "Fri, 26 Oct 2018 14:59:47 GMT", - "x-ms-lease-status", - "unlocked", - "x-ms-lease-state", - "available", - "x-ms-blob-type", - "BlockBlob", - "x-ms-server-encrypted", - "true", "Date", - "Fri, 26 Oct 2018 14:59:47 GMT" + "Thu, 12 Dec 2019 23:27:13 GMT" ] }, { "scope": "http://127.0.0.1:10000", - "method": "HEAD", - "path": "/devstoreaccount1/test/keyUpdate?comp=metadata", + "method": "GET", + "path": "/devstoreaccount1/test/createPocoStoreItem", "body": "", "status": 200, - "response": "", + "response": { + "id": "createPocoStoreItem", + "realId": "createPocoStoreItem", + "document": { + "id": 2 + } + }, "rawHeaders": [ - "Transfer-Encoding", - "chunked", + "Content-Length", + "79", + "Content-Type", + "application/octet-stream", + "Content-MD5", + "5JeqCrMTe0GsO1yvwrZArw==", "Last-Modified", - "Fri, 26 Oct 2018 14:59:47 GMT", + "Thu, 12 Dec 2019 23:27:13 GMT", + "Accept-Ranges", + "bytes", "ETag", - "\"0x8D63B53AC3DF5D0\"", + "\"0x8D77F5AD19B88F0\"", "Server", "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-request-id", - "b24c4c7c-8b27-4635-9e6c-e8ffffa7923b", + "d0f21e6d-7512-4895-9957-c50a126f4e25", "x-ms-version", "2018-03-28", + "x-ms-creation-time", + "Thu, 12 Dec 2019 23:27:13 GMT", + "x-ms-lease-status", + "unlocked", + "x-ms-lease-state", + "available", + "x-ms-blob-type", + "BlockBlob", + "x-ms-server-encrypted", + "true", "Date", - "Fri, 26 Oct 2018 14:59:47 GMT" + "Thu, 12 Dec 2019 23:27:13 GMT" ] }, { "scope": "http://127.0.0.1:10000", "method": "GET", - "path": "/devstoreaccount1/test/keyUpdate", + "path": "/devstoreaccount1/test/createPoco", "body": "", "status": 200, "response": { - "id": "keyUpdate", - "realId": "keyUpdate", + "id": "createPoco", + "realId": "createPoco", "document": { - "count": 2, - "eTag": "\"0x8D63B53AC0D21D0\"" + "id": 1 } }, "rawHeaders": [ "Content-Length", - "93", + "61", "Content-Type", "application/octet-stream", "Content-MD5", - "iHKPjhQvE6jTZeLXy3ckLA==", + "0oggDrDUjV81m/z5A1GUxw==", "Last-Modified", - "Fri, 26 Oct 2018 14:59:47 GMT", + "Thu, 12 Dec 2019 23:27:13 GMT", "Accept-Ranges", "bytes", "ETag", - "\"0x8D63B53AC3DF5D0\"", + "\"0x8D77F5AD196F510\"", "Server", "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-request-id", - "2f90d6d3-fee1-4c39-8550-5724d9a2d295", + "aefc064f-1b6d-4c30-b6d4-27125e4b35b6", "x-ms-version", "2018-03-28", "x-ms-creation-time", - "Fri, 26 Oct 2018 14:59:47 GMT", + "Thu, 12 Dec 2019 23:27:13 GMT", "x-ms-lease-status", "unlocked", "x-ms-lease-state", @@ -286,7 +284,7 @@ "x-ms-server-encrypted", "true", "Date", - "Fri, 26 Oct 2018 14:59:47 GMT" + "Thu, 12 Dec 2019 23:27:13 GMT" ] } ] \ No newline at end of file diff --git a/libraries/botbuilder-azure/tests/TestData/BlobStorage/invalid_eTag.json b/libraries/botbuilder-azure/tests/TestData/BlobStorage - Base Storage Tests/delete_an_object.json similarity index 56% rename from libraries/botbuilder-azure/tests/TestData/BlobStorage/invalid_eTag.json rename to libraries/botbuilder-azure/tests/TestData/BlobStorage - Base Storage Tests/delete_an_object.json index 0fb3be74e8..19ed0cec25 100644 --- a/libraries/botbuilder-azure/tests/TestData/BlobStorage/invalid_eTag.json +++ b/libraries/botbuilder-azure/tests/TestData/BlobStorage - Base Storage Tests/delete_an_object.json @@ -2,11 +2,12 @@ { "scope": "http://127.0.0.1:10000", "method": "PUT", - "path": "/devstoreaccount1/test/keyUpdate2", + "path": "/devstoreaccount1/test/delete1", "body": { - "id": "keyUpdate2", - "realId": "keyUpdate2", + "id": "delete1", + "realId": "delete1", "document": { + "id": 1, "count": 1 } }, @@ -16,51 +17,51 @@ "Transfer-Encoding", "chunked", "Content-MD5", - "/vm0jlVaqrt5LK0nOQSVXg==", + "he1G4Shc3q6lFktp9yTb/w==", "Last-Modified", - "Fri, 26 Oct 2018 14:59:48 GMT", + "Thu, 12 Dec 2019 23:27:14 GMT", "ETag", - "\"0x8D63B53AC637F30\"", + "\"0x8D77F5AD23C5CD0\"", "Server", "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-request-id", - "01c0ae39-80a6-421b-8eab-24e6d0ec02a8", + "a33d7b61-d19f-4b09-b45a-620cac4cf015", "x-ms-version", "2018-03-28", "x-ms-request-server-encrypted", "true", "Date", - "Fri, 26 Oct 2018 14:59:47 GMT" + "Thu, 12 Dec 2019 23:27:14 GMT" ] }, { "scope": "http://127.0.0.1:10000", "method": "HEAD", - "path": "/devstoreaccount1/test/keyUpdate2", + "path": "/devstoreaccount1/test/delete1", "body": "", "status": 200, "response": "", "rawHeaders": [ "Content-Length", - "64", + "65", "Content-Type", "application/octet-stream", "Content-MD5", - "/vm0jlVaqrt5LK0nOQSVXg==", + "he1G4Shc3q6lFktp9yTb/w==", "Last-Modified", - "Fri, 26 Oct 2018 14:59:48 GMT", + "Thu, 12 Dec 2019 23:27:14 GMT", "Accept-Ranges", "bytes", "ETag", - "\"0x8D63B53AC637F30\"", + "\"0x8D77F5AD23C5CD0\"", "Server", "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-request-id", - "2d375110-3055-45be-b0df-8bd1536f5242", + "8f4b9639-eac3-4fa2-89c9-a8ee7b9f164f", "x-ms-version", "2018-03-28", "x-ms-creation-time", - "Fri, 26 Oct 2018 14:59:48 GMT", + "Thu, 12 Dec 2019 23:27:14 GMT", "x-ms-lease-status", "unlocked", "x-ms-lease-state", @@ -70,13 +71,13 @@ "x-ms-server-encrypted", "true", "Date", - "Fri, 26 Oct 2018 14:59:47 GMT" + "Thu, 12 Dec 2019 23:27:14 GMT" ] }, { "scope": "http://127.0.0.1:10000", "method": "HEAD", - "path": "/devstoreaccount1/test/keyUpdate2?comp=metadata", + "path": "/devstoreaccount1/test/delete1?comp=metadata", "body": "", "status": 200, "response": "", @@ -84,53 +85,54 @@ "Transfer-Encoding", "chunked", "Last-Modified", - "Fri, 26 Oct 2018 14:59:48 GMT", + "Thu, 12 Dec 2019 23:27:14 GMT", "ETag", - "\"0x8D63B53AC637F30\"", + "\"0x8D77F5AD23C5CD0\"", "Server", "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-request-id", - "213ad1df-fba9-43b2-b613-e85082ac76be", + "f93a3399-b1a8-4f91-af86-d8247e6c5859", "x-ms-version", "2018-03-28", "Date", - "Fri, 26 Oct 2018 14:59:47 GMT" + "Thu, 12 Dec 2019 23:27:14 GMT" ] }, { "scope": "http://127.0.0.1:10000", "method": "GET", - "path": "/devstoreaccount1/test/keyUpdate2", + "path": "/devstoreaccount1/test/delete1", "body": "", "status": 200, "response": { - "id": "keyUpdate2", - "realId": "keyUpdate2", + "id": "delete1", + "realId": "delete1", "document": { + "id": 1, "count": 1 } }, "rawHeaders": [ "Content-Length", - "64", + "65", "Content-Type", "application/octet-stream", "Content-MD5", - "/vm0jlVaqrt5LK0nOQSVXg==", + "he1G4Shc3q6lFktp9yTb/w==", "Last-Modified", - "Fri, 26 Oct 2018 14:59:48 GMT", + "Thu, 12 Dec 2019 23:27:14 GMT", "Accept-Ranges", "bytes", "ETag", - "\"0x8D63B53AC637F30\"", + "\"0x8D77F5AD23C5CD0\"", "Server", "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-request-id", - "cb6951e3-e08e-468f-a66d-4a9ef6c8d867", + "c2f90b90-7015-4700-ab14-781062b0a6ad", "x-ms-version", "2018-03-28", "x-ms-creation-time", - "Fri, 26 Oct 2018 14:59:48 GMT", + "Thu, 12 Dec 2019 23:27:14 GMT", "x-ms-lease-status", "unlocked", "x-ms-lease-state", @@ -140,73 +142,89 @@ "x-ms-server-encrypted", "true", "Date", - "Fri, 26 Oct 2018 14:59:47 GMT" + "Thu, 12 Dec 2019 23:27:14 GMT" ] }, { "scope": "http://127.0.0.1:10000", - "method": "PUT", - "path": "/devstoreaccount1/test/keyUpdate2", - "body": { - "id": "keyUpdate2", - "realId": "keyUpdate2", - "document": { - "count": 2, - "eTag": "\"0x8D63B53AC637F30\"" - } - }, - "status": 201, + "method": "HEAD", + "path": "/devstoreaccount1/test/delete1", + "body": "", + "status": 200, "response": "", "rawHeaders": [ - "Transfer-Encoding", - "chunked", + "Content-Length", + "65", + "Content-Type", + "application/octet-stream", "Content-MD5", - "d1LMcnC+p/fwLlhtJ9tZOg==", + "he1G4Shc3q6lFktp9yTb/w==", "Last-Modified", - "Fri, 26 Oct 2018 14:59:48 GMT", + "Thu, 12 Dec 2019 23:27:14 GMT", + "Accept-Ranges", + "bytes", "ETag", - "\"0x8D63B53AC89A4D0\"", + "\"0x8D77F5AD23C5CD0\"", "Server", "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-request-id", - "71b379fa-000f-4aa0-84e0-fb29c621ab77", + "71815a13-a078-47e9-baa3-87e72cb0e2b7", "x-ms-version", "2018-03-28", - "x-ms-request-server-encrypted", + "x-ms-creation-time", + "Thu, 12 Dec 2019 23:27:14 GMT", + "x-ms-lease-status", + "unlocked", + "x-ms-lease-state", + "available", + "x-ms-blob-type", + "BlockBlob", + "x-ms-server-encrypted", "true", "Date", - "Fri, 26 Oct 2018 14:59:47 GMT" + "Thu, 12 Dec 2019 23:27:14 GMT" ] }, { "scope": "http://127.0.0.1:10000", - "method": "PUT", - "path": "/devstoreaccount1/test/keyUpdate2", - "body": { - "id": "keyUpdate2", - "realId": "keyUpdate2", - "document": { - "count": 3, - "eTag": "\"0x8D63B53AC637F30\"" - } - }, - "status": 412, - "response": "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:64912c71-6305-4d52-8ab1-120258a27b9a\nTime:2018-10-26T14:59:48.3756499Z", + "method": "DELETE", + "path": "/devstoreaccount1/test/delete1", + "body": "", + "status": 202, + "response": "", "rawHeaders": [ - "Content-Length", - "252", - "Content-Type", - "application/xml", + "Transfer-Encoding", + "chunked", + "Server", + "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-request-id", + "49da22ea-496c-4983-90d9-f0c28f3c5473", + "x-ms-version", + "2018-03-28", + "Date", + "Thu, 12 Dec 2019 23:27:14 GMT" + ] + }, + { + "scope": "http://127.0.0.1:10000", + "method": "HEAD", + "path": "/devstoreaccount1/test/delete1", + "body": "", + "status": 404, + "response": "", + "rawHeaders": [ + "Transfer-Encoding", + "chunked", "Server", "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-request-id", - "64912c71-6305-4d52-8ab1-120258a27b9a", + "46cf7c1d-675e-482d-900e-b8b8c1cfa66e", "x-ms-version", "2018-03-28", "x-ms-error-code", - "ConditionNotMet", + "BlobNotFound", "Date", - "Fri, 26 Oct 2018 14:59:48 GMT" + "Thu, 12 Dec 2019 23:27:14 GMT" ] } ] \ No newline at end of file diff --git a/libraries/botbuilder-azure/tests/TestData/BlobStorage/delete_unknown.json b/libraries/botbuilder-azure/tests/TestData/BlobStorage - Base Storage Tests/does_not_throw_when_deleting_an_unknown_object.json similarity index 76% rename from libraries/botbuilder-azure/tests/TestData/BlobStorage/delete_unknown.json rename to libraries/botbuilder-azure/tests/TestData/BlobStorage - Base Storage Tests/does_not_throw_when_deleting_an_unknown_object.json index 4bc75802c6..5853ab04f1 100644 --- a/libraries/botbuilder-azure/tests/TestData/BlobStorage/delete_unknown.json +++ b/libraries/botbuilder-azure/tests/TestData/BlobStorage - Base Storage Tests/does_not_throw_when_deleting_an_unknown_object.json @@ -2,7 +2,7 @@ { "scope": "http://127.0.0.1:10000", "method": "HEAD", - "path": "/devstoreaccount1/test/unknown", + "path": "/devstoreaccount1/test/unknown_key", "body": "", "status": 404, "response": "", @@ -12,13 +12,13 @@ "Server", "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-request-id", - "80b04ed7-4459-453d-b76b-693408ef1c73", + "d1c3f38e-a5d8-4587-a0d0-2e2427212001", "x-ms-version", "2018-03-28", "x-ms-error-code", "BlobNotFound", "Date", - "Fri, 26 Oct 2018 14:59:48 GMT" + "Thu, 12 Dec 2019 23:27:14 GMT" ] } ] \ No newline at end of file diff --git a/libraries/botbuilder-azure/tests/TestData/CosmosDbPartitionedStorage/should_not_throw_when_writing_no_items.json b/libraries/botbuilder-azure/tests/TestData/BlobStorage - Base Storage Tests/does_not_throw_when_writing_no_items.json similarity index 100% rename from libraries/botbuilder-azure/tests/TestData/CosmosDbPartitionedStorage/should_not_throw_when_writing_no_items.json rename to libraries/botbuilder-azure/tests/TestData/BlobStorage - Base Storage Tests/does_not_throw_when_writing_no_items.json diff --git a/libraries/botbuilder-azure/tests/TestData/BlobStorage/crazy_keys_work.json b/libraries/botbuilder-azure/tests/TestData/BlobStorage - Base Storage Tests/handle_crazy_keys.json similarity index 66% rename from libraries/botbuilder-azure/tests/TestData/BlobStorage/crazy_keys_work.json rename to libraries/botbuilder-azure/tests/TestData/BlobStorage - Base Storage Tests/handle_crazy_keys.json index ad9fd4def3..ef9c31ddb2 100644 --- a/libraries/botbuilder-azure/tests/TestData/BlobStorage/crazy_keys_work.json +++ b/libraries/botbuilder-azure/tests/TestData/BlobStorage - Base Storage Tests/handle_crazy_keys.json @@ -2,12 +2,12 @@ { "scope": "http://127.0.0.1:10000", "method": "PUT", - "path": "/devstoreaccount1/test/!%2540%2523%2524%2525%255E%2526*()_%252B%253F%253F%253E%253C%2522%253AQASD~%2560", + "path": "/devstoreaccount1/test/!%2540%2523%2524%2525%255E%2526*()~%252F%255C%253E%253C%252C.%253F%27%253B%2522%2560~", "body": { - "id": "!%40%23%24%25%5E%26*()_%2B%3F%3F%3E%3C%22%3AQASD~%60", - "realId": "!@#$%^&*()_+??><\":QASD~`", + "id": "!%40%23%24%25%5E%26*()~%2F%5C%3E%3C%2C.%3F'%3B%22%60~", + "realId": "!@#$%^&*()~/\\><,.?';\"`~", "document": { - "count": 1 + "id": 1 } }, "status": 201, @@ -16,51 +16,51 @@ "Transfer-Encoding", "chunked", "Content-MD5", - "odnp1EfhISSTttDt/TSA2A==", + "NVu3oG8OjerqJFoB+XAFOw==", "Last-Modified", - "Fri, 26 Oct 2018 14:59:49 GMT", + "Thu, 12 Dec 2019 23:27:13 GMT", "ETag", - "\"0x8D63B53AD6B0420\"", + "\"0x8D77F5AD1B50460\"", "Server", "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-request-id", - "d98463d4-920e-4d3d-b2b5-9d23ae2fadd7", + "adaaa74e-14da-4915-bc07-e55c8146e1a0", "x-ms-version", "2018-03-28", "x-ms-request-server-encrypted", "true", "Date", - "Fri, 26 Oct 2018 14:59:49 GMT" + "Thu, 12 Dec 2019 23:27:13 GMT" ] }, { "scope": "http://127.0.0.1:10000", "method": "HEAD", - "path": "/devstoreaccount1/test/!%2540%2523%2524%2525%255E%2526*()_%252B%253F%253F%253E%253C%2522%253AQASD~%2560", + "path": "/devstoreaccount1/test/!%2540%2523%2524%2525%255E%2526*()~%252F%255C%253E%253C%252C.%253F%27%253B%2522%2560~", "body": "", "status": 200, "response": "", "rawHeaders": [ "Content-Length", - "121", + "119", "Content-Type", "application/octet-stream", "Content-MD5", - "odnp1EfhISSTttDt/TSA2A==", + "NVu3oG8OjerqJFoB+XAFOw==", "Last-Modified", - "Fri, 26 Oct 2018 14:59:49 GMT", + "Thu, 12 Dec 2019 23:27:13 GMT", "Accept-Ranges", "bytes", "ETag", - "\"0x8D63B53AD6B0420\"", + "\"0x8D77F5AD1B50460\"", "Server", "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-request-id", - "abf49a92-cff1-4df8-8a37-849bf2455a8b", + "f63ffc84-eb29-4452-80c7-c49d896c8208", "x-ms-version", "2018-03-28", "x-ms-creation-time", - "Fri, 26 Oct 2018 14:59:49 GMT", + "Thu, 12 Dec 2019 23:27:13 GMT", "x-ms-lease-status", "unlocked", "x-ms-lease-state", @@ -70,13 +70,13 @@ "x-ms-server-encrypted", "true", "Date", - "Fri, 26 Oct 2018 14:59:49 GMT" + "Thu, 12 Dec 2019 23:27:13 GMT" ] }, { "scope": "http://127.0.0.1:10000", "method": "HEAD", - "path": "/devstoreaccount1/test/!%2540%2523%2524%2525%255E%2526*()_%252B%253F%253F%253E%253C%2522%253AQASD~%2560?comp=metadata", + "path": "/devstoreaccount1/test/!%2540%2523%2524%2525%255E%2526*()~%252F%255C%253E%253C%252C.%253F%27%253B%2522%2560~?comp=metadata", "body": "", "status": 200, "response": "", @@ -84,53 +84,53 @@ "Transfer-Encoding", "chunked", "Last-Modified", - "Fri, 26 Oct 2018 14:59:49 GMT", + "Thu, 12 Dec 2019 23:27:13 GMT", "ETag", - "\"0x8D63B53AD6B0420\"", + "\"0x8D77F5AD1B50460\"", "Server", "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-request-id", - "35651d8a-08c1-414f-83d9-46dc24e9ba54", + "5bd24e2e-fe89-40af-a0ce-9b03c99c5c0c", "x-ms-version", "2018-03-28", "Date", - "Fri, 26 Oct 2018 14:59:49 GMT" + "Thu, 12 Dec 2019 23:27:13 GMT" ] }, { "scope": "http://127.0.0.1:10000", "method": "GET", - "path": "/devstoreaccount1/test/!%2540%2523%2524%2525%255E%2526*()_%252B%253F%253F%253E%253C%2522%253AQASD~%2560", + "path": "/devstoreaccount1/test/!%2540%2523%2524%2525%255E%2526*()~%252F%255C%253E%253C%252C.%253F%27%253B%2522%2560~", "body": "", "status": 200, "response": { - "id": "!%40%23%24%25%5E%26*()_%2B%3F%3F%3E%3C%22%3AQASD~%60", - "realId": "!@#$%^&*()_+??><\":QASD~`", + "id": "!%40%23%24%25%5E%26*()~%2F%5C%3E%3C%2C.%3F'%3B%22%60~", + "realId": "!@#$%^&*()~/\\><,.?';\"`~", "document": { - "count": 1 + "id": 1 } }, "rawHeaders": [ "Content-Length", - "121", + "119", "Content-Type", "application/octet-stream", "Content-MD5", - "odnp1EfhISSTttDt/TSA2A==", + "NVu3oG8OjerqJFoB+XAFOw==", "Last-Modified", - "Fri, 26 Oct 2018 14:59:49 GMT", + "Thu, 12 Dec 2019 23:27:13 GMT", "Accept-Ranges", "bytes", "ETag", - "\"0x8D63B53AD6B0420\"", + "\"0x8D77F5AD1B50460\"", "Server", "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-request-id", - "b3c231d4-d86d-4d68-af99-7af3bb068bca", + "c705ecd2-94d5-4211-acac-8b2fb858ef74", "x-ms-version", "2018-03-28", "x-ms-creation-time", - "Fri, 26 Oct 2018 14:59:49 GMT", + "Thu, 12 Dec 2019 23:27:13 GMT", "x-ms-lease-status", "unlocked", "x-ms-lease-state", @@ -140,7 +140,7 @@ "x-ms-server-encrypted", "true", "Date", - "Fri, 26 Oct 2018 14:59:49 GMT" + "Thu, 12 Dec 2019 23:27:13 GMT" ] } ] \ No newline at end of file diff --git a/libraries/botbuilder-azure/tests/TestData/BlobStorage/batch_operations.json b/libraries/botbuilder-azure/tests/TestData/BlobStorage - Base Storage Tests/performs_batch_operations.json similarity index 81% rename from libraries/botbuilder-azure/tests/TestData/BlobStorage/batch_operations.json rename to libraries/botbuilder-azure/tests/TestData/BlobStorage - Base Storage Tests/performs_batch_operations.json index ca3aaa896b..7695eab405 100644 --- a/libraries/botbuilder-azure/tests/TestData/BlobStorage/batch_operations.json +++ b/libraries/botbuilder-azure/tests/TestData/BlobStorage - Base Storage Tests/performs_batch_operations.json @@ -18,19 +18,19 @@ "Content-MD5", "pRxOvlwwcV3+C110v5/21w==", "Last-Modified", - "Fri, 26 Oct 2018 14:59:49 GMT", + "Thu, 12 Dec 2019 23:27:14 GMT", "ETag", - "\"0x8D63B53AD108810\"", + "\"0x8D77F5AD2584940\"", "Server", "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-request-id", - "03d1fd3b-ec02-45e2-9609-e62e578a3faa", + "73942449-fd38-4af0-992c-96a3a1bb4767", "x-ms-version", "2018-03-28", "x-ms-request-server-encrypted", "true", "Date", - "Fri, 26 Oct 2018 14:59:48 GMT" + "Thu, 12 Dec 2019 23:27:14 GMT" ] }, { @@ -52,19 +52,19 @@ "Content-MD5", "M3PSE+9LAJHc/dQSG2ANRw==", "Last-Modified", - "Fri, 26 Oct 2018 14:59:49 GMT", + "Thu, 12 Dec 2019 23:27:14 GMT", "ETag", - "\"0x8D63B53AD25E4D0\"", + "\"0x8D77F5AD25E63C0\"", "Server", "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-request-id", - "e45f1bba-8cbc-4020-b418-af8c4a2e3439", + "f02406a8-6f44-4698-9f76-33cccc38d992", "x-ms-version", "2018-03-28", "x-ms-request-server-encrypted", "true", "Date", - "Fri, 26 Oct 2018 14:59:48 GMT" + "Thu, 12 Dec 2019 23:27:14 GMT" ] }, { @@ -86,19 +86,19 @@ "Content-MD5", "dM+dJPM6kbZ+bhjg00jgZw==", "Last-Modified", - "Fri, 26 Oct 2018 14:59:49 GMT", + "Thu, 12 Dec 2019 23:27:14 GMT", "ETag", - "\"0x8D63B53AD2F81C0\"", + "\"0x8D77F5AD2628270\"", "Server", "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-request-id", - "ee476fed-4f9f-486c-b599-7a9bd37ffa6f", + "5ce31e18-3af7-48ef-b25e-c77903ef974d", "x-ms-version", "2018-03-28", "x-ms-request-server-encrypted", "true", "Date", - "Fri, 26 Oct 2018 14:59:48 GMT" + "Thu, 12 Dec 2019 23:27:14 GMT" ] }, { @@ -116,19 +116,19 @@ "Content-MD5", "M3PSE+9LAJHc/dQSG2ANRw==", "Last-Modified", - "Fri, 26 Oct 2018 14:59:49 GMT", + "Thu, 12 Dec 2019 23:27:14 GMT", "Accept-Ranges", "bytes", "ETag", - "\"0x8D63B53AD25E4D0\"", + "\"0x8D77F5AD25E63C0\"", "Server", "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-request-id", - "95f85053-e932-4898-a6bb-f1552bd0aee9", + "9a0e609e-4ad5-42c8-9501-d4937a9d4467", "x-ms-version", "2018-03-28", "x-ms-creation-time", - "Fri, 26 Oct 2018 14:59:49 GMT", + "Thu, 12 Dec 2019 23:27:14 GMT", "x-ms-lease-status", "unlocked", "x-ms-lease-state", @@ -138,7 +138,7 @@ "x-ms-server-encrypted", "true", "Date", - "Fri, 26 Oct 2018 14:59:48 GMT" + "Thu, 12 Dec 2019 23:27:14 GMT" ] }, { @@ -156,19 +156,19 @@ "Content-MD5", "pRxOvlwwcV3+C110v5/21w==", "Last-Modified", - "Fri, 26 Oct 2018 14:59:49 GMT", + "Thu, 12 Dec 2019 23:27:14 GMT", "Accept-Ranges", "bytes", "ETag", - "\"0x8D63B53AD108810\"", + "\"0x8D77F5AD2584940\"", "Server", "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-request-id", - "41ffd5ab-aba9-4bf9-aff4-b3910df48f5e", + "17eae913-cbec-490f-b8f2-46c1d88ef322", "x-ms-version", "2018-03-28", "x-ms-creation-time", - "Fri, 26 Oct 2018 14:59:49 GMT", + "Thu, 12 Dec 2019 23:27:14 GMT", "x-ms-lease-status", "unlocked", "x-ms-lease-state", @@ -178,7 +178,7 @@ "x-ms-server-encrypted", "true", "Date", - "Fri, 26 Oct 2018 14:59:48 GMT" + "Thu, 12 Dec 2019 23:27:14 GMT" ] }, { @@ -196,19 +196,19 @@ "Content-MD5", "dM+dJPM6kbZ+bhjg00jgZw==", "Last-Modified", - "Fri, 26 Oct 2018 14:59:49 GMT", + "Thu, 12 Dec 2019 23:27:14 GMT", "Accept-Ranges", "bytes", "ETag", - "\"0x8D63B53AD2F81C0\"", + "\"0x8D77F5AD2628270\"", "Server", "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-request-id", - "ff0d8867-62df-455a-9225-704521b1f666", + "d4986b6c-9c0a-4ff5-bbd1-7b407f872fe8", "x-ms-version", "2018-03-28", "x-ms-creation-time", - "Fri, 26 Oct 2018 14:59:49 GMT", + "Thu, 12 Dec 2019 23:27:14 GMT", "x-ms-lease-status", "unlocked", "x-ms-lease-state", @@ -218,7 +218,7 @@ "x-ms-server-encrypted", "true", "Date", - "Fri, 26 Oct 2018 14:59:48 GMT" + "Thu, 12 Dec 2019 23:27:14 GMT" ] }, { @@ -232,17 +232,17 @@ "Transfer-Encoding", "chunked", "Last-Modified", - "Fri, 26 Oct 2018 14:59:49 GMT", + "Thu, 12 Dec 2019 23:27:14 GMT", "ETag", - "\"0x8D63B53AD25E4D0\"", + "\"0x8D77F5AD25E63C0\"", "Server", "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-request-id", - "319e673c-4b12-48e1-9c1f-c844740bf7b6", + "4077ffd5-2269-4aa7-9c79-347e6224a10c", "x-ms-version", "2018-03-28", "Date", - "Fri, 26 Oct 2018 14:59:49 GMT" + "Thu, 12 Dec 2019 23:27:14 GMT" ] }, { @@ -256,17 +256,17 @@ "Transfer-Encoding", "chunked", "Last-Modified", - "Fri, 26 Oct 2018 14:59:49 GMT", + "Thu, 12 Dec 2019 23:27:14 GMT", "ETag", - "\"0x8D63B53AD108810\"", + "\"0x8D77F5AD2584940\"", "Server", "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-request-id", - "0301b2aa-4643-45cc-a281-33cf7df3cfc3", + "73c36ed3-337c-4646-beb8-e864182f1755", "x-ms-version", "2018-03-28", "Date", - "Fri, 26 Oct 2018 14:59:49 GMT" + "Thu, 12 Dec 2019 23:27:14 GMT" ] }, { @@ -280,30 +280,30 @@ "Transfer-Encoding", "chunked", "Last-Modified", - "Fri, 26 Oct 2018 14:59:49 GMT", + "Thu, 12 Dec 2019 23:27:14 GMT", "ETag", - "\"0x8D63B53AD2F81C0\"", + "\"0x8D77F5AD2628270\"", "Server", "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-request-id", - "d064988c-675f-4cf7-87a9-6a57164fc33e", + "8578d401-f984-4b6a-96b2-91c19190a3bf", "x-ms-version", "2018-03-28", "Date", - "Fri, 26 Oct 2018 14:59:49 GMT" + "Thu, 12 Dec 2019 23:27:14 GMT" ] }, { "scope": "http://127.0.0.1:10000", "method": "GET", - "path": "/devstoreaccount1/test/batch1", + "path": "/devstoreaccount1/test/batch2", "body": "", "status": 200, "response": { - "id": "batch1", - "realId": "batch1", + "id": "batch2", + "realId": "batch2", "document": { - "count": 10 + "count": 20 } }, "rawHeaders": [ @@ -312,21 +312,21 @@ "Content-Type", "application/octet-stream", "Content-MD5", - "pRxOvlwwcV3+C110v5/21w==", + "M3PSE+9LAJHc/dQSG2ANRw==", "Last-Modified", - "Fri, 26 Oct 2018 14:59:49 GMT", + "Thu, 12 Dec 2019 23:27:14 GMT", "Accept-Ranges", "bytes", "ETag", - "\"0x8D63B53AD108810\"", + "\"0x8D77F5AD25E63C0\"", "Server", "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-request-id", - "8e99c940-6928-4b58-a561-9f6d3d901c28", + "bfb413ae-5079-4ca9-a4c3-6a4c0da93d29", "x-ms-version", "2018-03-28", "x-ms-creation-time", - "Fri, 26 Oct 2018 14:59:49 GMT", + "Thu, 12 Dec 2019 23:27:14 GMT", "x-ms-lease-status", "unlocked", "x-ms-lease-state", @@ -336,20 +336,20 @@ "x-ms-server-encrypted", "true", "Date", - "Fri, 26 Oct 2018 14:59:49 GMT" + "Thu, 12 Dec 2019 23:27:14 GMT" ] }, { "scope": "http://127.0.0.1:10000", "method": "GET", - "path": "/devstoreaccount1/test/batch2", + "path": "/devstoreaccount1/test/batch1", "body": "", "status": 200, "response": { - "id": "batch2", - "realId": "batch2", + "id": "batch1", + "realId": "batch1", "document": { - "count": 20 + "count": 10 } }, "rawHeaders": [ @@ -358,21 +358,21 @@ "Content-Type", "application/octet-stream", "Content-MD5", - "M3PSE+9LAJHc/dQSG2ANRw==", + "pRxOvlwwcV3+C110v5/21w==", "Last-Modified", - "Fri, 26 Oct 2018 14:59:49 GMT", + "Thu, 12 Dec 2019 23:27:14 GMT", "Accept-Ranges", "bytes", "ETag", - "\"0x8D63B53AD25E4D0\"", + "\"0x8D77F5AD2584940\"", "Server", "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-request-id", - "514c5ba7-bcce-470f-ae1d-f653c2906622", + "05c6975a-a06c-45cc-b195-b6578a58a759", "x-ms-version", "2018-03-28", "x-ms-creation-time", - "Fri, 26 Oct 2018 14:59:49 GMT", + "Thu, 12 Dec 2019 23:27:14 GMT", "x-ms-lease-status", "unlocked", "x-ms-lease-state", @@ -382,7 +382,7 @@ "x-ms-server-encrypted", "true", "Date", - "Fri, 26 Oct 2018 14:59:49 GMT" + "Thu, 12 Dec 2019 23:27:14 GMT" ] }, { @@ -406,19 +406,19 @@ "Content-MD5", "dM+dJPM6kbZ+bhjg00jgZw==", "Last-Modified", - "Fri, 26 Oct 2018 14:59:49 GMT", + "Thu, 12 Dec 2019 23:27:14 GMT", "Accept-Ranges", "bytes", "ETag", - "\"0x8D63B53AD2F81C0\"", + "\"0x8D77F5AD2628270\"", "Server", "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-request-id", - "046c76bf-8bc6-4709-9d7b-9179611039a5", + "dbd3208c-4f61-42f8-a6a4-fb4bf459c7f9", "x-ms-version", "2018-03-28", "x-ms-creation-time", - "Fri, 26 Oct 2018 14:59:49 GMT", + "Thu, 12 Dec 2019 23:27:14 GMT", "x-ms-lease-status", "unlocked", "x-ms-lease-state", @@ -428,7 +428,7 @@ "x-ms-server-encrypted", "true", "Date", - "Fri, 26 Oct 2018 14:59:49 GMT" + "Thu, 12 Dec 2019 23:27:14 GMT" ] }, { @@ -446,19 +446,19 @@ "Content-MD5", "M3PSE+9LAJHc/dQSG2ANRw==", "Last-Modified", - "Fri, 26 Oct 2018 14:59:49 GMT", + "Thu, 12 Dec 2019 23:27:14 GMT", "Accept-Ranges", "bytes", "ETag", - "\"0x8D63B53AD25E4D0\"", + "\"0x8D77F5AD25E63C0\"", "Server", "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-request-id", - "f84a472c-3dac-4740-8843-fa3b2c70ed15", + "b93bd62b-27e3-4e34-bdc5-efaeaca80bbe", "x-ms-version", "2018-03-28", "x-ms-creation-time", - "Fri, 26 Oct 2018 14:59:49 GMT", + "Thu, 12 Dec 2019 23:27:14 GMT", "x-ms-lease-status", "unlocked", "x-ms-lease-state", @@ -468,7 +468,7 @@ "x-ms-server-encrypted", "true", "Date", - "Fri, 26 Oct 2018 14:59:49 GMT" + "Thu, 12 Dec 2019 23:27:14 GMT" ] }, { @@ -486,19 +486,19 @@ "Content-MD5", "pRxOvlwwcV3+C110v5/21w==", "Last-Modified", - "Fri, 26 Oct 2018 14:59:49 GMT", + "Thu, 12 Dec 2019 23:27:14 GMT", "Accept-Ranges", "bytes", "ETag", - "\"0x8D63B53AD108810\"", + "\"0x8D77F5AD2584940\"", "Server", "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-request-id", - "e1dcfb0d-9e2f-4418-9915-b14f4cdf940b", + "5fc61bfd-43ad-49e3-8f6a-e133c9f1dedf", "x-ms-version", "2018-03-28", "x-ms-creation-time", - "Fri, 26 Oct 2018 14:59:49 GMT", + "Thu, 12 Dec 2019 23:27:14 GMT", "x-ms-lease-status", "unlocked", "x-ms-lease-state", @@ -508,7 +508,7 @@ "x-ms-server-encrypted", "true", "Date", - "Fri, 26 Oct 2018 14:59:49 GMT" + "Thu, 12 Dec 2019 23:27:14 GMT" ] }, { @@ -526,19 +526,19 @@ "Content-MD5", "dM+dJPM6kbZ+bhjg00jgZw==", "Last-Modified", - "Fri, 26 Oct 2018 14:59:49 GMT", + "Thu, 12 Dec 2019 23:27:14 GMT", "Accept-Ranges", "bytes", "ETag", - "\"0x8D63B53AD2F81C0\"", + "\"0x8D77F5AD2628270\"", "Server", "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-request-id", - "d91d116e-a317-41df-987d-adc51a9ac1e8", + "2187d0e8-26c3-4321-ba2b-2a9129c056d2", "x-ms-version", "2018-03-28", "x-ms-creation-time", - "Fri, 26 Oct 2018 14:59:49 GMT", + "Thu, 12 Dec 2019 23:27:14 GMT", "x-ms-lease-status", "unlocked", "x-ms-lease-state", @@ -548,13 +548,13 @@ "x-ms-server-encrypted", "true", "Date", - "Fri, 26 Oct 2018 14:59:49 GMT" + "Thu, 12 Dec 2019 23:27:14 GMT" ] }, { "scope": "http://127.0.0.1:10000", "method": "DELETE", - "path": "/devstoreaccount1/test/batch2", + "path": "/devstoreaccount1/test/batch3", "body": "", "status": 202, "response": "", @@ -564,11 +564,11 @@ "Server", "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-request-id", - "20b73f0d-9a4d-4f06-901a-dd49cafd4ea6", + "6bef04a4-28a4-4204-9ef8-5a3066f87972", "x-ms-version", "2018-03-28", "Date", - "Fri, 26 Oct 2018 14:59:49 GMT" + "Thu, 12 Dec 2019 23:27:14 GMT" ] }, { @@ -584,17 +584,17 @@ "Server", "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-request-id", - "02e9e50b-cac5-40f4-9282-238ec0652690", + "cacaa52e-2a7b-471e-b769-7f81d61ba490", "x-ms-version", "2018-03-28", "Date", - "Fri, 26 Oct 2018 14:59:49 GMT" + "Thu, 12 Dec 2019 23:27:14 GMT" ] }, { "scope": "http://127.0.0.1:10000", "method": "DELETE", - "path": "/devstoreaccount1/test/batch3", + "path": "/devstoreaccount1/test/batch2", "body": "", "status": 202, "response": "", @@ -604,17 +604,17 @@ "Server", "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-request-id", - "c802cae2-20b8-4f1b-a477-fbc1fb70dbdc", + "9db8ea1f-ef7d-4355-a18c-d72d3962825a", "x-ms-version", "2018-03-28", "Date", - "Fri, 26 Oct 2018 14:59:49 GMT" + "Thu, 12 Dec 2019 23:27:14 GMT" ] }, { "scope": "http://127.0.0.1:10000", "method": "HEAD", - "path": "/devstoreaccount1/test/batch1", + "path": "/devstoreaccount1/test/batch2", "body": "", "status": 404, "response": "", @@ -624,13 +624,13 @@ "Server", "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-request-id", - "28d76b88-4d22-47b8-8ff8-8e92e3bf35a2", + "e086a6e2-d35a-4620-a041-b90a0a55ce6f", "x-ms-version", "2018-03-28", "x-ms-error-code", "BlobNotFound", "Date", - "Fri, 26 Oct 2018 14:59:49 GMT" + "Thu, 12 Dec 2019 23:27:14 GMT" ] }, { @@ -646,19 +646,19 @@ "Server", "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-request-id", - "a5bf16a5-848c-4c55-9ff1-e2e0995fa1cb", + "51ca8255-78e2-4072-9fd8-1fecc0f71856", "x-ms-version", "2018-03-28", "x-ms-error-code", "BlobNotFound", "Date", - "Fri, 26 Oct 2018 14:59:49 GMT" + "Thu, 12 Dec 2019 23:27:14 GMT" ] }, { "scope": "http://127.0.0.1:10000", "method": "HEAD", - "path": "/devstoreaccount1/test/batch2", + "path": "/devstoreaccount1/test/batch1", "body": "", "status": 404, "response": "", @@ -668,13 +668,13 @@ "Server", "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-request-id", - "d15f9e61-384a-4f10-a6b4-e43ff17ef85e", + "cded8a5d-aa25-4b0a-b010-8e658df4d7ed", "x-ms-version", "2018-03-28", "x-ms-error-code", "BlobNotFound", "Date", - "Fri, 26 Oct 2018 14:59:49 GMT" + "Thu, 12 Dec 2019 23:27:14 GMT" ] } ] \ No newline at end of file diff --git a/libraries/botbuilder-azure/tests/TestData/BlobStorage - Base Storage Tests/proceeds_through_a_waterfall_dialog.json b/libraries/botbuilder-azure/tests/TestData/BlobStorage - Base Storage Tests/proceeds_through_a_waterfall_dialog.json new file mode 100644 index 0000000000..df02501317 --- /dev/null +++ b/libraries/botbuilder-azure/tests/TestData/BlobStorage - Base Storage Tests/proceeds_through_a_waterfall_dialog.json @@ -0,0 +1,1048 @@ +[ + { + "scope": "http://127.0.0.1:10000", + "method": "HEAD", + "path": "/devstoreaccount1/test/test%252Fconversations%252FConvo1", + "body": "", + "status": 404, + "response": "", + "rawHeaders": [ + "Transfer-Encoding", + "chunked", + "Server", + "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-request-id", + "84331c3c-5d2d-4cd6-9cdb-5e1f159484a0", + "x-ms-version", + "2018-03-28", + "x-ms-error-code", + "BlobNotFound", + "Date", + "Thu, 12 Dec 2019 23:27:14 GMT" + ] + }, + { + "scope": "http://127.0.0.1:10000", + "method": "PUT", + "path": "/devstoreaccount1/test/test%252Fconversations%252FConvo1", + "body": { + "id": "test%2Fconversations%2FConvo1", + "realId": "test/conversations/Convo1/", + "document": { + "dialogState": { + "dialogStack": [ + { + "id": "waterfallDialog", + "state": { + "options": {}, + "values": { + "instanceId": "fakeInstanceId" + }, + "stepIndex": 0 + } + } + ] + }, + "eTag": "*" + } + }, + "status": 201, + "response": "", + "rawHeaders": [ + "Transfer-Encoding", + "chunked", + "Content-MD5", + "RF2QjfIuaWim0kNMfiC1PA==", + "Last-Modified", + "Thu, 12 Dec 2019 23:27:15 GMT", + "ETag", + "\"0x8D77F5AD28106F0\"", + "Server", + "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-request-id", + "05ad2836-e20f-42e9-a883-eb26263c4f03", + "x-ms-version", + "2018-03-28", + "x-ms-request-server-encrypted", + "true", + "Date", + "Thu, 12 Dec 2019 23:27:14 GMT" + ] + }, + { + "scope": "http://127.0.0.1:10000", + "method": "HEAD", + "path": "/devstoreaccount1/test/test%252Fconversations%252FConvo1", + "body": "", + "status": 200, + "response": "", + "rawHeaders": [ + "Content-Length", + "257", + "Content-Type", + "application/octet-stream", + "Content-MD5", + "RF2QjfIuaWim0kNMfiC1PA==", + "Last-Modified", + "Thu, 12 Dec 2019 23:27:15 GMT", + "Accept-Ranges", + "bytes", + "ETag", + "\"0x8D77F5AD28106F0\"", + "Server", + "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-request-id", + "058ea879-053f-4f66-b660-4799bc5e6306", + "x-ms-version", + "2018-03-28", + "x-ms-creation-time", + "Thu, 12 Dec 2019 23:27:15 GMT", + "x-ms-lease-status", + "unlocked", + "x-ms-lease-state", + "available", + "x-ms-blob-type", + "BlockBlob", + "x-ms-server-encrypted", + "true", + "Date", + "Thu, 12 Dec 2019 23:27:14 GMT" + ] + }, + { + "scope": "http://127.0.0.1:10000", + "method": "HEAD", + "path": "/devstoreaccount1/test/test%252Fconversations%252FConvo1?comp=metadata", + "body": "", + "status": 200, + "response": "", + "rawHeaders": [ + "Transfer-Encoding", + "chunked", + "Last-Modified", + "Thu, 12 Dec 2019 23:27:15 GMT", + "ETag", + "\"0x8D77F5AD28106F0\"", + "Server", + "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-request-id", + "2d4a0994-5423-4b89-92a1-4c860495f1b5", + "x-ms-version", + "2018-03-28", + "Date", + "Thu, 12 Dec 2019 23:27:14 GMT" + ] + }, + { + "scope": "http://127.0.0.1:10000", + "method": "GET", + "path": "/devstoreaccount1/test/test%252Fconversations%252FConvo1", + "body": "", + "status": 200, + "response": { + "id": "test%2Fconversations%2FConvo1", + "realId": "test/conversations/Convo1/", + "document": { + "dialogState": { + "dialogStack": [ + { + "id": "waterfallDialog", + "state": { + "options": {}, + "values": { + "instanceId": "55bde189-6897-80e7-b099-4e1433ceb4a8" + }, + "stepIndex": 0 + } + } + ] + }, + "eTag": "*" + } + }, + "rawHeaders": [ + "Content-Length", + "257", + "Content-Type", + "application/octet-stream", + "Content-MD5", + "RF2QjfIuaWim0kNMfiC1PA==", + "Last-Modified", + "Thu, 12 Dec 2019 23:27:15 GMT", + "Accept-Ranges", + "bytes", + "ETag", + "\"0x8D77F5AD28106F0\"", + "Server", + "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-request-id", + "bae7fe3a-5074-4ae4-bcbb-029abcad98f9", + "x-ms-version", + "2018-03-28", + "x-ms-creation-time", + "Thu, 12 Dec 2019 23:27:15 GMT", + "x-ms-lease-status", + "unlocked", + "x-ms-lease-state", + "available", + "x-ms-blob-type", + "BlockBlob", + "x-ms-server-encrypted", + "true", + "Date", + "Thu, 12 Dec 2019 23:27:14 GMT" + ] + }, + { + "scope": "http://127.0.0.1:10000", + "method": "PUT", + "path": "/devstoreaccount1/test/test%252Fconversations%252FConvo1", + "body": { + "id": "test%2Fconversations%2FConvo1", + "realId": "test/conversations/Convo1/", + "document": { + "dialogState": { + "dialogStack": [ + { + "id": "waterfallDialog", + "state": { + "options": {}, + "values": { + "instanceId": "fakeInstanceId" + }, + "stepIndex": 1 + } + }, + { + "id": "textPrompt", + "state": { + "options": { + "prompt": { + "type": "message", + "text": "Please type your name.", + "inputHint": "acceptingInput" + } + }, + "state": {} + } + } + ] + }, + "eTag": "*" + } + }, + "status": 201, + "response": "", + "rawHeaders": [ + "Transfer-Encoding", + "chunked", + "Content-MD5", + "DtPb0Ue8o4Od3Mpug20CIQ==", + "Last-Modified", + "Thu, 12 Dec 2019 23:27:15 GMT", + "ETag", + "\"0x8D77F5AD2913390\"", + "Server", + "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-request-id", + "f95d5fc5-491e-4585-a352-fae104bfa166", + "x-ms-version", + "2018-03-28", + "x-ms-request-server-encrypted", + "true", + "Date", + "Thu, 12 Dec 2019 23:27:14 GMT" + ] + }, + { + "scope": "http://127.0.0.1:10000", + "method": "HEAD", + "path": "/devstoreaccount1/test/test%252Fconversations%252FConvo1", + "body": "", + "status": 200, + "response": "", + "rawHeaders": [ + "Content-Length", + "399", + "Content-Type", + "application/octet-stream", + "Content-MD5", + "DtPb0Ue8o4Od3Mpug20CIQ==", + "Last-Modified", + "Thu, 12 Dec 2019 23:27:15 GMT", + "Accept-Ranges", + "bytes", + "ETag", + "\"0x8D77F5AD2913390\"", + "Server", + "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-request-id", + "d72fdc8f-545b-43c6-becb-c65098aca5bb", + "x-ms-version", + "2018-03-28", + "x-ms-creation-time", + "Thu, 12 Dec 2019 23:27:15 GMT", + "x-ms-lease-status", + "unlocked", + "x-ms-lease-state", + "available", + "x-ms-blob-type", + "BlockBlob", + "x-ms-server-encrypted", + "true", + "Date", + "Thu, 12 Dec 2019 23:27:14 GMT" + ] + }, + { + "scope": "http://127.0.0.1:10000", + "method": "HEAD", + "path": "/devstoreaccount1/test/test%252Fconversations%252FConvo1?comp=metadata", + "body": "", + "status": 200, + "response": "", + "rawHeaders": [ + "Transfer-Encoding", + "chunked", + "Last-Modified", + "Thu, 12 Dec 2019 23:27:15 GMT", + "ETag", + "\"0x8D77F5AD2913390\"", + "Server", + "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-request-id", + "7e3325b9-f41a-4b9c-9183-4ea61a12e0e0", + "x-ms-version", + "2018-03-28", + "Date", + "Thu, 12 Dec 2019 23:27:14 GMT" + ] + }, + { + "scope": "http://127.0.0.1:10000", + "method": "GET", + "path": "/devstoreaccount1/test/test%252Fconversations%252FConvo1", + "body": "", + "status": 200, + "response": { + "id": "test%2Fconversations%2FConvo1", + "realId": "test/conversations/Convo1/", + "document": { + "dialogState": { + "dialogStack": [ + { + "id": "waterfallDialog", + "state": { + "options": {}, + "values": { + "instanceId": "55bde189-6897-80e7-b099-4e1433ceb4a8" + }, + "stepIndex": 1 + } + }, + { + "id": "textPrompt", + "state": { + "options": { + "prompt": { + "type": "message", + "text": "Please type your name.", + "inputHint": "acceptingInput" + } + }, + "state": {} + } + } + ] + }, + "eTag": "*" + } + }, + "rawHeaders": [ + "Content-Length", + "399", + "Content-Type", + "application/octet-stream", + "Content-MD5", + "DtPb0Ue8o4Od3Mpug20CIQ==", + "Last-Modified", + "Thu, 12 Dec 2019 23:27:15 GMT", + "Accept-Ranges", + "bytes", + "ETag", + "\"0x8D77F5AD2913390\"", + "Server", + "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-request-id", + "d3adebb2-ee0f-424a-8de2-fdbc6be13f63", + "x-ms-version", + "2018-03-28", + "x-ms-creation-time", + "Thu, 12 Dec 2019 23:27:15 GMT", + "x-ms-lease-status", + "unlocked", + "x-ms-lease-state", + "available", + "x-ms-blob-type", + "BlockBlob", + "x-ms-server-encrypted", + "true", + "Date", + "Thu, 12 Dec 2019 23:27:14 GMT" + ] + }, + { + "scope": "http://127.0.0.1:10000", + "method": "PUT", + "path": "/devstoreaccount1/test/test%252Fconversations%252FConvo1", + "body": { + "id": "test%2Fconversations%2FConvo1", + "realId": "test/conversations/Convo1/", + "document": { + "dialogState": { + "dialogStack": [ + { + "id": "waterfallDialog", + "state": { + "options": {}, + "values": { + "instanceId": "fakeInstanceId" + }, + "stepIndex": 1 + } + }, + { + "id": "textPrompt", + "state": { + "options": { + "prompt": { + "type": "message", + "text": "Please type your name.", + "inputHint": "acceptingInput" + } + }, + "state": { + "attemptCount": 1 + } + } + } + ] + }, + "eTag": "*" + } + }, + "status": 201, + "response": "", + "rawHeaders": [ + "Transfer-Encoding", + "chunked", + "Content-MD5", + "PDQiNNGqoNXCBFqG63/Hcg==", + "Last-Modified", + "Thu, 12 Dec 2019 23:27:15 GMT", + "ETag", + "\"0x8D77F5AD2A816F0\"", + "Server", + "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-request-id", + "3b8def5a-7726-4882-9ed0-4602ff7250e2", + "x-ms-version", + "2018-03-28", + "x-ms-request-server-encrypted", + "true", + "Date", + "Thu, 12 Dec 2019 23:27:15 GMT" + ] + }, + { + "scope": "http://127.0.0.1:10000", + "method": "HEAD", + "path": "/devstoreaccount1/test/test%252Fconversations%252FConvo1", + "body": "", + "status": 200, + "response": "", + "rawHeaders": [ + "Content-Length", + "415", + "Content-Type", + "application/octet-stream", + "Content-MD5", + "PDQiNNGqoNXCBFqG63/Hcg==", + "Last-Modified", + "Thu, 12 Dec 2019 23:27:15 GMT", + "Accept-Ranges", + "bytes", + "ETag", + "\"0x8D77F5AD2A816F0\"", + "Server", + "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-request-id", + "b70a2621-7339-4b7c-ac91-205bce9996ab", + "x-ms-version", + "2018-03-28", + "x-ms-creation-time", + "Thu, 12 Dec 2019 23:27:15 GMT", + "x-ms-lease-status", + "unlocked", + "x-ms-lease-state", + "available", + "x-ms-blob-type", + "BlockBlob", + "x-ms-server-encrypted", + "true", + "Date", + "Thu, 12 Dec 2019 23:27:15 GMT" + ] + }, + { + "scope": "http://127.0.0.1:10000", + "method": "HEAD", + "path": "/devstoreaccount1/test/test%252Fconversations%252FConvo1?comp=metadata", + "body": "", + "status": 200, + "response": "", + "rawHeaders": [ + "Transfer-Encoding", + "chunked", + "Last-Modified", + "Thu, 12 Dec 2019 23:27:15 GMT", + "ETag", + "\"0x8D77F5AD2A816F0\"", + "Server", + "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-request-id", + "f95316d0-6a7e-4b71-8cae-e1320ea86b77", + "x-ms-version", + "2018-03-28", + "Date", + "Thu, 12 Dec 2019 23:27:15 GMT" + ] + }, + { + "scope": "http://127.0.0.1:10000", + "method": "GET", + "path": "/devstoreaccount1/test/test%252Fconversations%252FConvo1", + "body": "", + "status": 200, + "response": { + "id": "test%2Fconversations%2FConvo1", + "realId": "test/conversations/Convo1/", + "document": { + "dialogState": { + "dialogStack": [ + { + "id": "waterfallDialog", + "state": { + "options": {}, + "values": { + "instanceId": "55bde189-6897-80e7-b099-4e1433ceb4a8" + }, + "stepIndex": 1 + } + }, + { + "id": "textPrompt", + "state": { + "options": { + "prompt": { + "type": "message", + "text": "Please type your name.", + "inputHint": "acceptingInput" + } + }, + "state": { + "attemptCount": 1 + } + } + } + ] + }, + "eTag": "*" + } + }, + "rawHeaders": [ + "Content-Length", + "415", + "Content-Type", + "application/octet-stream", + "Content-MD5", + "PDQiNNGqoNXCBFqG63/Hcg==", + "Last-Modified", + "Thu, 12 Dec 2019 23:27:15 GMT", + "Accept-Ranges", + "bytes", + "ETag", + "\"0x8D77F5AD2A816F0\"", + "Server", + "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-request-id", + "70f45cc9-1c42-4329-9a02-189d14677838", + "x-ms-version", + "2018-03-28", + "x-ms-creation-time", + "Thu, 12 Dec 2019 23:27:15 GMT", + "x-ms-lease-status", + "unlocked", + "x-ms-lease-state", + "available", + "x-ms-blob-type", + "BlockBlob", + "x-ms-server-encrypted", + "true", + "Date", + "Thu, 12 Dec 2019 23:27:15 GMT" + ] + }, + { + "scope": "http://127.0.0.1:10000", + "method": "PUT", + "path": "/devstoreaccount1/test/test%252Fconversations%252FConvo1", + "body": { + "id": "test%2Fconversations%2FConvo1", + "realId": "test/conversations/Convo1/", + "document": { + "dialogState": { + "dialogStack": [ + { + "id": "waterfallDialog", + "state": { + "options": {}, + "values": { + "instanceId": "fakeInstanceId" + }, + "stepIndex": 1 + } + }, + { + "id": "textPrompt", + "state": { + "options": { + "prompt": { + "type": "message", + "text": "Please type your name.", + "inputHint": "acceptingInput" + } + }, + "state": { + "attemptCount": 2 + } + } + } + ] + }, + "eTag": "*" + } + }, + "status": 201, + "response": "", + "rawHeaders": [ + "Transfer-Encoding", + "chunked", + "Content-MD5", + "mYvUdEECZSs+S/9h1tbvVA==", + "Last-Modified", + "Thu, 12 Dec 2019 23:27:15 GMT", + "ETag", + "\"0x8D77F5AD2B6E400\"", + "Server", + "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-request-id", + "f53512af-0b83-4d6a-b462-cc7b8cbcbc2d", + "x-ms-version", + "2018-03-28", + "x-ms-request-server-encrypted", + "true", + "Date", + "Thu, 12 Dec 2019 23:27:15 GMT" + ] + }, + { + "scope": "http://127.0.0.1:10000", + "method": "HEAD", + "path": "/devstoreaccount1/test/test%252Fconversations%252FConvo1", + "body": "", + "status": 200, + "response": "", + "rawHeaders": [ + "Content-Length", + "415", + "Content-Type", + "application/octet-stream", + "Content-MD5", + "mYvUdEECZSs+S/9h1tbvVA==", + "Last-Modified", + "Thu, 12 Dec 2019 23:27:15 GMT", + "Accept-Ranges", + "bytes", + "ETag", + "\"0x8D77F5AD2B6E400\"", + "Server", + "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-request-id", + "081bee70-24b4-4043-b928-24b78834fb46", + "x-ms-version", + "2018-03-28", + "x-ms-creation-time", + "Thu, 12 Dec 2019 23:27:15 GMT", + "x-ms-lease-status", + "unlocked", + "x-ms-lease-state", + "available", + "x-ms-blob-type", + "BlockBlob", + "x-ms-server-encrypted", + "true", + "Date", + "Thu, 12 Dec 2019 23:27:15 GMT" + ] + }, + { + "scope": "http://127.0.0.1:10000", + "method": "HEAD", + "path": "/devstoreaccount1/test/test%252Fconversations%252FConvo1?comp=metadata", + "body": "", + "status": 200, + "response": "", + "rawHeaders": [ + "Transfer-Encoding", + "chunked", + "Last-Modified", + "Thu, 12 Dec 2019 23:27:15 GMT", + "ETag", + "\"0x8D77F5AD2B6E400\"", + "Server", + "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-request-id", + "29bd7739-2e51-42f0-9db1-c150661329c0", + "x-ms-version", + "2018-03-28", + "Date", + "Thu, 12 Dec 2019 23:27:15 GMT" + ] + }, + { + "scope": "http://127.0.0.1:10000", + "method": "GET", + "path": "/devstoreaccount1/test/test%252Fconversations%252FConvo1", + "body": "", + "status": 200, + "response": { + "id": "test%2Fconversations%2FConvo1", + "realId": "test/conversations/Convo1/", + "document": { + "dialogState": { + "dialogStack": [ + { + "id": "waterfallDialog", + "state": { + "options": {}, + "values": { + "instanceId": "55bde189-6897-80e7-b099-4e1433ceb4a8" + }, + "stepIndex": 1 + } + }, + { + "id": "textPrompt", + "state": { + "options": { + "prompt": { + "type": "message", + "text": "Please type your name.", + "inputHint": "acceptingInput" + } + }, + "state": { + "attemptCount": 2 + } + } + } + ] + }, + "eTag": "*" + } + }, + "rawHeaders": [ + "Content-Length", + "415", + "Content-Type", + "application/octet-stream", + "Content-MD5", + "mYvUdEECZSs+S/9h1tbvVA==", + "Last-Modified", + "Thu, 12 Dec 2019 23:27:15 GMT", + "Accept-Ranges", + "bytes", + "ETag", + "\"0x8D77F5AD2B6E400\"", + "Server", + "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-request-id", + "543b6c12-c240-423e-853b-f1b0613685d4", + "x-ms-version", + "2018-03-28", + "x-ms-creation-time", + "Thu, 12 Dec 2019 23:27:15 GMT", + "x-ms-lease-status", + "unlocked", + "x-ms-lease-state", + "available", + "x-ms-blob-type", + "BlockBlob", + "x-ms-server-encrypted", + "true", + "Date", + "Thu, 12 Dec 2019 23:27:15 GMT" + ] + }, + { + "scope": "http://127.0.0.1:10000", + "method": "PUT", + "path": "/devstoreaccount1/test/test%252Fconversations%252FConvo1", + "body": { + "id": "test%2Fconversations%2FConvo1", + "realId": "test/conversations/Convo1/", + "document": { + "dialogState": { + "dialogStack": [ + { + "id": "waterfallDialog", + "state": { + "options": {}, + "values": { + "instanceId": "fakeInstanceId" + }, + "stepIndex": 1 + } + }, + { + "id": "textPrompt", + "state": { + "options": { + "prompt": { + "type": "message", + "text": "Please type your name.", + "inputHint": "acceptingInput" + } + }, + "state": { + "attemptCount": 3 + } + } + } + ] + }, + "eTag": "*" + } + }, + "status": 201, + "response": "", + "rawHeaders": [ + "Transfer-Encoding", + "chunked", + "Content-MD5", + "kp12T+k3qh5xIqWdl8KT/w==", + "Last-Modified", + "Thu, 12 Dec 2019 23:27:15 GMT", + "ETag", + "\"0x8D77F5AD2C69B70\"", + "Server", + "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-request-id", + "67b2e821-998c-4820-ab92-d665bdaf8678", + "x-ms-version", + "2018-03-28", + "x-ms-request-server-encrypted", + "true", + "Date", + "Thu, 12 Dec 2019 23:27:15 GMT" + ] + }, + { + "scope": "http://127.0.0.1:10000", + "method": "HEAD", + "path": "/devstoreaccount1/test/test%252Fconversations%252FConvo1", + "body": "", + "status": 200, + "response": "", + "rawHeaders": [ + "Content-Length", + "415", + "Content-Type", + "application/octet-stream", + "Content-MD5", + "kp12T+k3qh5xIqWdl8KT/w==", + "Last-Modified", + "Thu, 12 Dec 2019 23:27:15 GMT", + "Accept-Ranges", + "bytes", + "ETag", + "\"0x8D77F5AD2C69B70\"", + "Server", + "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-request-id", + "ad781f52-7b33-4734-9a02-dc54a8af1f01", + "x-ms-version", + "2018-03-28", + "x-ms-creation-time", + "Thu, 12 Dec 2019 23:27:15 GMT", + "x-ms-lease-status", + "unlocked", + "x-ms-lease-state", + "available", + "x-ms-blob-type", + "BlockBlob", + "x-ms-server-encrypted", + "true", + "Date", + "Thu, 12 Dec 2019 23:27:15 GMT" + ] + }, + { + "scope": "http://127.0.0.1:10000", + "method": "HEAD", + "path": "/devstoreaccount1/test/test%252Fconversations%252FConvo1?comp=metadata", + "body": "", + "status": 200, + "response": "", + "rawHeaders": [ + "Transfer-Encoding", + "chunked", + "Last-Modified", + "Thu, 12 Dec 2019 23:27:15 GMT", + "ETag", + "\"0x8D77F5AD2C69B70\"", + "Server", + "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-request-id", + "5966e21f-9a56-4ee5-b334-d11945846a25", + "x-ms-version", + "2018-03-28", + "Date", + "Thu, 12 Dec 2019 23:27:15 GMT" + ] + }, + { + "scope": "http://127.0.0.1:10000", + "method": "GET", + "path": "/devstoreaccount1/test/test%252Fconversations%252FConvo1", + "body": "", + "status": 200, + "response": { + "id": "test%2Fconversations%2FConvo1", + "realId": "test/conversations/Convo1/", + "document": { + "dialogState": { + "dialogStack": [ + { + "id": "waterfallDialog", + "state": { + "options": {}, + "values": { + "instanceId": "55bde189-6897-80e7-b099-4e1433ceb4a8" + }, + "stepIndex": 1 + } + }, + { + "id": "textPrompt", + "state": { + "options": { + "prompt": { + "type": "message", + "text": "Please type your name.", + "inputHint": "acceptingInput" + } + }, + "state": { + "attemptCount": 3 + } + } + } + ] + }, + "eTag": "*" + } + }, + "rawHeaders": [ + "Content-Length", + "415", + "Content-Type", + "application/octet-stream", + "Content-MD5", + "kp12T+k3qh5xIqWdl8KT/w==", + "Last-Modified", + "Thu, 12 Dec 2019 23:27:15 GMT", + "Accept-Ranges", + "bytes", + "ETag", + "\"0x8D77F5AD2C69B70\"", + "Server", + "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-request-id", + "5b40e872-dbca-42b0-9ba6-d8ef30130d14", + "x-ms-version", + "2018-03-28", + "x-ms-creation-time", + "Thu, 12 Dec 2019 23:27:15 GMT", + "x-ms-lease-status", + "unlocked", + "x-ms-lease-state", + "available", + "x-ms-blob-type", + "BlockBlob", + "x-ms-server-encrypted", + "true", + "Date", + "Thu, 12 Dec 2019 23:27:15 GMT" + ] + }, + { + "scope": "http://127.0.0.1:10000", + "method": "PUT", + "path": "/devstoreaccount1/test/test%252Fconversations%252FConvo1", + "body": { + "id": "test%2Fconversations%2FConvo1", + "realId": "test/conversations/Convo1/", + "document": { + "dialogState": { + "dialogStack": [ + { + "id": "waterfallDialog", + "state": { + "options": {}, + "values": { + "instanceId": "fakeInstanceId" + }, + "stepIndex": 2 + } + } + ] + }, + "eTag": "*" + } + }, + "status": 201, + "response": "", + "rawHeaders": [ + "Transfer-Encoding", + "chunked", + "Content-MD5", + "EXahS/4ABHLQRWO1SmmREg==", + "Last-Modified", + "Thu, 12 Dec 2019 23:27:15 GMT", + "ETag", + "\"0x8D77F5AD2D679F0\"", + "Server", + "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-request-id", + "e115915b-c020-41f5-969c-dd5aef81fda2", + "x-ms-version", + "2018-03-28", + "x-ms-request-server-encrypted", + "true", + "Date", + "Thu, 12 Dec 2019 23:27:15 GMT" + ] + } +] \ No newline at end of file diff --git a/libraries/botbuilder-azure/tests/TestData/BlobStorage/read_of_unknown_key.json b/libraries/botbuilder-azure/tests/TestData/BlobStorage - Base Storage Tests/return_empty_object_when_reading_unknown_key.json similarity index 78% rename from libraries/botbuilder-azure/tests/TestData/BlobStorage/read_of_unknown_key.json rename to libraries/botbuilder-azure/tests/TestData/BlobStorage - Base Storage Tests/return_empty_object_when_reading_unknown_key.json index 42c995db98..d784dbd792 100644 --- a/libraries/botbuilder-azure/tests/TestData/BlobStorage/read_of_unknown_key.json +++ b/libraries/botbuilder-azure/tests/TestData/BlobStorage - Base Storage Tests/return_empty_object_when_reading_unknown_key.json @@ -12,13 +12,13 @@ "Server", "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-request-id", - "ccce0eab-e1b1-4c91-b917-a4f1c9a45cd9", + "fc30b1c2-b381-43c0-8435-df5130b09d5f", "x-ms-version", "2018-03-28", "x-ms-error-code", "ContainerNotFound", "Date", - "Fri, 26 Oct 2018 14:59:46 GMT" + "Thu, 12 Dec 2019 23:27:13 GMT" ] }, { @@ -32,23 +32,23 @@ "Transfer-Encoding", "chunked", "Last-Modified", - "Fri, 26 Oct 2018 14:59:46 GMT", + "Thu, 12 Dec 2019 23:27:13 GMT", "ETag", - "\"0x8D63B53AB5D0BB0\"", + "\"0x8D77F5AD1831EF0\"", "Server", "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-request-id", - "8868abf2-8569-4050-879f-4ead156051d0", + "c723de89-f3d3-4e63-ac59-7dc952aa1c2d", "x-ms-version", "2018-03-28", "Date", - "Fri, 26 Oct 2018 14:59:46 GMT" + "Thu, 12 Dec 2019 23:27:13 GMT" ] }, { "scope": "http://127.0.0.1:10000", "method": "HEAD", - "path": "/devstoreaccount1/test/unk", + "path": "/devstoreaccount1/test/unknown", "body": "", "status": 404, "response": "", @@ -58,13 +58,13 @@ "Server", "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-request-id", - "d5fbab9d-69b7-49fc-927f-70f9b3892f0b", + "49100bb5-340f-402a-ad18-d207041d1035", "x-ms-version", "2018-03-28", "x-ms-error-code", "BlobNotFound", "Date", - "Fri, 26 Oct 2018 14:59:46 GMT" + "Thu, 12 Dec 2019 23:27:13 GMT" ] } ] \ No newline at end of file diff --git a/libraries/botbuilder-azure/tests/TestData/CosmosDbPartitionedStorage/should_return_empty_dictionary_when_reading_empty_keys.json b/libraries/botbuilder-azure/tests/TestData/BlobStorage - Base Storage Tests/throws_when_reading_null_keys.json similarity index 100% rename from libraries/botbuilder-azure/tests/TestData/CosmosDbPartitionedStorage/should_return_empty_dictionary_when_reading_empty_keys.json rename to libraries/botbuilder-azure/tests/TestData/BlobStorage - Base Storage Tests/throws_when_reading_null_keys.json diff --git a/libraries/botbuilder-azure/tests/TestData/CosmosDbPartitionedStorage/should_throw_when_reading_null_keys.json b/libraries/botbuilder-azure/tests/TestData/BlobStorage - Base Storage Tests/throws_when_writing_null_keys.json similarity index 100% rename from libraries/botbuilder-azure/tests/TestData/CosmosDbPartitionedStorage/should_throw_when_reading_null_keys.json rename to libraries/botbuilder-azure/tests/TestData/BlobStorage - Base Storage Tests/throws_when_writing_null_keys.json diff --git a/libraries/botbuilder-azure/tests/TestData/BlobStorage - Base Storage Tests/update_an_object.json b/libraries/botbuilder-azure/tests/TestData/BlobStorage - Base Storage Tests/update_an_object.json new file mode 100644 index 0000000000..0968532d5a --- /dev/null +++ b/libraries/botbuilder-azure/tests/TestData/BlobStorage - Base Storage Tests/update_an_object.json @@ -0,0 +1,1543 @@ +[ + { + "scope": "http://127.0.0.1:10000", + "method": "PUT", + "path": "/devstoreaccount1/test/pocoItem", + "body": { + "id": "pocoItem", + "realId": "pocoItem", + "document": { + "id": 1, + "count": 1 + } + }, + "status": 201, + "response": "", + "rawHeaders": [ + "Transfer-Encoding", + "chunked", + "Content-MD5", + "PgC1bqQkCj2jcRt6I9oUDQ==", + "Last-Modified", + "Thu, 12 Dec 2019 23:27:13 GMT", + "ETag", + "\"0x8D77F5AD1C55810\"", + "Server", + "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-request-id", + "a96e47f4-3270-47f3-8711-774b3b5a6a3b", + "x-ms-version", + "2018-03-28", + "x-ms-request-server-encrypted", + "true", + "Date", + "Thu, 12 Dec 2019 23:27:13 GMT" + ] + }, + { + "scope": "http://127.0.0.1:10000", + "method": "PUT", + "path": "/devstoreaccount1/test/pocoStoreItem", + "body": { + "id": "pocoStoreItem", + "realId": "pocoStoreItem", + "document": { + "id": 1, + "count": 1 + } + }, + "status": 201, + "response": "", + "rawHeaders": [ + "Transfer-Encoding", + "chunked", + "Content-MD5", + "Rd/xLYDrb7CrGu6r3JwLbw==", + "Last-Modified", + "Thu, 12 Dec 2019 23:27:13 GMT", + "ETag", + "\"0x8D77F5AD1C94FB0\"", + "Server", + "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-request-id", + "d1c0db42-11c4-4841-b83f-359a7847b47e", + "x-ms-version", + "2018-03-28", + "x-ms-request-server-encrypted", + "true", + "Date", + "Thu, 12 Dec 2019 23:27:13 GMT" + ] + }, + { + "scope": "http://127.0.0.1:10000", + "method": "HEAD", + "path": "/devstoreaccount1/test/pocoStoreItem", + "body": "", + "status": 200, + "response": "", + "rawHeaders": [ + "Content-Length", + "77", + "Content-Type", + "application/octet-stream", + "Content-MD5", + "Rd/xLYDrb7CrGu6r3JwLbw==", + "Last-Modified", + "Thu, 12 Dec 2019 23:27:13 GMT", + "Accept-Ranges", + "bytes", + "ETag", + "\"0x8D77F5AD1C94FB0\"", + "Server", + "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-request-id", + "756f74a8-8140-4e4b-8df8-1e44b6d84ec0", + "x-ms-version", + "2018-03-28", + "x-ms-creation-time", + "Thu, 12 Dec 2019 23:27:13 GMT", + "x-ms-lease-status", + "unlocked", + "x-ms-lease-state", + "available", + "x-ms-blob-type", + "BlockBlob", + "x-ms-server-encrypted", + "true", + "Date", + "Thu, 12 Dec 2019 23:27:13 GMT" + ] + }, + { + "scope": "http://127.0.0.1:10000", + "method": "HEAD", + "path": "/devstoreaccount1/test/pocoItem", + "body": "", + "status": 200, + "response": "", + "rawHeaders": [ + "Content-Length", + "67", + "Content-Type", + "application/octet-stream", + "Content-MD5", + "PgC1bqQkCj2jcRt6I9oUDQ==", + "Last-Modified", + "Thu, 12 Dec 2019 23:27:13 GMT", + "Accept-Ranges", + "bytes", + "ETag", + "\"0x8D77F5AD1C55810\"", + "Server", + "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-request-id", + "0b8f7915-c94e-49cb-bd43-36045905b3ba", + "x-ms-version", + "2018-03-28", + "x-ms-creation-time", + "Thu, 12 Dec 2019 23:27:13 GMT", + "x-ms-lease-status", + "unlocked", + "x-ms-lease-state", + "available", + "x-ms-blob-type", + "BlockBlob", + "x-ms-server-encrypted", + "true", + "Date", + "Thu, 12 Dec 2019 23:27:13 GMT" + ] + }, + { + "scope": "http://127.0.0.1:10000", + "method": "HEAD", + "path": "/devstoreaccount1/test/pocoStoreItem?comp=metadata", + "body": "", + "status": 200, + "response": "", + "rawHeaders": [ + "Transfer-Encoding", + "chunked", + "Last-Modified", + "Thu, 12 Dec 2019 23:27:13 GMT", + "ETag", + "\"0x8D77F5AD1C94FB0\"", + "Server", + "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-request-id", + "6a98f830-85b4-43dd-a6ba-b742156130f5", + "x-ms-version", + "2018-03-28", + "Date", + "Thu, 12 Dec 2019 23:27:13 GMT" + ] + }, + { + "scope": "http://127.0.0.1:10000", + "method": "HEAD", + "path": "/devstoreaccount1/test/pocoItem?comp=metadata", + "body": "", + "status": 200, + "response": "", + "rawHeaders": [ + "Transfer-Encoding", + "chunked", + "Last-Modified", + "Thu, 12 Dec 2019 23:27:13 GMT", + "ETag", + "\"0x8D77F5AD1C55810\"", + "Server", + "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-request-id", + "1d75b970-6771-4315-9648-49d7e240d5c3", + "x-ms-version", + "2018-03-28", + "Date", + "Thu, 12 Dec 2019 23:27:13 GMT" + ] + }, + { + "scope": "http://127.0.0.1:10000", + "method": "GET", + "path": "/devstoreaccount1/test/pocoStoreItem", + "body": "", + "status": 200, + "response": { + "id": "pocoStoreItem", + "realId": "pocoStoreItem", + "document": { + "id": 1, + "count": 1 + } + }, + "rawHeaders": [ + "Content-Length", + "77", + "Content-Type", + "application/octet-stream", + "Content-MD5", + "Rd/xLYDrb7CrGu6r3JwLbw==", + "Last-Modified", + "Thu, 12 Dec 2019 23:27:13 GMT", + "Accept-Ranges", + "bytes", + "ETag", + "\"0x8D77F5AD1C94FB0\"", + "Server", + "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-request-id", + "d3b7115b-482d-490b-9d07-009f338342d4", + "x-ms-version", + "2018-03-28", + "x-ms-creation-time", + "Thu, 12 Dec 2019 23:27:13 GMT", + "x-ms-lease-status", + "unlocked", + "x-ms-lease-state", + "available", + "x-ms-blob-type", + "BlockBlob", + "x-ms-server-encrypted", + "true", + "Date", + "Thu, 12 Dec 2019 23:27:13 GMT" + ] + }, + { + "scope": "http://127.0.0.1:10000", + "method": "GET", + "path": "/devstoreaccount1/test/pocoItem", + "body": "", + "status": 200, + "response": { + "id": "pocoItem", + "realId": "pocoItem", + "document": { + "id": 1, + "count": 1 + } + }, + "rawHeaders": [ + "Content-Length", + "67", + "Content-Type", + "application/octet-stream", + "Content-MD5", + "PgC1bqQkCj2jcRt6I9oUDQ==", + "Last-Modified", + "Thu, 12 Dec 2019 23:27:13 GMT", + "Accept-Ranges", + "bytes", + "ETag", + "\"0x8D77F5AD1C55810\"", + "Server", + "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-request-id", + "9af90178-495d-4b7f-b7ba-3a89cdf86f97", + "x-ms-version", + "2018-03-28", + "x-ms-creation-time", + "Thu, 12 Dec 2019 23:27:13 GMT", + "x-ms-lease-status", + "unlocked", + "x-ms-lease-state", + "available", + "x-ms-blob-type", + "BlockBlob", + "x-ms-server-encrypted", + "true", + "Date", + "Thu, 12 Dec 2019 23:27:13 GMT" + ] + }, + { + "scope": "http://127.0.0.1:10000", + "method": "PUT", + "path": "/devstoreaccount1/test/pocoItem", + "body": { + "id": "pocoItem", + "realId": "pocoItem", + "document": { + "id": 1, + "count": 2 + } + }, + "status": 201, + "response": "", + "rawHeaders": [ + "Transfer-Encoding", + "chunked", + "Content-MD5", + "e7pnZ398iTk2khgAF7wWLA==", + "Last-Modified", + "Thu, 12 Dec 2019 23:27:14 GMT", + "ETag", + "\"0x8D77F5AD1DAB4D0\"", + "Server", + "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-request-id", + "d67ca1e7-a0e0-42c7-a202-b4b7d0756a0e", + "x-ms-version", + "2018-03-28", + "x-ms-request-server-encrypted", + "true", + "Date", + "Thu, 12 Dec 2019 23:27:13 GMT" + ] + }, + { + "scope": "http://127.0.0.1:10000", + "method": "PUT", + "path": "/devstoreaccount1/test/pocoStoreItem", + "body": { + "id": "pocoStoreItem", + "realId": "pocoStoreItem", + "document": { + "id": 1, + "count": 2, + "eTag": "\"0x8D77F5AD1C94FB0\"" + } + }, + "status": 201, + "response": "", + "rawHeaders": [ + "Transfer-Encoding", + "chunked", + "Content-MD5", + "R+wAsgTVt7qkUJcA1Ub2Gw==", + "Last-Modified", + "Thu, 12 Dec 2019 23:27:14 GMT", + "ETag", + "\"0x8D77F5AD1DFBDE0\"", + "Server", + "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-request-id", + "7ad5b496-9d17-4309-baac-39cbaebdc4ad", + "x-ms-version", + "2018-03-28", + "x-ms-request-server-encrypted", + "true", + "Date", + "Thu, 12 Dec 2019 23:27:13 GMT" + ] + }, + { + "scope": "http://127.0.0.1:10000", + "method": "HEAD", + "path": "/devstoreaccount1/test/pocoStoreItem", + "body": "", + "status": 200, + "response": "", + "rawHeaders": [ + "Content-Length", + "108", + "Content-Type", + "application/octet-stream", + "Content-MD5", + "R+wAsgTVt7qkUJcA1Ub2Gw==", + "Last-Modified", + "Thu, 12 Dec 2019 23:27:14 GMT", + "Accept-Ranges", + "bytes", + "ETag", + "\"0x8D77F5AD1DFBDE0\"", + "Server", + "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-request-id", + "184662d2-4e0d-4f72-addc-d3c777c61c67", + "x-ms-version", + "2018-03-28", + "x-ms-creation-time", + "Thu, 12 Dec 2019 23:27:13 GMT", + "x-ms-lease-status", + "unlocked", + "x-ms-lease-state", + "available", + "x-ms-blob-type", + "BlockBlob", + "x-ms-server-encrypted", + "true", + "Date", + "Thu, 12 Dec 2019 23:27:13 GMT" + ] + }, + { + "scope": "http://127.0.0.1:10000", + "method": "HEAD", + "path": "/devstoreaccount1/test/pocoItem", + "body": "", + "status": 200, + "response": "", + "rawHeaders": [ + "Content-Length", + "67", + "Content-Type", + "application/octet-stream", + "Content-MD5", + "e7pnZ398iTk2khgAF7wWLA==", + "Last-Modified", + "Thu, 12 Dec 2019 23:27:14 GMT", + "Accept-Ranges", + "bytes", + "ETag", + "\"0x8D77F5AD1DAB4D0\"", + "Server", + "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-request-id", + "8b11b10b-d900-4d07-884c-a82188dcf421", + "x-ms-version", + "2018-03-28", + "x-ms-creation-time", + "Thu, 12 Dec 2019 23:27:13 GMT", + "x-ms-lease-status", + "unlocked", + "x-ms-lease-state", + "available", + "x-ms-blob-type", + "BlockBlob", + "x-ms-server-encrypted", + "true", + "Date", + "Thu, 12 Dec 2019 23:27:13 GMT" + ] + }, + { + "scope": "http://127.0.0.1:10000", + "method": "HEAD", + "path": "/devstoreaccount1/test/pocoStoreItem?comp=metadata", + "body": "", + "status": 200, + "response": "", + "rawHeaders": [ + "Transfer-Encoding", + "chunked", + "Last-Modified", + "Thu, 12 Dec 2019 23:27:14 GMT", + "ETag", + "\"0x8D77F5AD1DFBDE0\"", + "Server", + "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-request-id", + "2e7b47bc-b758-4c70-abf2-c08c264bec6c", + "x-ms-version", + "2018-03-28", + "Date", + "Thu, 12 Dec 2019 23:27:13 GMT" + ] + }, + { + "scope": "http://127.0.0.1:10000", + "method": "HEAD", + "path": "/devstoreaccount1/test/pocoItem?comp=metadata", + "body": "", + "status": 200, + "response": "", + "rawHeaders": [ + "Transfer-Encoding", + "chunked", + "Last-Modified", + "Thu, 12 Dec 2019 23:27:14 GMT", + "ETag", + "\"0x8D77F5AD1DAB4D0\"", + "Server", + "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-request-id", + "1ba64c62-9ab5-4f4a-92fa-30c6ec439649", + "x-ms-version", + "2018-03-28", + "Date", + "Thu, 12 Dec 2019 23:27:13 GMT" + ] + }, + { + "scope": "http://127.0.0.1:10000", + "method": "GET", + "path": "/devstoreaccount1/test/pocoItem", + "body": "", + "status": 200, + "response": { + "id": "pocoItem", + "realId": "pocoItem", + "document": { + "id": 1, + "count": 2 + } + }, + "rawHeaders": [ + "Content-Length", + "67", + "Content-Type", + "application/octet-stream", + "Content-MD5", + "e7pnZ398iTk2khgAF7wWLA==", + "Last-Modified", + "Thu, 12 Dec 2019 23:27:14 GMT", + "Accept-Ranges", + "bytes", + "ETag", + "\"0x8D77F5AD1DAB4D0\"", + "Server", + "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-request-id", + "cfbfa05c-8c01-482d-bcaa-f37aae9dd82d", + "x-ms-version", + "2018-03-28", + "x-ms-creation-time", + "Thu, 12 Dec 2019 23:27:13 GMT", + "x-ms-lease-status", + "unlocked", + "x-ms-lease-state", + "available", + "x-ms-blob-type", + "BlockBlob", + "x-ms-server-encrypted", + "true", + "Date", + "Thu, 12 Dec 2019 23:27:13 GMT" + ] + }, + { + "scope": "http://127.0.0.1:10000", + "method": "GET", + "path": "/devstoreaccount1/test/pocoStoreItem", + "body": "", + "status": 200, + "response": { + "id": "pocoStoreItem", + "realId": "pocoStoreItem", + "document": { + "id": 1, + "count": 2, + "eTag": "\"0x8D77F5AD1C94FB0\"" + } + }, + "rawHeaders": [ + "Content-Length", + "108", + "Content-Type", + "application/octet-stream", + "Content-MD5", + "R+wAsgTVt7qkUJcA1Ub2Gw==", + "Last-Modified", + "Thu, 12 Dec 2019 23:27:14 GMT", + "Accept-Ranges", + "bytes", + "ETag", + "\"0x8D77F5AD1DFBDE0\"", + "Server", + "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-request-id", + "12e63bb5-b40e-4ce4-8160-3bb3fa9993b7", + "x-ms-version", + "2018-03-28", + "x-ms-creation-time", + "Thu, 12 Dec 2019 23:27:13 GMT", + "x-ms-lease-status", + "unlocked", + "x-ms-lease-state", + "available", + "x-ms-blob-type", + "BlockBlob", + "x-ms-server-encrypted", + "true", + "Date", + "Thu, 12 Dec 2019 23:27:13 GMT" + ] + }, + { + "scope": "http://127.0.0.1:10000", + "method": "PUT", + "path": "/devstoreaccount1/test/pocoItem", + "body": { + "id": "pocoItem", + "realId": "pocoItem", + "document": { + "id": 1, + "count": 123 + } + }, + "status": 201, + "response": "", + "rawHeaders": [ + "Transfer-Encoding", + "chunked", + "Content-MD5", + "xE9izWp4eig/sVqOBGOPeg==", + "Last-Modified", + "Thu, 12 Dec 2019 23:27:14 GMT", + "ETag", + "\"0x8D77F5AD1EF0020\"", + "Server", + "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-request-id", + "ba9887a0-ef2f-4b15-aa81-ec18b7f30fd0", + "x-ms-version", + "2018-03-28", + "x-ms-request-server-encrypted", + "true", + "Date", + "Thu, 12 Dec 2019 23:27:13 GMT" + ] + }, + { + "scope": "http://127.0.0.1:10000", + "method": "PUT", + "path": "/devstoreaccount1/test/pocoStoreItem", + "body": { + "id": "pocoStoreItem", + "realId": "pocoStoreItem", + "document": { + "id": 1, + "count": 123, + "eTag": "\"0x8D77F5AD1C94FB0\"" + } + }, + "status": 412, + "response": "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:e5814282-4456-43e0-8c1b-5c955f8f5332\nTime:2019-12-12T23:27:14.2268927Z", + "rawHeaders": [ + "Content-Length", + "252", + "Content-Type", + "application/xml", + "Server", + "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-request-id", + "e5814282-4456-43e0-8c1b-5c955f8f5332", + "x-ms-version", + "2018-03-28", + "x-ms-error-code", + "ConditionNotMet", + "Date", + "Thu, 12 Dec 2019 23:27:13 GMT" + ] + }, + { + "scope": "http://127.0.0.1:10000", + "method": "HEAD", + "path": "/devstoreaccount1/test/pocoStoreItem", + "body": "", + "status": 200, + "response": "", + "rawHeaders": [ + "Content-Length", + "108", + "Content-Type", + "application/octet-stream", + "Content-MD5", + "R+wAsgTVt7qkUJcA1Ub2Gw==", + "Last-Modified", + "Thu, 12 Dec 2019 23:27:14 GMT", + "Accept-Ranges", + "bytes", + "ETag", + "\"0x8D77F5AD1DFBDE0\"", + "Server", + "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-request-id", + "50d47383-e88c-4003-a546-6963f794235f", + "x-ms-version", + "2018-03-28", + "x-ms-creation-time", + "Thu, 12 Dec 2019 23:27:13 GMT", + "x-ms-lease-status", + "unlocked", + "x-ms-lease-state", + "available", + "x-ms-blob-type", + "BlockBlob", + "x-ms-server-encrypted", + "true", + "Date", + "Thu, 12 Dec 2019 23:27:13 GMT" + ] + }, + { + "scope": "http://127.0.0.1:10000", + "method": "HEAD", + "path": "/devstoreaccount1/test/pocoItem", + "body": "", + "status": 200, + "response": "", + "rawHeaders": [ + "Content-Length", + "69", + "Content-Type", + "application/octet-stream", + "Content-MD5", + "xE9izWp4eig/sVqOBGOPeg==", + "Last-Modified", + "Thu, 12 Dec 2019 23:27:14 GMT", + "Accept-Ranges", + "bytes", + "ETag", + "\"0x8D77F5AD1EF0020\"", + "Server", + "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-request-id", + "57437219-1817-4015-a9bd-4faec1621b51", + "x-ms-version", + "2018-03-28", + "x-ms-creation-time", + "Thu, 12 Dec 2019 23:27:13 GMT", + "x-ms-lease-status", + "unlocked", + "x-ms-lease-state", + "available", + "x-ms-blob-type", + "BlockBlob", + "x-ms-server-encrypted", + "true", + "Date", + "Thu, 12 Dec 2019 23:27:13 GMT" + ] + }, + { + "scope": "http://127.0.0.1:10000", + "method": "HEAD", + "path": "/devstoreaccount1/test/pocoStoreItem?comp=metadata", + "body": "", + "status": 200, + "response": "", + "rawHeaders": [ + "Transfer-Encoding", + "chunked", + "Last-Modified", + "Thu, 12 Dec 2019 23:27:14 GMT", + "ETag", + "\"0x8D77F5AD1DFBDE0\"", + "Server", + "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-request-id", + "b0ee98b4-834c-4f4e-8b36-b481298f0e75", + "x-ms-version", + "2018-03-28", + "Date", + "Thu, 12 Dec 2019 23:27:13 GMT" + ] + }, + { + "scope": "http://127.0.0.1:10000", + "method": "HEAD", + "path": "/devstoreaccount1/test/pocoItem?comp=metadata", + "body": "", + "status": 200, + "response": "", + "rawHeaders": [ + "Transfer-Encoding", + "chunked", + "Last-Modified", + "Thu, 12 Dec 2019 23:27:14 GMT", + "ETag", + "\"0x8D77F5AD1EF0020\"", + "Server", + "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-request-id", + "2281ca79-0d9d-4315-8415-42c7164ad93f", + "x-ms-version", + "2018-03-28", + "Date", + "Thu, 12 Dec 2019 23:27:13 GMT" + ] + }, + { + "scope": "http://127.0.0.1:10000", + "method": "GET", + "path": "/devstoreaccount1/test/pocoStoreItem", + "body": "", + "status": 200, + "response": { + "id": "pocoStoreItem", + "realId": "pocoStoreItem", + "document": { + "id": 1, + "count": 2, + "eTag": "\"0x8D77F5AD1C94FB0\"" + } + }, + "rawHeaders": [ + "Content-Length", + "108", + "Content-Type", + "application/octet-stream", + "Content-MD5", + "R+wAsgTVt7qkUJcA1Ub2Gw==", + "Last-Modified", + "Thu, 12 Dec 2019 23:27:14 GMT", + "Accept-Ranges", + "bytes", + "ETag", + "\"0x8D77F5AD1DFBDE0\"", + "Server", + "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-request-id", + "50222e8e-2649-4293-bb08-e9e97491d9c3", + "x-ms-version", + "2018-03-28", + "x-ms-creation-time", + "Thu, 12 Dec 2019 23:27:13 GMT", + "x-ms-lease-status", + "unlocked", + "x-ms-lease-state", + "available", + "x-ms-blob-type", + "BlockBlob", + "x-ms-server-encrypted", + "true", + "Date", + "Thu, 12 Dec 2019 23:27:13 GMT" + ] + }, + { + "scope": "http://127.0.0.1:10000", + "method": "GET", + "path": "/devstoreaccount1/test/pocoItem", + "body": "", + "status": 200, + "response": { + "id": "pocoItem", + "realId": "pocoItem", + "document": { + "id": 1, + "count": 123 + } + }, + "rawHeaders": [ + "Content-Length", + "69", + "Content-Type", + "application/octet-stream", + "Content-MD5", + "xE9izWp4eig/sVqOBGOPeg==", + "Last-Modified", + "Thu, 12 Dec 2019 23:27:14 GMT", + "Accept-Ranges", + "bytes", + "ETag", + "\"0x8D77F5AD1EF0020\"", + "Server", + "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-request-id", + "988ed3fd-d9e4-42ca-8e1c-2b2ce533bfb1", + "x-ms-version", + "2018-03-28", + "x-ms-creation-time", + "Thu, 12 Dec 2019 23:27:13 GMT", + "x-ms-lease-status", + "unlocked", + "x-ms-lease-state", + "available", + "x-ms-blob-type", + "BlockBlob", + "x-ms-server-encrypted", + "true", + "Date", + "Thu, 12 Dec 2019 23:27:13 GMT" + ] + }, + { + "scope": "http://127.0.0.1:10000", + "method": "PUT", + "path": "/devstoreaccount1/test/pocoItem", + "body": { + "id": "pocoItem", + "realId": "pocoItem", + "document": { + "id": 1, + "count": 100 + } + }, + "status": 201, + "response": "", + "rawHeaders": [ + "Transfer-Encoding", + "chunked", + "Content-MD5", + "/dW7CJ4VO+uzuDU2H3Xrww==", + "Last-Modified", + "Thu, 12 Dec 2019 23:27:14 GMT", + "ETag", + "\"0x8D77F5AD2045CE0\"", + "Server", + "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-request-id", + "d395c927-d8db-40e1-a65f-2bb4254ecfd2", + "x-ms-version", + "2018-03-28", + "x-ms-request-server-encrypted", + "true", + "Date", + "Thu, 12 Dec 2019 23:27:13 GMT" + ] + }, + { + "scope": "http://127.0.0.1:10000", + "method": "PUT", + "path": "/devstoreaccount1/test/pocoStoreItem", + "body": { + "id": "pocoStoreItem", + "realId": "pocoStoreItem", + "document": { + "id": 1, + "count": 100, + "eTag": "*" + } + }, + "status": 201, + "response": "", + "rawHeaders": [ + "Transfer-Encoding", + "chunked", + "Content-MD5", + "CXcF9MUUMq0bYcSTESpenw==", + "Last-Modified", + "Thu, 12 Dec 2019 23:27:14 GMT", + "ETag", + "\"0x8D77F5AD208F0C0\"", + "Server", + "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-request-id", + "ab737c37-88b4-40b2-815f-d8796b93ef83", + "x-ms-version", + "2018-03-28", + "x-ms-request-server-encrypted", + "true", + "Date", + "Thu, 12 Dec 2019 23:27:13 GMT" + ] + }, + { + "scope": "http://127.0.0.1:10000", + "method": "HEAD", + "path": "/devstoreaccount1/test/pocoStoreItem", + "body": "", + "status": 200, + "response": "", + "rawHeaders": [ + "Content-Length", + "90", + "Content-Type", + "application/octet-stream", + "Content-MD5", + "CXcF9MUUMq0bYcSTESpenw==", + "Last-Modified", + "Thu, 12 Dec 2019 23:27:14 GMT", + "Accept-Ranges", + "bytes", + "ETag", + "\"0x8D77F5AD208F0C0\"", + "Server", + "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-request-id", + "e164c77b-3917-4e3b-b787-df64c90edb81", + "x-ms-version", + "2018-03-28", + "x-ms-creation-time", + "Thu, 12 Dec 2019 23:27:13 GMT", + "x-ms-lease-status", + "unlocked", + "x-ms-lease-state", + "available", + "x-ms-blob-type", + "BlockBlob", + "x-ms-server-encrypted", + "true", + "Date", + "Thu, 12 Dec 2019 23:27:13 GMT" + ] + }, + { + "scope": "http://127.0.0.1:10000", + "method": "HEAD", + "path": "/devstoreaccount1/test/pocoItem", + "body": "", + "status": 200, + "response": "", + "rawHeaders": [ + "Content-Length", + "69", + "Content-Type", + "application/octet-stream", + "Content-MD5", + "/dW7CJ4VO+uzuDU2H3Xrww==", + "Last-Modified", + "Thu, 12 Dec 2019 23:27:14 GMT", + "Accept-Ranges", + "bytes", + "ETag", + "\"0x8D77F5AD2045CE0\"", + "Server", + "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-request-id", + "eb2d75ce-b432-44a2-993e-e1dc056792dd", + "x-ms-version", + "2018-03-28", + "x-ms-creation-time", + "Thu, 12 Dec 2019 23:27:13 GMT", + "x-ms-lease-status", + "unlocked", + "x-ms-lease-state", + "available", + "x-ms-blob-type", + "BlockBlob", + "x-ms-server-encrypted", + "true", + "Date", + "Thu, 12 Dec 2019 23:27:13 GMT" + ] + }, + { + "scope": "http://127.0.0.1:10000", + "method": "HEAD", + "path": "/devstoreaccount1/test/pocoItem?comp=metadata", + "body": "", + "status": 200, + "response": "", + "rawHeaders": [ + "Transfer-Encoding", + "chunked", + "Last-Modified", + "Thu, 12 Dec 2019 23:27:14 GMT", + "ETag", + "\"0x8D77F5AD2045CE0\"", + "Server", + "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-request-id", + "e44ca2f9-cc95-46fc-a942-95569b4abaa2", + "x-ms-version", + "2018-03-28", + "Date", + "Thu, 12 Dec 2019 23:27:13 GMT" + ] + }, + { + "scope": "http://127.0.0.1:10000", + "method": "HEAD", + "path": "/devstoreaccount1/test/pocoStoreItem?comp=metadata", + "body": "", + "status": 200, + "response": "", + "rawHeaders": [ + "Transfer-Encoding", + "chunked", + "Last-Modified", + "Thu, 12 Dec 2019 23:27:14 GMT", + "ETag", + "\"0x8D77F5AD208F0C0\"", + "Server", + "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-request-id", + "9a3cba5a-8d3c-4953-8b36-2d077c35c5a5", + "x-ms-version", + "2018-03-28", + "Date", + "Thu, 12 Dec 2019 23:27:14 GMT" + ] + }, + { + "scope": "http://127.0.0.1:10000", + "method": "GET", + "path": "/devstoreaccount1/test/pocoStoreItem", + "body": "", + "status": 200, + "response": { + "id": "pocoStoreItem", + "realId": "pocoStoreItem", + "document": { + "id": 1, + "count": 100, + "eTag": "*" + } + }, + "rawHeaders": [ + "Content-Length", + "90", + "Content-Type", + "application/octet-stream", + "Content-MD5", + "CXcF9MUUMq0bYcSTESpenw==", + "Last-Modified", + "Thu, 12 Dec 2019 23:27:14 GMT", + "Accept-Ranges", + "bytes", + "ETag", + "\"0x8D77F5AD208F0C0\"", + "Server", + "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-request-id", + "fb4177a2-c077-4d5f-8ac8-d4f85cc28c16", + "x-ms-version", + "2018-03-28", + "x-ms-creation-time", + "Thu, 12 Dec 2019 23:27:13 GMT", + "x-ms-lease-status", + "unlocked", + "x-ms-lease-state", + "available", + "x-ms-blob-type", + "BlockBlob", + "x-ms-server-encrypted", + "true", + "Date", + "Thu, 12 Dec 2019 23:27:14 GMT" + ] + }, + { + "scope": "http://127.0.0.1:10000", + "method": "GET", + "path": "/devstoreaccount1/test/pocoItem", + "body": "", + "status": 200, + "response": { + "id": "pocoItem", + "realId": "pocoItem", + "document": { + "id": 1, + "count": 100 + } + }, + "rawHeaders": [ + "Content-Length", + "69", + "Content-Type", + "application/octet-stream", + "Content-MD5", + "/dW7CJ4VO+uzuDU2H3Xrww==", + "Last-Modified", + "Thu, 12 Dec 2019 23:27:14 GMT", + "Accept-Ranges", + "bytes", + "ETag", + "\"0x8D77F5AD2045CE0\"", + "Server", + "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-request-id", + "c4e60eca-0c27-4cae-948c-55617d9292cb", + "x-ms-version", + "2018-03-28", + "x-ms-creation-time", + "Thu, 12 Dec 2019 23:27:13 GMT", + "x-ms-lease-status", + "unlocked", + "x-ms-lease-state", + "available", + "x-ms-blob-type", + "BlockBlob", + "x-ms-server-encrypted", + "true", + "Date", + "Thu, 12 Dec 2019 23:27:14 GMT" + ] + }, + { + "scope": "http://127.0.0.1:10000", + "method": "HEAD", + "path": "/devstoreaccount1/test/pocoStoreItem", + "body": "", + "status": 200, + "response": "", + "rawHeaders": [ + "Content-Length", + "90", + "Content-Type", + "application/octet-stream", + "Content-MD5", + "CXcF9MUUMq0bYcSTESpenw==", + "Last-Modified", + "Thu, 12 Dec 2019 23:27:14 GMT", + "Accept-Ranges", + "bytes", + "ETag", + "\"0x8D77F5AD208F0C0\"", + "Server", + "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-request-id", + "515e1d6c-79e0-4be4-ba2f-f90f6b85fe04", + "x-ms-version", + "2018-03-28", + "x-ms-creation-time", + "Thu, 12 Dec 2019 23:27:13 GMT", + "x-ms-lease-status", + "unlocked", + "x-ms-lease-state", + "available", + "x-ms-blob-type", + "BlockBlob", + "x-ms-server-encrypted", + "true", + "Date", + "Thu, 12 Dec 2019 23:27:14 GMT" + ] + }, + { + "scope": "http://127.0.0.1:10000", + "method": "HEAD", + "path": "/devstoreaccount1/test/pocoStoreItem?comp=metadata", + "body": "", + "status": 200, + "response": "", + "rawHeaders": [ + "Transfer-Encoding", + "chunked", + "Last-Modified", + "Thu, 12 Dec 2019 23:27:14 GMT", + "ETag", + "\"0x8D77F5AD208F0C0\"", + "Server", + "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-request-id", + "b9a554ab-1d1d-4a9f-a444-d53183e7f677", + "x-ms-version", + "2018-03-28", + "Date", + "Thu, 12 Dec 2019 23:27:14 GMT" + ] + }, + { + "scope": "http://127.0.0.1:10000", + "method": "GET", + "path": "/devstoreaccount1/test/pocoStoreItem", + "body": "", + "status": 200, + "response": { + "id": "pocoStoreItem", + "realId": "pocoStoreItem", + "document": { + "id": 1, + "count": 100, + "eTag": "*" + } + }, + "rawHeaders": [ + "Content-Length", + "90", + "Content-Type", + "application/octet-stream", + "Content-MD5", + "CXcF9MUUMq0bYcSTESpenw==", + "Last-Modified", + "Thu, 12 Dec 2019 23:27:14 GMT", + "Accept-Ranges", + "bytes", + "ETag", + "\"0x8D77F5AD208F0C0\"", + "Server", + "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-request-id", + "4548b922-9b02-460f-9ac7-3f46366db222", + "x-ms-version", + "2018-03-28", + "x-ms-creation-time", + "Thu, 12 Dec 2019 23:27:13 GMT", + "x-ms-lease-status", + "unlocked", + "x-ms-lease-state", + "available", + "x-ms-blob-type", + "BlockBlob", + "x-ms-server-encrypted", + "true", + "Date", + "Thu, 12 Dec 2019 23:27:14 GMT" + ] + }, + { + "scope": "http://127.0.0.1:10000", + "method": "PUT", + "path": "/devstoreaccount1/test/pocoStoreItem", + "body": { + "id": "pocoStoreItem", + "realId": "pocoStoreItem", + "document": { + "id": 1, + "count": 100, + "eTag": "" + } + }, + "status": 201, + "response": "", + "rawHeaders": [ + "Transfer-Encoding", + "chunked", + "Content-MD5", + "CZfss6r12FtN5tQq9gdDYw==", + "Last-Modified", + "Thu, 12 Dec 2019 23:27:14 GMT", + "ETag", + "\"0x8D77F5AD2277540\"", + "Server", + "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-request-id", + "a678dc9a-3aac-4658-a9c3-ec65caef7f2f", + "x-ms-version", + "2018-03-28", + "x-ms-request-server-encrypted", + "true", + "Date", + "Thu, 12 Dec 2019 23:27:14 GMT" + ] + }, + { + "scope": "http://127.0.0.1:10000", + "method": "HEAD", + "path": "/devstoreaccount1/test/pocoStoreItem", + "body": "", + "status": 200, + "response": "", + "rawHeaders": [ + "Content-Length", + "89", + "Content-Type", + "application/octet-stream", + "Content-MD5", + "CZfss6r12FtN5tQq9gdDYw==", + "Last-Modified", + "Thu, 12 Dec 2019 23:27:14 GMT", + "Accept-Ranges", + "bytes", + "ETag", + "\"0x8D77F5AD2277540\"", + "Server", + "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-request-id", + "d94fee84-0363-4822-b818-482b46a79219", + "x-ms-version", + "2018-03-28", + "x-ms-creation-time", + "Thu, 12 Dec 2019 23:27:13 GMT", + "x-ms-lease-status", + "unlocked", + "x-ms-lease-state", + "available", + "x-ms-blob-type", + "BlockBlob", + "x-ms-server-encrypted", + "true", + "Date", + "Thu, 12 Dec 2019 23:27:14 GMT" + ] + }, + { + "scope": "http://127.0.0.1:10000", + "method": "HEAD", + "path": "/devstoreaccount1/test/pocoItem", + "body": "", + "status": 200, + "response": "", + "rawHeaders": [ + "Content-Length", + "69", + "Content-Type", + "application/octet-stream", + "Content-MD5", + "/dW7CJ4VO+uzuDU2H3Xrww==", + "Last-Modified", + "Thu, 12 Dec 2019 23:27:14 GMT", + "Accept-Ranges", + "bytes", + "ETag", + "\"0x8D77F5AD2045CE0\"", + "Server", + "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-request-id", + "93b6a077-77ac-4b46-accb-387857b80e75", + "x-ms-version", + "2018-03-28", + "x-ms-creation-time", + "Thu, 12 Dec 2019 23:27:13 GMT", + "x-ms-lease-status", + "unlocked", + "x-ms-lease-state", + "available", + "x-ms-blob-type", + "BlockBlob", + "x-ms-server-encrypted", + "true", + "Date", + "Thu, 12 Dec 2019 23:27:14 GMT" + ] + }, + { + "scope": "http://127.0.0.1:10000", + "method": "HEAD", + "path": "/devstoreaccount1/test/pocoStoreItem?comp=metadata", + "body": "", + "status": 200, + "response": "", + "rawHeaders": [ + "Transfer-Encoding", + "chunked", + "Last-Modified", + "Thu, 12 Dec 2019 23:27:14 GMT", + "ETag", + "\"0x8D77F5AD2277540\"", + "Server", + "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-request-id", + "2ca69540-74e1-4a71-afbd-11fb85fad4ba", + "x-ms-version", + "2018-03-28", + "Date", + "Thu, 12 Dec 2019 23:27:14 GMT" + ] + }, + { + "scope": "http://127.0.0.1:10000", + "method": "HEAD", + "path": "/devstoreaccount1/test/pocoItem?comp=metadata", + "body": "", + "status": 200, + "response": "", + "rawHeaders": [ + "Transfer-Encoding", + "chunked", + "Last-Modified", + "Thu, 12 Dec 2019 23:27:14 GMT", + "ETag", + "\"0x8D77F5AD2045CE0\"", + "Server", + "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-request-id", + "c30dd68e-340f-476f-85e4-7ce5af7c347e", + "x-ms-version", + "2018-03-28", + "Date", + "Thu, 12 Dec 2019 23:27:14 GMT" + ] + }, + { + "scope": "http://127.0.0.1:10000", + "method": "GET", + "path": "/devstoreaccount1/test/pocoStoreItem", + "body": "", + "status": 200, + "response": { + "id": "pocoStoreItem", + "realId": "pocoStoreItem", + "document": { + "id": 1, + "count": 100, + "eTag": "" + } + }, + "rawHeaders": [ + "Content-Length", + "89", + "Content-Type", + "application/octet-stream", + "Content-MD5", + "CZfss6r12FtN5tQq9gdDYw==", + "Last-Modified", + "Thu, 12 Dec 2019 23:27:14 GMT", + "Accept-Ranges", + "bytes", + "ETag", + "\"0x8D77F5AD2277540\"", + "Server", + "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-request-id", + "67b4d217-6072-4ebc-a5d1-4e642faf43dc", + "x-ms-version", + "2018-03-28", + "x-ms-creation-time", + "Thu, 12 Dec 2019 23:27:13 GMT", + "x-ms-lease-status", + "unlocked", + "x-ms-lease-state", + "available", + "x-ms-blob-type", + "BlockBlob", + "x-ms-server-encrypted", + "true", + "Date", + "Thu, 12 Dec 2019 23:27:14 GMT" + ] + }, + { + "scope": "http://127.0.0.1:10000", + "method": "GET", + "path": "/devstoreaccount1/test/pocoItem", + "body": "", + "status": 200, + "response": { + "id": "pocoItem", + "realId": "pocoItem", + "document": { + "id": 1, + "count": 100 + } + }, + "rawHeaders": [ + "Content-Length", + "69", + "Content-Type", + "application/octet-stream", + "Content-MD5", + "/dW7CJ4VO+uzuDU2H3Xrww==", + "Last-Modified", + "Thu, 12 Dec 2019 23:27:14 GMT", + "Accept-Ranges", + "bytes", + "ETag", + "\"0x8D77F5AD2045CE0\"", + "Server", + "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-request-id", + "452050d8-52c3-4ad6-a1a2-12296d1ddeb4", + "x-ms-version", + "2018-03-28", + "x-ms-creation-time", + "Thu, 12 Dec 2019 23:27:13 GMT", + "x-ms-lease-status", + "unlocked", + "x-ms-lease-state", + "available", + "x-ms-blob-type", + "BlockBlob", + "x-ms-server-encrypted", + "true", + "Date", + "Thu, 12 Dec 2019 23:27:14 GMT" + ] + } +] \ No newline at end of file diff --git a/libraries/botbuilder-azure/tests/TestData/BlobStorage/delete_known.json b/libraries/botbuilder-azure/tests/TestData/BlobStorage/delete_known.json deleted file mode 100644 index 059c4d4f66..0000000000 --- a/libraries/botbuilder-azure/tests/TestData/BlobStorage/delete_known.json +++ /dev/null @@ -1,118 +0,0 @@ -[ - { - "scope": "http://127.0.0.1:10000", - "method": "PUT", - "path": "/devstoreaccount1/test/delete1", - "body": { - "id": "delete1", - "realId": "delete1", - "document": { - "count": 1 - } - }, - "status": 201, - "response": "", - "rawHeaders": [ - "Transfer-Encoding", - "chunked", - "Content-MD5", - "ZSKTqorINTRc61oZeDckOw==", - "Last-Modified", - "Fri, 26 Oct 2018 14:59:48 GMT", - "ETag", - "\"0x8D63B53ACF0F220\"", - "Server", - "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-request-id", - "a7054c55-1792-4089-87b6-c1d1aacf1317", - "x-ms-version", - "2018-03-28", - "x-ms-request-server-encrypted", - "true", - "Date", - "Fri, 26 Oct 2018 14:59:48 GMT" - ] - }, - { - "scope": "http://127.0.0.1:10000", - "method": "HEAD", - "path": "/devstoreaccount1/test/delete1", - "body": "", - "status": 200, - "response": "", - "rawHeaders": [ - "Content-Length", - "58", - "Content-Type", - "application/octet-stream", - "Content-MD5", - "ZSKTqorINTRc61oZeDckOw==", - "Last-Modified", - "Fri, 26 Oct 2018 14:59:48 GMT", - "Accept-Ranges", - "bytes", - "ETag", - "\"0x8D63B53ACF0F220\"", - "Server", - "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-request-id", - "0db73e60-72e2-4a33-a54d-8302ce892e57", - "x-ms-version", - "2018-03-28", - "x-ms-creation-time", - "Fri, 26 Oct 2018 14:59:48 GMT", - "x-ms-lease-status", - "unlocked", - "x-ms-lease-state", - "available", - "x-ms-blob-type", - "BlockBlob", - "x-ms-server-encrypted", - "true", - "Date", - "Fri, 26 Oct 2018 14:59:48 GMT" - ] - }, - { - "scope": "http://127.0.0.1:10000", - "method": "DELETE", - "path": "/devstoreaccount1/test/delete1", - "body": "", - "status": 202, - "response": "", - "rawHeaders": [ - "Transfer-Encoding", - "chunked", - "Server", - "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-request-id", - "8e1ac470-0f62-41a7-b591-c76c9c0a3fc8", - "x-ms-version", - "2018-03-28", - "Date", - "Fri, 26 Oct 2018 14:59:48 GMT" - ] - }, - { - "scope": "http://127.0.0.1:10000", - "method": "HEAD", - "path": "/devstoreaccount1/test/delete1", - "body": "", - "status": 404, - "response": "", - "rawHeaders": [ - "Transfer-Encoding", - "chunked", - "Server", - "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-request-id", - "269289ae-5324-466b-88f3-2584ae986e5a", - "x-ms-version", - "2018-03-28", - "x-ms-error-code", - "BlobNotFound", - "Date", - "Fri, 26 Oct 2018 14:59:48 GMT" - ] - } -] \ No newline at end of file diff --git a/libraries/botbuilder-azure/tests/TestData/BlobStorage/key_creation.json b/libraries/botbuilder-azure/tests/TestData/BlobStorage/key_creation.json deleted file mode 100644 index e9efdbeec1..0000000000 --- a/libraries/botbuilder-azure/tests/TestData/BlobStorage/key_creation.json +++ /dev/null @@ -1,146 +0,0 @@ -[ - { - "scope": "http://127.0.0.1:10000", - "method": "PUT", - "path": "/devstoreaccount1/test/keyCreate", - "body": { - "id": "keyCreate", - "realId": "keyCreate", - "document": { - "count": 1 - } - }, - "status": 201, - "response": "", - "rawHeaders": [ - "Transfer-Encoding", - "chunked", - "Content-MD5", - "kSCTb2+NbimMDNoSJhcRBQ==", - "Last-Modified", - "Fri, 26 Oct 2018 14:59:46 GMT", - "ETag", - "\"0x8D63B53ABB40550\"", - "Server", - "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-request-id", - "07ce0205-0c27-48b6-9a36-8d320fe26871", - "x-ms-version", - "2018-03-28", - "x-ms-request-server-encrypted", - "true", - "Date", - "Fri, 26 Oct 2018 14:59:46 GMT" - ] - }, - { - "scope": "http://127.0.0.1:10000", - "method": "HEAD", - "path": "/devstoreaccount1/test/keyCreate", - "body": "", - "status": 200, - "response": "", - "rawHeaders": [ - "Content-Length", - "62", - "Content-Type", - "application/octet-stream", - "Content-MD5", - "kSCTb2+NbimMDNoSJhcRBQ==", - "Last-Modified", - "Fri, 26 Oct 2018 14:59:46 GMT", - "Accept-Ranges", - "bytes", - "ETag", - "\"0x8D63B53ABB40550\"", - "Server", - "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-request-id", - "2d8bc054-ba8a-4dd7-a364-6b9023c9447f", - "x-ms-version", - "2018-03-28", - "x-ms-creation-time", - "Fri, 26 Oct 2018 14:59:46 GMT", - "x-ms-lease-status", - "unlocked", - "x-ms-lease-state", - "available", - "x-ms-blob-type", - "BlockBlob", - "x-ms-server-encrypted", - "true", - "Date", - "Fri, 26 Oct 2018 14:59:46 GMT" - ] - }, - { - "scope": "http://127.0.0.1:10000", - "method": "HEAD", - "path": "/devstoreaccount1/test/keyCreate?comp=metadata", - "body": "", - "status": 200, - "response": "", - "rawHeaders": [ - "Transfer-Encoding", - "chunked", - "Last-Modified", - "Fri, 26 Oct 2018 14:59:46 GMT", - "ETag", - "\"0x8D63B53ABB40550\"", - "Server", - "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-request-id", - "ad1e7f73-de35-462b-99a0-9c9fe86b67b8", - "x-ms-version", - "2018-03-28", - "Date", - "Fri, 26 Oct 2018 14:59:46 GMT" - ] - }, - { - "scope": "http://127.0.0.1:10000", - "method": "GET", - "path": "/devstoreaccount1/test/keyCreate", - "body": "", - "status": 200, - "response": { - "id": "keyCreate", - "realId": "keyCreate", - "document": { - "count": 1 - } - }, - "rawHeaders": [ - "Content-Length", - "62", - "Content-Type", - "application/octet-stream", - "Content-MD5", - "kSCTb2+NbimMDNoSJhcRBQ==", - "Last-Modified", - "Fri, 26 Oct 2018 14:59:46 GMT", - "Accept-Ranges", - "bytes", - "ETag", - "\"0x8D63B53ABB40550\"", - "Server", - "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-request-id", - "37b15db8-37aa-486e-8c6a-b3761cad2850", - "x-ms-version", - "2018-03-28", - "x-ms-creation-time", - "Fri, 26 Oct 2018 14:59:46 GMT", - "x-ms-lease-status", - "unlocked", - "x-ms-lease-state", - "available", - "x-ms-blob-type", - "BlockBlob", - "x-ms-server-encrypted", - "true", - "Date", - "Fri, 26 Oct 2018 14:59:47 GMT" - ] - } -] \ No newline at end of file diff --git a/libraries/botbuilder-azure/tests/TestData/BlobStorage/wildcard_eTag.json b/libraries/botbuilder-azure/tests/TestData/BlobStorage/wildcard_eTag.json deleted file mode 100644 index 4bc64c7cdf..0000000000 --- a/libraries/botbuilder-azure/tests/TestData/BlobStorage/wildcard_eTag.json +++ /dev/null @@ -1,216 +0,0 @@ -[ - { - "scope": "http://127.0.0.1:10000", - "method": "PUT", - "path": "/devstoreaccount1/test/keyUpdate3", - "body": { - "id": "keyUpdate3", - "realId": "keyUpdate3", - "document": { - "count": 1 - } - }, - "status": 201, - "response": "", - "rawHeaders": [ - "Transfer-Encoding", - "chunked", - "Content-MD5", - "phLS24kpyWpN5WHTI4g6yQ==", - "Last-Modified", - "Fri, 26 Oct 2018 14:59:48 GMT", - "ETag", - "\"0x8D63B53ACAE43D0\"", - "Server", - "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-request-id", - "43a77d05-a801-478d-9512-16e6a2ec68d0", - "x-ms-version", - "2018-03-28", - "x-ms-request-server-encrypted", - "true", - "Date", - "Fri, 26 Oct 2018 14:59:48 GMT" - ] - }, - { - "scope": "http://127.0.0.1:10000", - "method": "HEAD", - "path": "/devstoreaccount1/test/keyUpdate3", - "body": "", - "status": 200, - "response": "", - "rawHeaders": [ - "Content-Length", - "64", - "Content-Type", - "application/octet-stream", - "Content-MD5", - "phLS24kpyWpN5WHTI4g6yQ==", - "Last-Modified", - "Fri, 26 Oct 2018 14:59:48 GMT", - "Accept-Ranges", - "bytes", - "ETag", - "\"0x8D63B53ACAE43D0\"", - "Server", - "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-request-id", - "8f67335a-dd91-48ec-bd08-c53009d9f6da", - "x-ms-version", - "2018-03-28", - "x-ms-creation-time", - "Fri, 26 Oct 2018 14:59:48 GMT", - "x-ms-lease-status", - "unlocked", - "x-ms-lease-state", - "available", - "x-ms-blob-type", - "BlockBlob", - "x-ms-server-encrypted", - "true", - "Date", - "Fri, 26 Oct 2018 14:59:48 GMT" - ] - }, - { - "scope": "http://127.0.0.1:10000", - "method": "HEAD", - "path": "/devstoreaccount1/test/keyUpdate3?comp=metadata", - "body": "", - "status": 200, - "response": "", - "rawHeaders": [ - "Transfer-Encoding", - "chunked", - "Last-Modified", - "Fri, 26 Oct 2018 14:59:48 GMT", - "ETag", - "\"0x8D63B53ACAE43D0\"", - "Server", - "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-request-id", - "bffb82f9-3e8e-4da0-9aa9-103146782d87", - "x-ms-version", - "2018-03-28", - "Date", - "Fri, 26 Oct 2018 14:59:48 GMT" - ] - }, - { - "scope": "http://127.0.0.1:10000", - "method": "GET", - "path": "/devstoreaccount1/test/keyUpdate3", - "body": "", - "status": 200, - "response": { - "id": "keyUpdate3", - "realId": "keyUpdate3", - "document": { - "count": 1 - } - }, - "rawHeaders": [ - "Content-Length", - "64", - "Content-Type", - "application/octet-stream", - "Content-MD5", - "phLS24kpyWpN5WHTI4g6yQ==", - "Last-Modified", - "Fri, 26 Oct 2018 14:59:48 GMT", - "Accept-Ranges", - "bytes", - "ETag", - "\"0x8D63B53ACAE43D0\"", - "Server", - "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-request-id", - "0ce2e256-b458-4c60-9653-63ee5af2fb8a", - "x-ms-version", - "2018-03-28", - "x-ms-creation-time", - "Fri, 26 Oct 2018 14:59:48 GMT", - "x-ms-lease-status", - "unlocked", - "x-ms-lease-state", - "available", - "x-ms-blob-type", - "BlockBlob", - "x-ms-server-encrypted", - "true", - "Date", - "Fri, 26 Oct 2018 14:59:48 GMT" - ] - }, - { - "scope": "http://127.0.0.1:10000", - "method": "PUT", - "path": "/devstoreaccount1/test/keyUpdate3", - "body": { - "id": "keyUpdate3", - "realId": "keyUpdate3", - "document": { - "count": 2, - "eTag": "*" - } - }, - "status": 201, - "response": "", - "rawHeaders": [ - "Transfer-Encoding", - "chunked", - "Content-MD5", - "FZocfWKvGR5HxHz4KXnNAw==", - "Last-Modified", - "Fri, 26 Oct 2018 14:59:48 GMT", - "ETag", - "\"0x8D63B53ACCF6060\"", - "Server", - "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-request-id", - "2816de4e-19a8-4395-8052-afe284046b94", - "x-ms-version", - "2018-03-28", - "x-ms-request-server-encrypted", - "true", - "Date", - "Fri, 26 Oct 2018 14:59:48 GMT" - ] - }, - { - "scope": "http://127.0.0.1:10000", - "method": "PUT", - "path": "/devstoreaccount1/test/keyUpdate3", - "body": { - "id": "keyUpdate3", - "realId": "keyUpdate3", - "document": { - "count": 3, - "eTag": "*" - } - }, - "status": 201, - "response": "", - "rawHeaders": [ - "Transfer-Encoding", - "chunked", - "Content-MD5", - "GGi7P95lL/3aOmaSVTwm7A==", - "Last-Modified", - "Fri, 26 Oct 2018 14:59:48 GMT", - "ETag", - "\"0x8D63B53ACE09E70\"", - "Server", - "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-request-id", - "720b7302-af7d-4d39-862d-6fa3ec651939", - "x-ms-version", - "2018-03-28", - "x-ms-request-server-encrypted", - "true", - "Date", - "Fri, 26 Oct 2018 14:59:48 GMT" - ] - } -] \ No newline at end of file diff --git a/libraries/botbuilder-azure/tests/TestData/CosmosDbPartitionedStorage/should_create_an_object.json b/libraries/botbuilder-azure/tests/TestData/CosmosDbPartitionedStorage - Base Storage Tests/create_an_object.json similarity index 74% rename from libraries/botbuilder-azure/tests/TestData/CosmosDbPartitionedStorage/should_create_an_object.json rename to libraries/botbuilder-azure/tests/TestData/CosmosDbPartitionedStorage - Base Storage Tests/create_an_object.json index 862c1086f4..06d2678d92 100644 --- a/libraries/botbuilder-azure/tests/TestData/CosmosDbPartitionedStorage/should_create_an_object.json +++ b/libraries/botbuilder-azure/tests/TestData/CosmosDbPartitionedStorage - Base Storage Tests/create_an_object.json @@ -12,8 +12,7 @@ "automatic": true, "includedPaths": [ { - "path": "/*", - "indexes": [] + "path": "/*" } ], "excludedPaths": [ @@ -28,10 +27,18 @@ ], "kind": "Hash" }, - "_rid": "-gMpAKxPACs=", - "_ts": 1575587031, - "_self": "dbs/-gMpAA==/colls/-gMpAKxPACs=/", - "_etag": "\"00000000-0000-0000-abc0-42853de101d5\"", + "conflictResolutionPolicy": { + "mode": "LastWriterWins", + "conflictResolutionPath": "/_ts", + "conflictResolutionProcedure": "" + }, + "geospatialConfig": { + "type": "Geography" + }, + "_rid": "gzFFAPwkVIU=", + "_ts": 1576193215, + "_self": "dbs/gzFFAA==/colls/gzFFAPwkVIU=/", + "_etag": "\"00000000-0000-0000-b143-a46cbf5301d5\"", "_docs": "docs/", "_sprocs": "sprocs/", "_triggers": "triggers/", @@ -56,23 +63,23 @@ "Access-Control-Allow-Credentials", "true", "x-ms-last-state-change-utc", - "Thu, 05 Dec 2019 01:23:43.997 GMT", + "Wed, 11 Dec 2019 19:46:09.043 GMT", "etag", - "\"00000000-0000-0000-abc0-42853de101d5\"", + "\"00000000-0000-0000-b143-a46cbf5301d5\"", "collection-partition-index", "0", "collection-service-index", "0", "lsn", - "51", + "4034", "x-ms-schemaversion", - "1.7", + "1.8", "x-ms-alt-content-path", "dbs/test-db", "x-ms-content-path", - "-gMpAA==", + "gzFFAA==", "x-ms-quorum-acked-lsn", - "51", + "4034", "x-ms-current-write-quorum", "1", "x-ms-current-replica-set-size", @@ -84,27 +91,27 @@ "x-ms-number-of-read-regions", "0", "x-ms-item-lsn", - "51", + "4034", "x-ms-transport-request-id", - "119", + "1355", "x-ms-cosmos-llsn", - "51", + "4034", "x-ms-cosmos-quorum-acked-llsn", - "51", + "4034", "x-ms-cosmos-item-llsn", - "51", + "4034", "x-ms-session-token", - "0:-1#51", + "0:-1#4034", "x-ms-request-charge", "1", "x-ms-serviceversion", - "version=2.2.0.0", + "version=2.7.0.0", "x-ms-activity-id", - "3ee74b58-9f7d-4da4-9bab-dfd5051fd4be", + "40c5cc7c-a45c-4665-8ce1-69c461fddb82", "x-ms-gatewayversion", - "version=2.2.0.0", + "version=2.7.0", "Date", - "Thu, 05 Dec 2019 23:03:51 GMT", + "Thu, 12 Dec 2019 23:26:55 GMT", "Connection", "close" ] @@ -122,8 +129,7 @@ "automatic": true, "includedPaths": [ { - "path": "/*", - "indexes": [] + "path": "/*" } ], "excludedPaths": [ @@ -138,10 +144,18 @@ ], "kind": "Hash" }, - "_rid": "-gMpAKxPACs=", - "_ts": 1575587031, - "_self": "dbs/-gMpAA==/colls/-gMpAKxPACs=/", - "_etag": "\"00000000-0000-0000-abc0-42853de101d5\"", + "conflictResolutionPolicy": { + "mode": "LastWriterWins", + "conflictResolutionPath": "/_ts", + "conflictResolutionProcedure": "" + }, + "geospatialConfig": { + "type": "Geography" + }, + "_rid": "gzFFAPwkVIU=", + "_ts": 1576193215, + "_self": "dbs/gzFFAA==/colls/gzFFAPwkVIU=/", + "_etag": "\"00000000-0000-0000-b143-a46cbf5301d5\"", "_docs": "docs/", "_sprocs": "sprocs/", "_triggers": "triggers/", @@ -166,23 +180,23 @@ "Access-Control-Allow-Credentials", "true", "x-ms-last-state-change-utc", - "Thu, 05 Dec 2019 01:23:43.997 GMT", + "Wed, 11 Dec 2019 19:46:09.043 GMT", "etag", - "\"00000000-0000-0000-abc0-42853de101d5\"", + "\"00000000-0000-0000-b143-a46cbf5301d5\"", "collection-partition-index", "0", "collection-service-index", "0", "lsn", - "51", + "4034", "x-ms-schemaversion", - "1.7", + "1.8", "x-ms-alt-content-path", "dbs/test-db", "x-ms-content-path", - "-gMpAA==", + "gzFFAA==", "x-ms-quorum-acked-lsn", - "51", + "4034", "x-ms-current-write-quorum", "1", "x-ms-current-replica-set-size", @@ -194,27 +208,27 @@ "x-ms-number-of-read-regions", "0", "x-ms-item-lsn", - "51", + "4034", "x-ms-transport-request-id", - "120", + "1356", "x-ms-cosmos-llsn", - "51", + "4034", "x-ms-cosmos-quorum-acked-llsn", - "51", + "4034", "x-ms-cosmos-item-llsn", - "51", + "4034", "x-ms-session-token", - "0:-1#51", + "0:-1#4034", "x-ms-request-charge", "1", "x-ms-serviceversion", - "version=2.2.0.0", + "version=2.7.0.0", "x-ms-activity-id", - "3a84cba2-bba9-40b1-a7a9-a152675f2db2", + "7d3d1dab-e395-472e-b03b-405b76b63c42", "x-ms-gatewayversion", - "version=2.2.0.0", + "version=2.7.0", "Date", - "Thu, 05 Dec 2019 23:03:51 GMT", + "Thu, 12 Dec 2019 23:26:55 GMT", "Connection", "close" ] @@ -237,11 +251,11 @@ "document": { "id": 1 }, - "_rid": "-gMpAKxPACsBAAAAAAAAAA==", - "_self": "dbs/-gMpAA==/colls/-gMpAKxPACs=/docs/-gMpAKxPACsBAAAAAAAAAA==/", - "_etag": "\"00000000-0000-0000-abc0-42aa7a5501d5\"", + "_rid": "gzFFAPwkVIUBAAAAAAAAAA==", + "_self": "dbs/gzFFAA==/colls/gzFFAPwkVIU=/docs/gzFFAPwkVIUBAAAAAAAAAA==/", + "_etag": "\"00000000-0000-0000-b143-a4af19fe01d5\"", "_attachments": "attachments/", - "_ts": 1575587031 + "_ts": 1576193216 }, "rawHeaders": [ "Cache-Control", @@ -259,23 +273,23 @@ "Access-Control-Allow-Credentials", "true", "x-ms-last-state-change-utc", - "Thu, 05 Dec 2019 01:23:43.997 GMT", + "Wed, 11 Dec 2019 19:46:09.043 GMT", "etag", - "\"00000000-0000-0000-abc0-42aa7a5501d5\"", + "\"00000000-0000-0000-b143-a4af19fe01d5\"", "x-ms-resource-quota", "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", "x-ms-resource-usage", "documentSize=0;documentsSize=0;documentsCount=0;collectionSize=1;", "lsn", - "52", + "4035", "x-ms-schemaversion", - "1.7", + "1.8", "x-ms-alt-content-path", "dbs/test-db/colls/bot-storage", "x-ms-content-path", - "-gMpAKxPACs=", + "gzFFAPwkVIU=", "x-ms-quorum-acked-lsn", - "51", + "4034", "x-ms-current-write-quorum", "1", "x-ms-current-replica-set-size", @@ -287,23 +301,23 @@ "x-ms-number-of-read-regions", "0", "x-ms-transport-request-id", - "121", + "1357", "x-ms-cosmos-llsn", - "52", + "4035", "x-ms-cosmos-quorum-acked-llsn", - "51", + "4034", "x-ms-session-token", - "0:-1#52", + "0:-1#4035", "x-ms-request-charge", "6.48", "x-ms-serviceversion", - "version=2.2.0.0", + "version=2.7.0.0", "x-ms-activity-id", - "fe9a1b05-a46e-43e8-a218-3c255276a814", + "8b4126cf-3903-4dd9-9831-4b6c4ae89bda", "x-ms-gatewayversion", - "version=2.2.0.0", + "version=2.7.0", "Date", - "Thu, 05 Dec 2019 23:03:51 GMT", + "Thu, 12 Dec 2019 23:26:55 GMT", "Connection", "close" ] @@ -326,11 +340,11 @@ "document": { "id": 2 }, - "_rid": "-gMpAKxPACsCAAAAAAAAAA==", - "_self": "dbs/-gMpAA==/colls/-gMpAKxPACs=/docs/-gMpAKxPACsCAAAAAAAAAA==/", - "_etag": "\"00000000-0000-0000-abc0-42ab06ee01d5\"", + "_rid": "gzFFAPwkVIUCAAAAAAAAAA==", + "_self": "dbs/gzFFAA==/colls/gzFFAPwkVIU=/docs/gzFFAPwkVIUCAAAAAAAAAA==/", + "_etag": "\"00000000-0000-0000-b143-a4af939201d5\"", "_attachments": "attachments/", - "_ts": 1575587031 + "_ts": 1576193216 }, "rawHeaders": [ "Cache-Control", @@ -348,23 +362,23 @@ "Access-Control-Allow-Credentials", "true", "x-ms-last-state-change-utc", - "Thu, 05 Dec 2019 01:23:43.997 GMT", + "Wed, 11 Dec 2019 19:46:09.043 GMT", "etag", - "\"00000000-0000-0000-abc0-42ab06ee01d5\"", + "\"00000000-0000-0000-b143-a4af939201d5\"", "x-ms-resource-quota", "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", "x-ms-resource-usage", "documentSize=0;documentsSize=0;documentsCount=1;collectionSize=2;", "lsn", - "53", + "4036", "x-ms-schemaversion", - "1.7", + "1.8", "x-ms-alt-content-path", "dbs/test-db/colls/bot-storage", "x-ms-content-path", - "-gMpAKxPACs=", + "gzFFAPwkVIU=", "x-ms-quorum-acked-lsn", - "52", + "4035", "x-ms-current-write-quorum", "1", "x-ms-current-replica-set-size", @@ -376,23 +390,23 @@ "x-ms-number-of-read-regions", "0", "x-ms-transport-request-id", - "122", + "1358", "x-ms-cosmos-llsn", - "53", + "4036", "x-ms-cosmos-quorum-acked-llsn", - "52", + "4035", "x-ms-session-token", - "0:-1#53", + "0:-1#4036", "x-ms-request-charge", "6.48", "x-ms-serviceversion", - "version=2.2.0.0", + "version=2.7.0.0", "x-ms-activity-id", - "0cd3c352-e529-48f3-b6e9-670b1e0265e0", + "8c12534a-ce3b-40fe-946c-255a09f1a01f", "x-ms-gatewayversion", - "version=2.2.0.0", + "version=2.7.0", "Date", - "Thu, 05 Dec 2019 23:03:51 GMT", + "Thu, 12 Dec 2019 23:26:55 GMT", "Connection", "close" ] @@ -400,20 +414,20 @@ { "scope": "https://localhost:8081", "method": "GET", - "path": "/dbs/test-db/colls/bot-storage/docs/createPocoStoreItem", + "path": "/dbs/test-db/colls/bot-storage/docs/createPoco", "body": "", "status": 200, "response": { - "id": "createPocoStoreItem", - "realId": "createPocoStoreItem", + "id": "createPoco", + "realId": "createPoco", "document": { - "id": 2 + "id": 1 }, - "_rid": "-gMpAKxPACsCAAAAAAAAAA==", - "_self": "dbs/-gMpAA==/colls/-gMpAKxPACs=/docs/-gMpAKxPACsCAAAAAAAAAA==/", - "_etag": "\"00000000-0000-0000-abc0-42ab06ee01d5\"", + "_rid": "gzFFAPwkVIUBAAAAAAAAAA==", + "_self": "dbs/gzFFAA==/colls/gzFFAPwkVIU=/docs/gzFFAPwkVIUBAAAAAAAAAA==/", + "_etag": "\"00000000-0000-0000-b143-a4af19fe01d5\"", "_attachments": "attachments/", - "_ts": 1575587031 + "_ts": 1576193216 }, "rawHeaders": [ "Cache-Control", @@ -425,7 +439,7 @@ "Content-Type", "application/json", "Content-Location", - "https://localhost:8081/dbs/test-db/colls/bot-storage/docs/createPocoStoreItem", + "https://localhost:8081/dbs/test-db/colls/bot-storage/docs/createPoco", "Server", "Microsoft-HTTPAPI/2.0", "Access-Control-Allow-Origin", @@ -433,23 +447,23 @@ "Access-Control-Allow-Credentials", "true", "x-ms-last-state-change-utc", - "Thu, 05 Dec 2019 01:23:43.997 GMT", + "Wed, 11 Dec 2019 19:46:09.043 GMT", "etag", - "\"00000000-0000-0000-abc0-42ab06ee01d5\"", + "\"00000000-0000-0000-b143-a4af19fe01d5\"", "x-ms-resource-quota", "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", "x-ms-resource-usage", "documentSize=0;documentsSize=0;documentsCount=2;collectionSize=2;", "lsn", - "53", + "4036", "x-ms-schemaversion", - "1.7", + "1.8", "x-ms-alt-content-path", "dbs/test-db/colls/bot-storage", "x-ms-content-path", - "-gMpAKxPACs=", + "gzFFAPwkVIU=", "x-ms-quorum-acked-lsn", - "53", + "4036", "x-ms-current-write-quorum", "1", "x-ms-current-replica-set-size", @@ -461,27 +475,27 @@ "x-ms-number-of-read-regions", "0", "x-ms-item-lsn", - "53", + "4035", "x-ms-transport-request-id", - "123", + "1360", "x-ms-cosmos-llsn", - "53", + "4036", "x-ms-cosmos-quorum-acked-llsn", - "53", + "4036", "x-ms-cosmos-item-llsn", - "53", + "4035", "x-ms-session-token", - "0:-1#53", + "0:-1#4036", "x-ms-request-charge", "1", "x-ms-serviceversion", - "version=2.2.0.0", + "version=2.7.0.0", "x-ms-activity-id", - "5c284591-593b-4cd6-b5bb-94ce86f9426f", + "12d6c6d1-f1ad-4409-ad8c-88f3bcd407a7", "x-ms-gatewayversion", - "version=2.2.0.0", + "version=2.7.0", "Date", - "Thu, 05 Dec 2019 23:03:51 GMT", + "Thu, 12 Dec 2019 23:26:55 GMT", "Connection", "close" ] @@ -489,20 +503,20 @@ { "scope": "https://localhost:8081", "method": "GET", - "path": "/dbs/test-db/colls/bot-storage/docs/createPoco", + "path": "/dbs/test-db/colls/bot-storage/docs/createPocoStoreItem", "body": "", "status": 200, "response": { - "id": "createPoco", - "realId": "createPoco", + "id": "createPocoStoreItem", + "realId": "createPocoStoreItem", "document": { - "id": 1 + "id": 2 }, - "_rid": "-gMpAKxPACsBAAAAAAAAAA==", - "_self": "dbs/-gMpAA==/colls/-gMpAKxPACs=/docs/-gMpAKxPACsBAAAAAAAAAA==/", - "_etag": "\"00000000-0000-0000-abc0-42aa7a5501d5\"", + "_rid": "gzFFAPwkVIUCAAAAAAAAAA==", + "_self": "dbs/gzFFAA==/colls/gzFFAPwkVIU=/docs/gzFFAPwkVIUCAAAAAAAAAA==/", + "_etag": "\"00000000-0000-0000-b143-a4af939201d5\"", "_attachments": "attachments/", - "_ts": 1575587031 + "_ts": 1576193216 }, "rawHeaders": [ "Cache-Control", @@ -514,7 +528,7 @@ "Content-Type", "application/json", "Content-Location", - "https://localhost:8081/dbs/test-db/colls/bot-storage/docs/createPoco", + "https://localhost:8081/dbs/test-db/colls/bot-storage/docs/createPocoStoreItem", "Server", "Microsoft-HTTPAPI/2.0", "Access-Control-Allow-Origin", @@ -522,23 +536,23 @@ "Access-Control-Allow-Credentials", "true", "x-ms-last-state-change-utc", - "Thu, 05 Dec 2019 01:23:43.997 GMT", + "Wed, 11 Dec 2019 19:46:09.043 GMT", "etag", - "\"00000000-0000-0000-abc0-42aa7a5501d5\"", + "\"00000000-0000-0000-b143-a4af939201d5\"", "x-ms-resource-quota", "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", "x-ms-resource-usage", "documentSize=0;documentsSize=0;documentsCount=2;collectionSize=2;", "lsn", - "53", + "4036", "x-ms-schemaversion", - "1.7", + "1.8", "x-ms-alt-content-path", "dbs/test-db/colls/bot-storage", "x-ms-content-path", - "-gMpAKxPACs=", + "gzFFAPwkVIU=", "x-ms-quorum-acked-lsn", - "53", + "4036", "x-ms-current-write-quorum", "1", "x-ms-current-replica-set-size", @@ -550,27 +564,27 @@ "x-ms-number-of-read-regions", "0", "x-ms-item-lsn", - "52", + "4036", "x-ms-transport-request-id", - "124", + "1359", "x-ms-cosmos-llsn", - "53", + "4036", "x-ms-cosmos-quorum-acked-llsn", - "53", + "4036", "x-ms-cosmos-item-llsn", - "52", + "4036", "x-ms-session-token", - "0:-1#53", + "0:-1#4036", "x-ms-request-charge", "1", "x-ms-serviceversion", - "version=2.2.0.0", + "version=2.7.0.0", "x-ms-activity-id", - "84e85c4a-4b0d-4d06-b2d8-666039d3c13f", + "9e67ef62-9b2b-4477-9d4f-e7fb68ad185a", "x-ms-gatewayversion", - "version=2.2.0.0", + "version=2.7.0", "Date", - "Thu, 05 Dec 2019 23:03:51 GMT", + "Thu, 12 Dec 2019 23:26:55 GMT", "Connection", "close" ] diff --git a/libraries/botbuilder-azure/tests/TestData/CosmosDbPartitionedStorage/should_delete_an_object.json b/libraries/botbuilder-azure/tests/TestData/CosmosDbPartitionedStorage - Base Storage Tests/delete_an_object.json similarity index 73% rename from libraries/botbuilder-azure/tests/TestData/CosmosDbPartitionedStorage/should_delete_an_object.json rename to libraries/botbuilder-azure/tests/TestData/CosmosDbPartitionedStorage - Base Storage Tests/delete_an_object.json index 27d3064e71..7bf02152a8 100644 --- a/libraries/botbuilder-azure/tests/TestData/CosmosDbPartitionedStorage/should_delete_an_object.json +++ b/libraries/botbuilder-azure/tests/TestData/CosmosDbPartitionedStorage - Base Storage Tests/delete_an_object.json @@ -19,11 +19,11 @@ "id": 1, "count": 1 }, - "_rid": "-gMpAKxPACsGAAAAAAAAAA==", - "_self": "dbs/-gMpAA==/colls/-gMpAKxPACs=/docs/-gMpAKxPACsGAAAAAAAAAA==/", - "_etag": "\"00000000-0000-0000-abc0-42ce8b5601d5\"", + "_rid": "gzFFAPwkVIUGAAAAAAAAAA==", + "_self": "dbs/gzFFAA==/colls/gzFFAPwkVIU=/docs/gzFFAPwkVIUGAAAAAAAAAA==/", + "_etag": "\"00000000-0000-0000-b143-a4dd51b101d5\"", "_attachments": "attachments/", - "_ts": 1575587032 + "_ts": 1576193216 }, "rawHeaders": [ "Cache-Control", @@ -41,23 +41,23 @@ "Access-Control-Allow-Credentials", "true", "x-ms-last-state-change-utc", - "Thu, 05 Dec 2019 01:23:43.997 GMT", + "Wed, 11 Dec 2019 19:46:09.043 GMT", "etag", - "\"00000000-0000-0000-abc0-42ce8b5601d5\"", + "\"00000000-0000-0000-b143-a4dd51b101d5\"", "x-ms-resource-quota", "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", "x-ms-resource-usage", "documentSize=0;documentsSize=0;documentsCount=5;collectionSize=6;", "lsn", - "63", + "4046", "x-ms-schemaversion", - "1.7", + "1.8", "x-ms-alt-content-path", "dbs/test-db/colls/bot-storage", "x-ms-content-path", - "-gMpAKxPACs=", + "gzFFAPwkVIU=", "x-ms-quorum-acked-lsn", - "62", + "4045", "x-ms-current-write-quorum", "1", "x-ms-current-replica-set-size", @@ -69,23 +69,23 @@ "x-ms-number-of-read-regions", "0", "x-ms-transport-request-id", - "146", + "1383", "x-ms-cosmos-llsn", - "63", + "4046", "x-ms-cosmos-quorum-acked-llsn", - "62", + "4045", "x-ms-session-token", - "0:-1#63", + "0:-1#4046", "x-ms-request-charge", "6.86", "x-ms-serviceversion", - "version=2.2.0.0", + "version=2.7.0.0", "x-ms-activity-id", - "40bc1ccb-887d-46ef-9a2f-81c7c51c6c65", + "724d80ed-34be-40a7-ba13-6f6c26394eec", "x-ms-gatewayversion", - "version=2.2.0.0", + "version=2.7.0", "Date", - "Thu, 05 Dec 2019 23:03:51 GMT", + "Thu, 12 Dec 2019 23:26:55 GMT", "Connection", "close" ] @@ -103,11 +103,11 @@ "id": 1, "count": 1 }, - "_rid": "-gMpAKxPACsGAAAAAAAAAA==", - "_self": "dbs/-gMpAA==/colls/-gMpAKxPACs=/docs/-gMpAKxPACsGAAAAAAAAAA==/", - "_etag": "\"00000000-0000-0000-abc0-42ce8b5601d5\"", + "_rid": "gzFFAPwkVIUGAAAAAAAAAA==", + "_self": "dbs/gzFFAA==/colls/gzFFAPwkVIU=/docs/gzFFAPwkVIUGAAAAAAAAAA==/", + "_etag": "\"00000000-0000-0000-b143-a4dd51b101d5\"", "_attachments": "attachments/", - "_ts": 1575587032 + "_ts": 1576193216 }, "rawHeaders": [ "Cache-Control", @@ -127,23 +127,23 @@ "Access-Control-Allow-Credentials", "true", "x-ms-last-state-change-utc", - "Thu, 05 Dec 2019 01:23:43.997 GMT", + "Wed, 11 Dec 2019 19:46:09.043 GMT", "etag", - "\"00000000-0000-0000-abc0-42ce8b5601d5\"", + "\"00000000-0000-0000-b143-a4dd51b101d5\"", "x-ms-resource-quota", "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", "x-ms-resource-usage", "documentSize=0;documentsSize=0;documentsCount=6;collectionSize=6;", "lsn", - "63", + "4046", "x-ms-schemaversion", - "1.7", + "1.8", "x-ms-alt-content-path", "dbs/test-db/colls/bot-storage", "x-ms-content-path", - "-gMpAKxPACs=", + "gzFFAPwkVIU=", "x-ms-quorum-acked-lsn", - "63", + "4046", "x-ms-current-write-quorum", "1", "x-ms-current-replica-set-size", @@ -155,27 +155,27 @@ "x-ms-number-of-read-regions", "0", "x-ms-item-lsn", - "63", + "4046", "x-ms-transport-request-id", - "147", + "1384", "x-ms-cosmos-llsn", - "63", + "4046", "x-ms-cosmos-quorum-acked-llsn", - "63", + "4046", "x-ms-cosmos-item-llsn", - "63", + "4046", "x-ms-session-token", - "0:-1#63", + "0:-1#4046", "x-ms-request-charge", "1", "x-ms-serviceversion", - "version=2.2.0.0", + "version=2.7.0.0", "x-ms-activity-id", - "6658cf20-3a1d-46b5-a248-c5314d3b18c7", + "9b0aaa1d-6a6a-4353-9c6e-558ce95efeb5", "x-ms-gatewayversion", - "version=2.2.0.0", + "version=2.7.0", "Date", - "Thu, 05 Dec 2019 23:03:51 GMT", + "Thu, 12 Dec 2019 23:26:55 GMT", "Connection", "close" ] @@ -205,21 +205,21 @@ "Access-Control-Allow-Credentials", "true", "x-ms-last-state-change-utc", - "Thu, 05 Dec 2019 01:23:43.997 GMT", + "Wed, 11 Dec 2019 19:46:09.043 GMT", "x-ms-resource-quota", "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", "x-ms-resource-usage", "documentSize=0;documentsSize=0;documentsCount=6;collectionSize=5;", "lsn", - "64", + "4047", "x-ms-schemaversion", - "1.7", + "1.8", "x-ms-alt-content-path", "dbs/test-db/colls/bot-storage", "x-ms-content-path", - "-gMpAKxPACs=", + "gzFFAPwkVIU=", "x-ms-quorum-acked-lsn", - "63", + "4046", "x-ms-current-write-quorum", "1", "x-ms-current-replica-set-size", @@ -231,23 +231,23 @@ "x-ms-number-of-read-regions", "0", "x-ms-transport-request-id", - "148", + "1385", "x-ms-cosmos-llsn", - "64", + "4047", "x-ms-cosmos-quorum-acked-llsn", - "63", + "4046", "x-ms-session-token", - "0:-1#64", + "0:-1#4047", "x-ms-request-charge", "6.86", "x-ms-serviceversion", - "version=2.2.0.0", + "version=2.7.0.0", "x-ms-activity-id", - "2068d01e-ec6b-47b8-a03c-c1ed68b7fe2f", + "a04a5acf-a27c-4aef-9cd8-d01078acb02b", "x-ms-gatewayversion", - "version=2.2.0.0", + "version=2.7.0", "Date", - "Thu, 05 Dec 2019 23:03:51 GMT", + "Thu, 12 Dec 2019 23:26:55 GMT", "Connection", "close" ] @@ -260,7 +260,7 @@ "status": 404, "response": { "code": "NotFound", - "message": "Message: {\"Errors\":[\"Resource Not Found\"]}\r\nActivityId: 731aacc6-1cd4-419b-ad5f-1a121b9fd7aa, Request URI: /apps/DocDbApp/services/DocDbServer1/partitions/a4cb494d-38c8-11e6-8106-8cdcd42c33be/replicas/1p/, RequestStats: \r\nRequestStartTime: 2019-12-05T23:03:52.0487852Z, RequestEndTime: 2019-12-05T23:03:52.0497815Z, Number of regions attempted: 1\r\nResponseTime: 2019-12-05T23:03:52.0497815Z, StoreResult: StorePhysicalAddress: rntbd://127.0.0.1:10253/apps/DocDbApp/services/DocDbServer1/partitions/a4cb494d-38c8-11e6-8106-8cdcd42c33be/replicas/1p/, LSN: 64, GlobalCommittedLsn: -1, PartitionKeyRangeId: 0, IsValid: True, StatusCode: 404, SubStatusCode: 0, RequestCharge: 1, ItemLSN: -1, SessionToken: -1#64, UsingLocalLSN: True, TransportException: null, ResourceType: Document, OperationType: Read\r\n, SDK: Microsoft.Azure.Documents.Common/2.2.0.0" + "message": "Message: {\"Errors\":[\"Resource Not Found\"]}\r\nActivityId: 0c77a9db-fd87-4946-a70d-91d5e2cbc883, Request URI: /apps/DocDbApp/services/DocDbServer7/partitions/a4cb4953-38c8-11e6-8106-8cdcd42c33be/replicas/1p/, RequestStats: \r\nRequestStartTime: 2019-12-12T23:26:56.4486709Z, RequestEndTime: 2019-12-12T23:26:56.4496589Z, Number of regions attempted:1\r\nResponseTime: 2019-12-12T23:26:56.4496589Z, StoreResult: StorePhysicalAddress: rntbd://127.0.0.1:10253/apps/DocDbApp/services/DocDbServer7/partitions/a4cb4953-38c8-11e6-8106-8cdcd42c33be/replicas/1p/, LSN: 4047, GlobalCommittedLsn: -1, PartitionKeyRangeId: 0, IsValid: True, StatusCode: 404, SubStatusCode: 0, RequestCharge: 1, ItemLSN: -1, SessionToken: -1#4047, UsingLocalLSN: True, TransportException: null, ResourceType: Document, OperationType: Read\r\n, SDK: Microsoft.Azure.Documents.Common/2.7.0" }, "rawHeaders": [ "Transfer-Encoding", @@ -276,13 +276,13 @@ "Access-Control-Allow-Credentials", "true", "x-ms-last-state-change-utc", - "Thu, 05 Dec 2019 01:23:43.997 GMT", + "Wed, 11 Dec 2019 19:46:09.043 GMT", "lsn", - "64", + "4047", "x-ms-schemaversion", - "1.7", + "1.8", "x-ms-quorum-acked-lsn", - "64", + "4047", "x-ms-current-write-quorum", "1", "x-ms-current-replica-set-size", @@ -294,23 +294,23 @@ "x-ms-number-of-read-regions", "0", "x-ms-transport-request-id", - "149", + "1386", "x-ms-cosmos-llsn", - "64", + "4047", "x-ms-cosmos-quorum-acked-llsn", - "64", + "4047", "x-ms-session-token", - "0:-1#64", + "0:-1#4047", "x-ms-request-charge", "1", "x-ms-serviceversion", - "version=2.2.0.0", + "version=2.7.0.0", "x-ms-activity-id", - "731aacc6-1cd4-419b-ad5f-1a121b9fd7aa", + "0c77a9db-fd87-4946-a70d-91d5e2cbc883", "x-ms-gatewayversion", - "version=2.2.0.0", + "version=2.7.0", "Date", - "Thu, 05 Dec 2019 23:03:51 GMT", + "Thu, 12 Dec 2019 23:26:55 GMT", "Connection", "close" ] diff --git a/libraries/botbuilder-azure/tests/TestData/CosmosDbPartitionedStorage/should_not_throw_when_deleting_unknown_object.json b/libraries/botbuilder-azure/tests/TestData/CosmosDbPartitionedStorage - Base Storage Tests/does_not_throw_when_deleting_an_unknown_object.json similarity index 59% rename from libraries/botbuilder-azure/tests/TestData/CosmosDbPartitionedStorage/should_not_throw_when_deleting_unknown_object.json rename to libraries/botbuilder-azure/tests/TestData/CosmosDbPartitionedStorage - Base Storage Tests/does_not_throw_when_deleting_an_unknown_object.json index d3764100c1..4f3c95172d 100644 --- a/libraries/botbuilder-azure/tests/TestData/CosmosDbPartitionedStorage/should_not_throw_when_deleting_unknown_object.json +++ b/libraries/botbuilder-azure/tests/TestData/CosmosDbPartitionedStorage - Base Storage Tests/does_not_throw_when_deleting_an_unknown_object.json @@ -7,7 +7,7 @@ "status": 404, "response": { "code": "NotFound", - "message": "Message: {\"Errors\":[\"Resource Not Found\"]}\r\nActivityId: 5483890c-394b-464f-bcfe-3c916a772917, Request URI: /apps/DocDbApp/services/DocDbServer1/partitions/a4cb494d-38c8-11e6-8106-8cdcd42c33be/replicas/1p/, RequestStats: \r\nRequestStartTime: 2019-12-05T23:03:52.0617813Z, RequestEndTime: 2019-12-05T23:03:52.0637806Z, Number of regions attempted: 1\r\nResponseTime: 2019-12-05T23:03:52.0637806Z, StoreResult: StorePhysicalAddress: rntbd://127.0.0.1:10253/apps/DocDbApp/services/DocDbServer1/partitions/a4cb494d-38c8-11e6-8106-8cdcd42c33be/replicas/1p/, LSN: 64, GlobalCommittedLsn: -1, PartitionKeyRangeId: 0, IsValid: True, StatusCode: 404, SubStatusCode: 0, RequestCharge: 1.24, ItemLSN: -1, SessionToken: -1#64, UsingLocalLSN: False, TransportException: null, ResourceType: Document, OperationType: Delete\r\n, SDK: Microsoft.Azure.Documents.Common/2.2.0.0" + "message": "Message: {\"Errors\":[\"Resource Not Found\"]}\r\nActivityId: 5ab2e7cb-4c72-4a26-941e-15c24138369f, Request URI: /apps/DocDbApp/services/DocDbServer7/partitions/a4cb4953-38c8-11e6-8106-8cdcd42c33be/replicas/1p/, RequestStats: \r\nRequestStartTime: 2019-12-12T23:26:56.4666609Z, RequestEndTime: 2019-12-12T23:26:56.4676614Z, Number of regions attempted:1\r\nResponseTime: 2019-12-12T23:26:56.4676614Z, StoreResult: StorePhysicalAddress: rntbd://127.0.0.1:10253/apps/DocDbApp/services/DocDbServer7/partitions/a4cb4953-38c8-11e6-8106-8cdcd42c33be/replicas/1p/, LSN: 4047, GlobalCommittedLsn: -1, PartitionKeyRangeId: 0, IsValid: True, StatusCode: 404, SubStatusCode: 0, RequestCharge: 1.24, ItemLSN: -1, SessionToken: -1#4047, UsingLocalLSN: False, TransportException: null, ResourceType: Document, OperationType: Delete\r\n, SDK: Microsoft.Azure.Documents.Common/2.7.0" }, "rawHeaders": [ "Transfer-Encoding", @@ -23,13 +23,13 @@ "Access-Control-Allow-Credentials", "true", "x-ms-last-state-change-utc", - "Thu, 05 Dec 2019 01:23:43.997 GMT", + "Wed, 11 Dec 2019 19:46:09.043 GMT", "lsn", - "64", + "4047", "x-ms-schemaversion", - "1.7", + "1.8", "x-ms-quorum-acked-lsn", - "64", + "4047", "x-ms-current-write-quorum", "1", "x-ms-current-replica-set-size", @@ -41,23 +41,23 @@ "x-ms-number-of-read-regions", "0", "x-ms-transport-request-id", - "150", + "1387", "x-ms-cosmos-llsn", - "64", + "4047", "x-ms-cosmos-quorum-acked-llsn", - "64", + "4047", "x-ms-session-token", - "0:-1#64", + "0:-1#4047", "x-ms-request-charge", "1.24", "x-ms-serviceversion", - "version=2.2.0.0", + "version=2.7.0.0", "x-ms-activity-id", - "5483890c-394b-464f-bcfe-3c916a772917", + "5ab2e7cb-4c72-4a26-941e-15c24138369f", "x-ms-gatewayversion", - "version=2.2.0.0", + "version=2.7.0", "Date", - "Thu, 05 Dec 2019 23:03:51 GMT", + "Thu, 12 Dec 2019 23:26:55 GMT", "Connection", "close" ] diff --git a/libraries/botbuilder-azure/tests/TestData/CosmosDbPartitionedStorage/should_throw_when_writing_null_keys.json b/libraries/botbuilder-azure/tests/TestData/CosmosDbPartitionedStorage - Base Storage Tests/does_not_throw_when_writing_no_items.json similarity index 100% rename from libraries/botbuilder-azure/tests/TestData/CosmosDbPartitionedStorage/should_throw_when_writing_null_keys.json rename to libraries/botbuilder-azure/tests/TestData/CosmosDbPartitionedStorage - Base Storage Tests/does_not_throw_when_writing_no_items.json diff --git a/libraries/botbuilder-azure/tests/TestData/CosmosDbPartitionedStorage/should_handle_crazy_keys.json b/libraries/botbuilder-azure/tests/TestData/CosmosDbPartitionedStorage - Base Storage Tests/handle_crazy_keys.json similarity index 76% rename from libraries/botbuilder-azure/tests/TestData/CosmosDbPartitionedStorage/should_handle_crazy_keys.json rename to libraries/botbuilder-azure/tests/TestData/CosmosDbPartitionedStorage - Base Storage Tests/handle_crazy_keys.json index 73a3b63ecf..9969c981a0 100644 --- a/libraries/botbuilder-azure/tests/TestData/CosmosDbPartitionedStorage/should_handle_crazy_keys.json +++ b/libraries/botbuilder-azure/tests/TestData/CosmosDbPartitionedStorage - Base Storage Tests/handle_crazy_keys.json @@ -17,11 +17,11 @@ "document": { "id": 1 }, - "_rid": "-gMpAKxPACsDAAAAAAAAAA==", - "_self": "dbs/-gMpAA==/colls/-gMpAKxPACs=/docs/-gMpAKxPACsDAAAAAAAAAA==/", - "_etag": "\"00000000-0000-0000-abc0-42af697001d5\"", + "_rid": "gzFFAPwkVIUDAAAAAAAAAA==", + "_self": "dbs/gzFFAA==/colls/gzFFAPwkVIU=/docs/gzFFAPwkVIUDAAAAAAAAAA==/", + "_etag": "\"00000000-0000-0000-b143-a4b5fa0801d5\"", "_attachments": "attachments/", - "_ts": 1575587031 + "_ts": 1576193216 }, "rawHeaders": [ "Cache-Control", @@ -39,23 +39,23 @@ "Access-Control-Allow-Credentials", "true", "x-ms-last-state-change-utc", - "Thu, 05 Dec 2019 01:23:43.997 GMT", + "Wed, 11 Dec 2019 19:46:09.043 GMT", "etag", - "\"00000000-0000-0000-abc0-42af697001d5\"", + "\"00000000-0000-0000-b143-a4b5fa0801d5\"", "x-ms-resource-quota", "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", "x-ms-resource-usage", "documentSize=0;documentsSize=0;documentsCount=2;collectionSize=3;", "lsn", - "54", + "4037", "x-ms-schemaversion", - "1.7", + "1.8", "x-ms-alt-content-path", "dbs/test-db/colls/bot-storage", "x-ms-content-path", - "-gMpAKxPACs=", + "gzFFAPwkVIU=", "x-ms-quorum-acked-lsn", - "53", + "4036", "x-ms-current-write-quorum", "1", "x-ms-current-replica-set-size", @@ -67,23 +67,23 @@ "x-ms-number-of-read-regions", "0", "x-ms-transport-request-id", - "125", + "1361", "x-ms-cosmos-llsn", - "54", + "4037", "x-ms-cosmos-quorum-acked-llsn", - "53", + "4036", "x-ms-session-token", - "0:-1#54", + "0:-1#4037", "x-ms-request-charge", "6.48", "x-ms-serviceversion", - "version=2.2.0.0", + "version=2.7.0.0", "x-ms-activity-id", - "afb105bc-e5e4-4d57-a65c-952920488146", + "0b4de560-782b-404b-9d94-8c117db448e8", "x-ms-gatewayversion", - "version=2.2.0.0", + "version=2.7.0", "Date", - "Thu, 05 Dec 2019 23:03:51 GMT", + "Thu, 12 Dec 2019 23:26:55 GMT", "Connection", "close" ] @@ -100,11 +100,11 @@ "document": { "id": 1 }, - "_rid": "-gMpAKxPACsDAAAAAAAAAA==", - "_self": "dbs/-gMpAA==/colls/-gMpAKxPACs=/docs/-gMpAKxPACsDAAAAAAAAAA==/", - "_etag": "\"00000000-0000-0000-abc0-42af697001d5\"", + "_rid": "gzFFAPwkVIUDAAAAAAAAAA==", + "_self": "dbs/gzFFAA==/colls/gzFFAPwkVIU=/docs/gzFFAPwkVIUDAAAAAAAAAA==/", + "_etag": "\"00000000-0000-0000-b143-a4b5fa0801d5\"", "_attachments": "attachments/", - "_ts": 1575587031 + "_ts": 1576193216 }, "rawHeaders": [ "Cache-Control", @@ -124,23 +124,23 @@ "Access-Control-Allow-Credentials", "true", "x-ms-last-state-change-utc", - "Thu, 05 Dec 2019 01:23:43.997 GMT", + "Wed, 11 Dec 2019 19:46:09.043 GMT", "etag", - "\"00000000-0000-0000-abc0-42af697001d5\"", + "\"00000000-0000-0000-b143-a4b5fa0801d5\"", "x-ms-resource-quota", "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", "x-ms-resource-usage", "documentSize=0;documentsSize=0;documentsCount=3;collectionSize=3;", "lsn", - "54", + "4037", "x-ms-schemaversion", - "1.7", + "1.8", "x-ms-alt-content-path", "dbs/test-db/colls/bot-storage", "x-ms-content-path", - "-gMpAKxPACs=", + "gzFFAPwkVIU=", "x-ms-quorum-acked-lsn", - "54", + "4037", "x-ms-current-write-quorum", "1", "x-ms-current-replica-set-size", @@ -152,27 +152,27 @@ "x-ms-number-of-read-regions", "0", "x-ms-item-lsn", - "54", + "4037", "x-ms-transport-request-id", - "126", + "1362", "x-ms-cosmos-llsn", - "54", + "4037", "x-ms-cosmos-quorum-acked-llsn", - "54", + "4037", "x-ms-cosmos-item-llsn", - "54", + "4037", "x-ms-session-token", - "0:-1#54", + "0:-1#4037", "x-ms-request-charge", "1", "x-ms-serviceversion", - "version=2.2.0.0", + "version=2.7.0.0", "x-ms-activity-id", - "e733eb78-a24e-4768-874e-2af418988554", + "72396dbe-4226-42d3-831b-18e2acdf605a", "x-ms-gatewayversion", - "version=2.2.0.0", + "version=2.7.0", "Date", - "Thu, 05 Dec 2019 23:03:51 GMT", + "Thu, 12 Dec 2019 23:26:55 GMT", "Connection", "close" ] diff --git a/libraries/botbuilder-azure/tests/TestData/CosmosDbPartitionedStorage - Base Storage Tests/performs_batch_operations.json b/libraries/botbuilder-azure/tests/TestData/CosmosDbPartitionedStorage - Base Storage Tests/performs_batch_operations.json new file mode 100644 index 0000000000..6c0469eded --- /dev/null +++ b/libraries/botbuilder-azure/tests/TestData/CosmosDbPartitionedStorage - Base Storage Tests/performs_batch_operations.json @@ -0,0 +1,941 @@ +[ + { + "scope": "https://localhost:8081", + "method": "POST", + "path": "/dbs/test-db/colls/bot-storage/docs", + "body": { + "id": "batch1", + "realId": "batch1", + "document": { + "count": 10 + } + }, + "status": 201, + "response": { + "id": "batch1", + "realId": "batch1", + "document": { + "count": 10 + }, + "_rid": "gzFFAPwkVIUHAAAAAAAAAA==", + "_self": "dbs/gzFFAA==/colls/gzFFAPwkVIU=/docs/gzFFAPwkVIUHAAAAAAAAAA==/", + "_etag": "\"00000000-0000-0000-b143-a4e8915501d5\"", + "_attachments": "attachments/", + "_ts": 1576193216 + }, + "rawHeaders": [ + "Cache-Control", + "no-store, no-cache", + "Pragma", + "no-cache", + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json", + "Server", + "Microsoft-HTTPAPI/2.0", + "Access-Control-Allow-Origin", + "", + "Access-Control-Allow-Credentials", + "true", + "x-ms-last-state-change-utc", + "Wed, 11 Dec 2019 19:46:09.043 GMT", + "etag", + "\"00000000-0000-0000-b143-a4e8915501d5\"", + "x-ms-resource-quota", + "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", + "x-ms-resource-usage", + "documentSize=0;documentsSize=0;documentsCount=5;collectionSize=6;", + "lsn", + "4048", + "x-ms-schemaversion", + "1.8", + "x-ms-alt-content-path", + "dbs/test-db/colls/bot-storage", + "x-ms-content-path", + "gzFFAPwkVIU=", + "x-ms-quorum-acked-lsn", + "4047", + "x-ms-current-write-quorum", + "1", + "x-ms-current-replica-set-size", + "1", + "x-ms-xp-role", + "0", + "x-ms-global-Committed-lsn", + "-1", + "x-ms-number-of-read-regions", + "0", + "x-ms-transport-request-id", + "1388", + "x-ms-cosmos-llsn", + "4048", + "x-ms-cosmos-quorum-acked-llsn", + "4047", + "x-ms-session-token", + "0:-1#4048", + "x-ms-request-charge", + "6.48", + "x-ms-serviceversion", + "version=2.7.0.0", + "x-ms-activity-id", + "b6d62808-a8b1-4024-9bc5-53d285755d32", + "x-ms-gatewayversion", + "version=2.7.0", + "Date", + "Thu, 12 Dec 2019 23:26:55 GMT", + "Connection", + "close" + ] + }, + { + "scope": "https://localhost:8081", + "method": "POST", + "path": "/dbs/test-db/colls/bot-storage/docs", + "body": { + "id": "batch2", + "realId": "batch2", + "document": { + "count": 20 + } + }, + "status": 201, + "response": { + "id": "batch2", + "realId": "batch2", + "document": { + "count": 20 + }, + "_rid": "gzFFAPwkVIUIAAAAAAAAAA==", + "_self": "dbs/gzFFAA==/colls/gzFFAPwkVIU=/docs/gzFFAPwkVIUIAAAAAAAAAA==/", + "_etag": "\"00000000-0000-0000-b143-a4e8e6c601d5\"", + "_attachments": "attachments/", + "_ts": 1576193216 + }, + "rawHeaders": [ + "Cache-Control", + "no-store, no-cache", + "Pragma", + "no-cache", + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json", + "Server", + "Microsoft-HTTPAPI/2.0", + "Access-Control-Allow-Origin", + "", + "Access-Control-Allow-Credentials", + "true", + "x-ms-last-state-change-utc", + "Wed, 11 Dec 2019 19:46:09.043 GMT", + "etag", + "\"00000000-0000-0000-b143-a4e8e6c601d5\"", + "x-ms-resource-quota", + "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", + "x-ms-resource-usage", + "documentSize=0;documentsSize=0;documentsCount=6;collectionSize=7;", + "lsn", + "4049", + "x-ms-schemaversion", + "1.8", + "x-ms-alt-content-path", + "dbs/test-db/colls/bot-storage", + "x-ms-content-path", + "gzFFAPwkVIU=", + "x-ms-quorum-acked-lsn", + "4048", + "x-ms-current-write-quorum", + "1", + "x-ms-current-replica-set-size", + "1", + "x-ms-xp-role", + "0", + "x-ms-global-Committed-lsn", + "-1", + "x-ms-number-of-read-regions", + "0", + "x-ms-transport-request-id", + "1389", + "x-ms-cosmos-llsn", + "4049", + "x-ms-cosmos-quorum-acked-llsn", + "4048", + "x-ms-session-token", + "0:-1#4049", + "x-ms-request-charge", + "6.48", + "x-ms-serviceversion", + "version=2.7.0.0", + "x-ms-activity-id", + "d3988a2e-76b1-4cf9-9770-8514a9d420c3", + "x-ms-gatewayversion", + "version=2.7.0", + "Date", + "Thu, 12 Dec 2019 23:26:55 GMT", + "Connection", + "close" + ] + }, + { + "scope": "https://localhost:8081", + "method": "POST", + "path": "/dbs/test-db/colls/bot-storage/docs", + "body": { + "id": "batch3", + "realId": "batch3", + "document": { + "count": 30 + } + }, + "status": 201, + "response": { + "id": "batch3", + "realId": "batch3", + "document": { + "count": 30 + }, + "_rid": "gzFFAPwkVIUJAAAAAAAAAA==", + "_self": "dbs/gzFFAA==/colls/gzFFAPwkVIU=/docs/gzFFAPwkVIUJAAAAAAAAAA==/", + "_etag": "\"00000000-0000-0000-b143-a4e92fe401d5\"", + "_attachments": "attachments/", + "_ts": 1576193216 + }, + "rawHeaders": [ + "Cache-Control", + "no-store, no-cache", + "Pragma", + "no-cache", + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json", + "Server", + "Microsoft-HTTPAPI/2.0", + "Access-Control-Allow-Origin", + "", + "Access-Control-Allow-Credentials", + "true", + "x-ms-last-state-change-utc", + "Wed, 11 Dec 2019 19:46:09.043 GMT", + "etag", + "\"00000000-0000-0000-b143-a4e92fe401d5\"", + "x-ms-resource-quota", + "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", + "x-ms-resource-usage", + "documentSize=0;documentsSize=0;documentsCount=7;collectionSize=8;", + "lsn", + "4050", + "x-ms-schemaversion", + "1.8", + "x-ms-alt-content-path", + "dbs/test-db/colls/bot-storage", + "x-ms-content-path", + "gzFFAPwkVIU=", + "x-ms-quorum-acked-lsn", + "4049", + "x-ms-current-write-quorum", + "1", + "x-ms-current-replica-set-size", + "1", + "x-ms-xp-role", + "0", + "x-ms-global-Committed-lsn", + "-1", + "x-ms-number-of-read-regions", + "0", + "x-ms-transport-request-id", + "1390", + "x-ms-cosmos-llsn", + "4050", + "x-ms-cosmos-quorum-acked-llsn", + "4049", + "x-ms-session-token", + "0:-1#4050", + "x-ms-request-charge", + "6.48", + "x-ms-serviceversion", + "version=2.7.0.0", + "x-ms-activity-id", + "57b04b3d-4925-4955-863e-7c67a9ee5bad", + "x-ms-gatewayversion", + "version=2.7.0", + "Date", + "Thu, 12 Dec 2019 23:26:55 GMT", + "Connection", + "close" + ] + }, + { + "scope": "https://localhost:8081", + "method": "GET", + "path": "/dbs/test-db/colls/bot-storage/docs/batch1", + "body": "", + "status": 200, + "response": { + "id": "batch1", + "realId": "batch1", + "document": { + "count": 10 + }, + "_rid": "gzFFAPwkVIUHAAAAAAAAAA==", + "_self": "dbs/gzFFAA==/colls/gzFFAPwkVIU=/docs/gzFFAPwkVIUHAAAAAAAAAA==/", + "_etag": "\"00000000-0000-0000-b143-a4e8915501d5\"", + "_attachments": "attachments/", + "_ts": 1576193216 + }, + "rawHeaders": [ + "Cache-Control", + "no-store, no-cache", + "Pragma", + "no-cache", + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json", + "Content-Location", + "https://localhost:8081/dbs/test-db/colls/bot-storage/docs/batch1", + "Server", + "Microsoft-HTTPAPI/2.0", + "Access-Control-Allow-Origin", + "", + "Access-Control-Allow-Credentials", + "true", + "x-ms-last-state-change-utc", + "Wed, 11 Dec 2019 19:46:09.043 GMT", + "etag", + "\"00000000-0000-0000-b143-a4e8915501d5\"", + "x-ms-resource-quota", + "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", + "x-ms-resource-usage", + "documentSize=0;documentsSize=0;documentsCount=8;collectionSize=8;", + "lsn", + "4050", + "x-ms-schemaversion", + "1.8", + "x-ms-alt-content-path", + "dbs/test-db/colls/bot-storage", + "x-ms-content-path", + "gzFFAPwkVIU=", + "x-ms-quorum-acked-lsn", + "4050", + "x-ms-current-write-quorum", + "1", + "x-ms-current-replica-set-size", + "1", + "x-ms-xp-role", + "0", + "x-ms-global-Committed-lsn", + "-1", + "x-ms-number-of-read-regions", + "0", + "x-ms-item-lsn", + "4048", + "x-ms-transport-request-id", + "1391", + "x-ms-cosmos-llsn", + "4050", + "x-ms-cosmos-quorum-acked-llsn", + "4050", + "x-ms-cosmos-item-llsn", + "4048", + "x-ms-session-token", + "0:-1#4050", + "x-ms-request-charge", + "1", + "x-ms-serviceversion", + "version=2.7.0.0", + "x-ms-activity-id", + "358f5dbb-10da-427b-94cf-05971e68c8ec", + "x-ms-gatewayversion", + "version=2.7.0", + "Date", + "Thu, 12 Dec 2019 23:26:55 GMT", + "Connection", + "close" + ] + }, + { + "scope": "https://localhost:8081", + "method": "GET", + "path": "/dbs/test-db/colls/bot-storage/docs/batch2", + "body": "", + "status": 200, + "response": { + "id": "batch2", + "realId": "batch2", + "document": { + "count": 20 + }, + "_rid": "gzFFAPwkVIUIAAAAAAAAAA==", + "_self": "dbs/gzFFAA==/colls/gzFFAPwkVIU=/docs/gzFFAPwkVIUIAAAAAAAAAA==/", + "_etag": "\"00000000-0000-0000-b143-a4e8e6c601d5\"", + "_attachments": "attachments/", + "_ts": 1576193216 + }, + "rawHeaders": [ + "Cache-Control", + "no-store, no-cache", + "Pragma", + "no-cache", + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json", + "Content-Location", + "https://localhost:8081/dbs/test-db/colls/bot-storage/docs/batch2", + "Server", + "Microsoft-HTTPAPI/2.0", + "Access-Control-Allow-Origin", + "", + "Access-Control-Allow-Credentials", + "true", + "x-ms-last-state-change-utc", + "Wed, 11 Dec 2019 19:46:09.043 GMT", + "etag", + "\"00000000-0000-0000-b143-a4e8e6c601d5\"", + "x-ms-resource-quota", + "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", + "x-ms-resource-usage", + "documentSize=0;documentsSize=0;documentsCount=8;collectionSize=8;", + "lsn", + "4050", + "x-ms-schemaversion", + "1.8", + "x-ms-alt-content-path", + "dbs/test-db/colls/bot-storage", + "x-ms-content-path", + "gzFFAPwkVIU=", + "x-ms-quorum-acked-lsn", + "4050", + "x-ms-current-write-quorum", + "1", + "x-ms-current-replica-set-size", + "1", + "x-ms-xp-role", + "0", + "x-ms-global-Committed-lsn", + "-1", + "x-ms-number-of-read-regions", + "0", + "x-ms-item-lsn", + "4049", + "x-ms-transport-request-id", + "1392", + "x-ms-cosmos-llsn", + "4050", + "x-ms-cosmos-quorum-acked-llsn", + "4050", + "x-ms-cosmos-item-llsn", + "4049", + "x-ms-session-token", + "0:-1#4050", + "x-ms-request-charge", + "1", + "x-ms-serviceversion", + "version=2.7.0.0", + "x-ms-activity-id", + "724a7e4a-94bf-4c3b-9387-9864e2c8d199", + "x-ms-gatewayversion", + "version=2.7.0", + "Date", + "Thu, 12 Dec 2019 23:26:55 GMT", + "Connection", + "close" + ] + }, + { + "scope": "https://localhost:8081", + "method": "GET", + "path": "/dbs/test-db/colls/bot-storage/docs/batch3", + "body": "", + "status": 200, + "response": { + "id": "batch3", + "realId": "batch3", + "document": { + "count": 30 + }, + "_rid": "gzFFAPwkVIUJAAAAAAAAAA==", + "_self": "dbs/gzFFAA==/colls/gzFFAPwkVIU=/docs/gzFFAPwkVIUJAAAAAAAAAA==/", + "_etag": "\"00000000-0000-0000-b143-a4e92fe401d5\"", + "_attachments": "attachments/", + "_ts": 1576193216 + }, + "rawHeaders": [ + "Cache-Control", + "no-store, no-cache", + "Pragma", + "no-cache", + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json", + "Content-Location", + "https://localhost:8081/dbs/test-db/colls/bot-storage/docs/batch3", + "Server", + "Microsoft-HTTPAPI/2.0", + "Access-Control-Allow-Origin", + "", + "Access-Control-Allow-Credentials", + "true", + "x-ms-last-state-change-utc", + "Wed, 11 Dec 2019 19:46:09.043 GMT", + "etag", + "\"00000000-0000-0000-b143-a4e92fe401d5\"", + "x-ms-resource-quota", + "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", + "x-ms-resource-usage", + "documentSize=0;documentsSize=0;documentsCount=8;collectionSize=8;", + "lsn", + "4050", + "x-ms-schemaversion", + "1.8", + "x-ms-alt-content-path", + "dbs/test-db/colls/bot-storage", + "x-ms-content-path", + "gzFFAPwkVIU=", + "x-ms-quorum-acked-lsn", + "4050", + "x-ms-current-write-quorum", + "1", + "x-ms-current-replica-set-size", + "1", + "x-ms-xp-role", + "0", + "x-ms-global-Committed-lsn", + "-1", + "x-ms-number-of-read-regions", + "0", + "x-ms-item-lsn", + "4050", + "x-ms-transport-request-id", + "1393", + "x-ms-cosmos-llsn", + "4050", + "x-ms-cosmos-quorum-acked-llsn", + "4050", + "x-ms-cosmos-item-llsn", + "4050", + "x-ms-session-token", + "0:-1#4050", + "x-ms-request-charge", + "1", + "x-ms-serviceversion", + "version=2.7.0.0", + "x-ms-activity-id", + "e758797a-2d2b-4d66-806c-efb459df1193", + "x-ms-gatewayversion", + "version=2.7.0", + "Date", + "Thu, 12 Dec 2019 23:26:55 GMT", + "Connection", + "close" + ] + }, + { + "scope": "https://localhost:8081", + "method": "DELETE", + "path": "/dbs/test-db/colls/bot-storage/docs/batch1", + "body": "", + "status": 204, + "response": "", + "rawHeaders": [ + "Cache-Control", + "no-store, no-cache", + "Pragma", + "no-cache", + "Content-Length", + "0", + "Content-Type", + "application/json", + "Content-Location", + "https://localhost:8081/dbs/test-db/colls/bot-storage/docs/batch1", + "Server", + "Microsoft-HTTPAPI/2.0", + "Access-Control-Allow-Origin", + "", + "Access-Control-Allow-Credentials", + "true", + "x-ms-last-state-change-utc", + "Wed, 11 Dec 2019 19:46:09.043 GMT", + "x-ms-resource-quota", + "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", + "x-ms-resource-usage", + "documentSize=0;documentsSize=0;documentsCount=8;collectionSize=7;", + "lsn", + "4051", + "x-ms-schemaversion", + "1.8", + "x-ms-alt-content-path", + "dbs/test-db/colls/bot-storage", + "x-ms-content-path", + "gzFFAPwkVIU=", + "x-ms-quorum-acked-lsn", + "4050", + "x-ms-current-write-quorum", + "1", + "x-ms-current-replica-set-size", + "1", + "x-ms-xp-role", + "0", + "x-ms-global-Committed-lsn", + "-1", + "x-ms-number-of-read-regions", + "0", + "x-ms-transport-request-id", + "1394", + "x-ms-cosmos-llsn", + "4051", + "x-ms-cosmos-quorum-acked-llsn", + "4050", + "x-ms-session-token", + "0:-1#4051", + "x-ms-request-charge", + "6.48", + "x-ms-serviceversion", + "version=2.7.0.0", + "x-ms-activity-id", + "4f8289bc-0573-45a0-9405-b4a313fbec8b", + "x-ms-gatewayversion", + "version=2.7.0", + "Date", + "Thu, 12 Dec 2019 23:26:55 GMT", + "Connection", + "close" + ] + }, + { + "scope": "https://localhost:8081", + "method": "DELETE", + "path": "/dbs/test-db/colls/bot-storage/docs/batch2", + "body": "", + "status": 204, + "response": "", + "rawHeaders": [ + "Cache-Control", + "no-store, no-cache", + "Pragma", + "no-cache", + "Content-Length", + "0", + "Content-Type", + "application/json", + "Content-Location", + "https://localhost:8081/dbs/test-db/colls/bot-storage/docs/batch2", + "Server", + "Microsoft-HTTPAPI/2.0", + "Access-Control-Allow-Origin", + "", + "Access-Control-Allow-Credentials", + "true", + "x-ms-last-state-change-utc", + "Wed, 11 Dec 2019 19:46:09.043 GMT", + "x-ms-resource-quota", + "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", + "x-ms-resource-usage", + "documentSize=0;documentsSize=0;documentsCount=7;collectionSize=6;", + "lsn", + "4052", + "x-ms-schemaversion", + "1.8", + "x-ms-alt-content-path", + "dbs/test-db/colls/bot-storage", + "x-ms-content-path", + "gzFFAPwkVIU=", + "x-ms-quorum-acked-lsn", + "4051", + "x-ms-current-write-quorum", + "1", + "x-ms-current-replica-set-size", + "1", + "x-ms-xp-role", + "0", + "x-ms-global-Committed-lsn", + "-1", + "x-ms-number-of-read-regions", + "0", + "x-ms-transport-request-id", + "1395", + "x-ms-cosmos-llsn", + "4052", + "x-ms-cosmos-quorum-acked-llsn", + "4051", + "x-ms-session-token", + "0:-1#4052", + "x-ms-request-charge", + "6.48", + "x-ms-serviceversion", + "version=2.7.0.0", + "x-ms-activity-id", + "3b367b6d-742c-4cc5-82b7-d7d8d868215b", + "x-ms-gatewayversion", + "version=2.7.0", + "Date", + "Thu, 12 Dec 2019 23:26:55 GMT", + "Connection", + "close" + ] + }, + { + "scope": "https://localhost:8081", + "method": "DELETE", + "path": "/dbs/test-db/colls/bot-storage/docs/batch3", + "body": "", + "status": 204, + "response": "", + "rawHeaders": [ + "Cache-Control", + "no-store, no-cache", + "Pragma", + "no-cache", + "Content-Length", + "0", + "Content-Type", + "application/json", + "Content-Location", + "https://localhost:8081/dbs/test-db/colls/bot-storage/docs/batch3", + "Server", + "Microsoft-HTTPAPI/2.0", + "Access-Control-Allow-Origin", + "", + "Access-Control-Allow-Credentials", + "true", + "x-ms-last-state-change-utc", + "Wed, 11 Dec 2019 19:46:09.043 GMT", + "x-ms-resource-quota", + "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", + "x-ms-resource-usage", + "documentSize=0;documentsSize=0;documentsCount=6;collectionSize=5;", + "lsn", + "4053", + "x-ms-schemaversion", + "1.8", + "x-ms-alt-content-path", + "dbs/test-db/colls/bot-storage", + "x-ms-content-path", + "gzFFAPwkVIU=", + "x-ms-quorum-acked-lsn", + "4052", + "x-ms-current-write-quorum", + "1", + "x-ms-current-replica-set-size", + "1", + "x-ms-xp-role", + "0", + "x-ms-global-Committed-lsn", + "-1", + "x-ms-number-of-read-regions", + "0", + "x-ms-transport-request-id", + "1396", + "x-ms-cosmos-llsn", + "4053", + "x-ms-cosmos-quorum-acked-llsn", + "4052", + "x-ms-session-token", + "0:-1#4053", + "x-ms-request-charge", + "6.48", + "x-ms-serviceversion", + "version=2.7.0.0", + "x-ms-activity-id", + "490c4db3-7b23-4e51-a263-409f417aead1", + "x-ms-gatewayversion", + "version=2.7.0", + "Date", + "Thu, 12 Dec 2019 23:26:55 GMT", + "Connection", + "close" + ] + }, + { + "scope": "https://localhost:8081", + "method": "GET", + "path": "/dbs/test-db/colls/bot-storage/docs/batch1", + "body": "", + "status": 404, + "response": { + "code": "NotFound", + "message": "Message: {\"Errors\":[\"Resource Not Found\"]}\r\nActivityId: 99fa6807-23f4-45ab-9955-b86597963f53, Request URI: /apps/DocDbApp/services/DocDbServer7/partitions/a4cb4953-38c8-11e6-8106-8cdcd42c33be/replicas/1p/, RequestStats: \r\nRequestStartTime: 2019-12-12T23:26:56.5886669Z, RequestEndTime: 2019-12-12T23:26:56.5906597Z, Number of regions attempted:1\r\nResponseTime: 2019-12-12T23:26:56.5906597Z, StoreResult: StorePhysicalAddress: rntbd://127.0.0.1:10253/apps/DocDbApp/services/DocDbServer7/partitions/a4cb4953-38c8-11e6-8106-8cdcd42c33be/replicas/1p/, LSN: 4053, GlobalCommittedLsn: -1, PartitionKeyRangeId: 0, IsValid: True, StatusCode: 404, SubStatusCode: 0, RequestCharge: 1, ItemLSN: -1, SessionToken: -1#4053, UsingLocalLSN: True, TransportException: null, ResourceType: Document, OperationType: Read\r\n, SDK: Microsoft.Azure.Documents.Common/2.7.0" + }, + "rawHeaders": [ + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json", + "Content-Location", + "https://localhost:8081/dbs/test-db/colls/bot-storage/docs/batch1", + "Server", + "Microsoft-HTTPAPI/2.0", + "Access-Control-Allow-Origin", + "", + "Access-Control-Allow-Credentials", + "true", + "x-ms-last-state-change-utc", + "Wed, 11 Dec 2019 19:46:09.043 GMT", + "lsn", + "4053", + "x-ms-schemaversion", + "1.8", + "x-ms-quorum-acked-lsn", + "4053", + "x-ms-current-write-quorum", + "1", + "x-ms-current-replica-set-size", + "1", + "x-ms-xp-role", + "0", + "x-ms-global-Committed-lsn", + "-1", + "x-ms-number-of-read-regions", + "0", + "x-ms-transport-request-id", + "1397", + "x-ms-cosmos-llsn", + "4053", + "x-ms-cosmos-quorum-acked-llsn", + "4053", + "x-ms-session-token", + "0:-1#4053", + "x-ms-request-charge", + "1", + "x-ms-serviceversion", + "version=2.7.0.0", + "x-ms-activity-id", + "99fa6807-23f4-45ab-9955-b86597963f53", + "x-ms-gatewayversion", + "version=2.7.0", + "Date", + "Thu, 12 Dec 2019 23:26:56 GMT", + "Connection", + "close" + ] + }, + { + "scope": "https://localhost:8081", + "method": "GET", + "path": "/dbs/test-db/colls/bot-storage/docs/batch2", + "body": "", + "status": 404, + "response": { + "code": "NotFound", + "message": "Message: {\"Errors\":[\"Resource Not Found\"]}\r\nActivityId: 6db86594-106f-4992-b5cb-ccdf727f53c5, Request URI: /apps/DocDbApp/services/DocDbServer7/partitions/a4cb4953-38c8-11e6-8106-8cdcd42c33be/replicas/1p/, RequestStats: \r\nRequestStartTime: 2019-12-12T23:26:56.5886669Z, RequestEndTime: 2019-12-12T23:26:56.5906597Z, Number of regions attempted:1\r\nResponseTime: 2019-12-12T23:26:56.5906597Z, StoreResult: StorePhysicalAddress: rntbd://127.0.0.1:10253/apps/DocDbApp/services/DocDbServer7/partitions/a4cb4953-38c8-11e6-8106-8cdcd42c33be/replicas/1p/, LSN: 4053, GlobalCommittedLsn: -1, PartitionKeyRangeId: 0, IsValid: True, StatusCode: 404, SubStatusCode: 0, RequestCharge: 1, ItemLSN: -1, SessionToken: -1#4053, UsingLocalLSN: True, TransportException: null, ResourceType: Document, OperationType: Read\r\n, SDK: Microsoft.Azure.Documents.Common/2.7.0" + }, + "rawHeaders": [ + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json", + "Content-Location", + "https://localhost:8081/dbs/test-db/colls/bot-storage/docs/batch2", + "Server", + "Microsoft-HTTPAPI/2.0", + "Access-Control-Allow-Origin", + "", + "Access-Control-Allow-Credentials", + "true", + "x-ms-last-state-change-utc", + "Wed, 11 Dec 2019 19:46:09.043 GMT", + "lsn", + "4053", + "x-ms-schemaversion", + "1.8", + "x-ms-quorum-acked-lsn", + "4053", + "x-ms-current-write-quorum", + "1", + "x-ms-current-replica-set-size", + "1", + "x-ms-xp-role", + "0", + "x-ms-global-Committed-lsn", + "-1", + "x-ms-number-of-read-regions", + "0", + "x-ms-transport-request-id", + "1398", + "x-ms-cosmos-llsn", + "4053", + "x-ms-cosmos-quorum-acked-llsn", + "4053", + "x-ms-session-token", + "0:-1#4053", + "x-ms-request-charge", + "1", + "x-ms-serviceversion", + "version=2.7.0.0", + "x-ms-activity-id", + "6db86594-106f-4992-b5cb-ccdf727f53c5", + "x-ms-gatewayversion", + "version=2.7.0", + "Date", + "Thu, 12 Dec 2019 23:26:56 GMT", + "Connection", + "close" + ] + }, + { + "scope": "https://localhost:8081", + "method": "GET", + "path": "/dbs/test-db/colls/bot-storage/docs/batch3", + "body": "", + "status": 404, + "response": { + "code": "NotFound", + "message": "Message: {\"Errors\":[\"Resource Not Found\"]}\r\nActivityId: 5cb7ab2e-e7ba-466c-b73b-79dd56ebf052, Request URI: /apps/DocDbApp/services/DocDbServer7/partitions/a4cb4953-38c8-11e6-8106-8cdcd42c33be/replicas/1p/, RequestStats: \r\nRequestStartTime: 2019-12-12T23:26:56.5896605Z, RequestEndTime: 2019-12-12T23:26:56.5916598Z, Number of regions attempted:1\r\nResponseTime: 2019-12-12T23:26:56.5916598Z, StoreResult: StorePhysicalAddress: rntbd://127.0.0.1:10253/apps/DocDbApp/services/DocDbServer7/partitions/a4cb4953-38c8-11e6-8106-8cdcd42c33be/replicas/1p/, LSN: 4053, GlobalCommittedLsn: -1, PartitionKeyRangeId: 0, IsValid: True, StatusCode: 404, SubStatusCode: 0, RequestCharge: 1, ItemLSN: -1, SessionToken: -1#4053, UsingLocalLSN: True, TransportException: null, ResourceType: Document, OperationType: Read\r\n, SDK: Microsoft.Azure.Documents.Common/2.7.0" + }, + "rawHeaders": [ + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json", + "Content-Location", + "https://localhost:8081/dbs/test-db/colls/bot-storage/docs/batch3", + "Server", + "Microsoft-HTTPAPI/2.0", + "Access-Control-Allow-Origin", + "", + "Access-Control-Allow-Credentials", + "true", + "x-ms-last-state-change-utc", + "Wed, 11 Dec 2019 19:46:09.043 GMT", + "lsn", + "4053", + "x-ms-schemaversion", + "1.8", + "x-ms-quorum-acked-lsn", + "4053", + "x-ms-current-write-quorum", + "1", + "x-ms-current-replica-set-size", + "1", + "x-ms-xp-role", + "0", + "x-ms-global-Committed-lsn", + "-1", + "x-ms-number-of-read-regions", + "0", + "x-ms-transport-request-id", + "1399", + "x-ms-cosmos-llsn", + "4053", + "x-ms-cosmos-quorum-acked-llsn", + "4053", + "x-ms-session-token", + "0:-1#4053", + "x-ms-request-charge", + "1", + "x-ms-serviceversion", + "version=2.7.0.0", + "x-ms-activity-id", + "5cb7ab2e-e7ba-466c-b73b-79dd56ebf052", + "x-ms-gatewayversion", + "version=2.7.0", + "Date", + "Thu, 12 Dec 2019 23:26:56 GMT", + "Connection", + "close" + ] + } +] \ No newline at end of file diff --git a/libraries/botbuilder-azure/tests/TestData/CosmosDbPartitionedStorage/should_correctly_proceed_through_a_waterfall_dialog.json b/libraries/botbuilder-azure/tests/TestData/CosmosDbPartitionedStorage - Base Storage Tests/proceeds_through_a_waterfall_dialog.json similarity index 81% rename from libraries/botbuilder-azure/tests/TestData/CosmosDbPartitionedStorage/should_correctly_proceed_through_a_waterfall_dialog.json rename to libraries/botbuilder-azure/tests/TestData/CosmosDbPartitionedStorage - Base Storage Tests/proceeds_through_a_waterfall_dialog.json index 12aec6b9b9..5d74f96e06 100644 --- a/libraries/botbuilder-azure/tests/TestData/CosmosDbPartitionedStorage/should_correctly_proceed_through_a_waterfall_dialog.json +++ b/libraries/botbuilder-azure/tests/TestData/CosmosDbPartitionedStorage - Base Storage Tests/proceeds_through_a_waterfall_dialog.json @@ -7,7 +7,7 @@ "status": 404, "response": { "code": "NotFound", - "message": "Message: {\"Errors\":[\"Resource Not Found\"]}\r\nActivityId: 6cca9567-6091-4183-a485-10391a873449, Request URI: /apps/DocDbApp/services/DocDbServer1/partitions/a4cb494d-38c8-11e6-8106-8cdcd42c33be/replicas/1p/, RequestStats: \r\nRequestStartTime: 2019-12-05T23:03:52.0807883Z, RequestEndTime: 2019-12-05T23:03:52.0817880Z, Number of regions attempted: 1\r\nResponseTime: 2019-12-05T23:03:52.0817880Z, StoreResult: StorePhysicalAddress: rntbd://127.0.0.1:10253/apps/DocDbApp/services/DocDbServer1/partitions/a4cb494d-38c8-11e6-8106-8cdcd42c33be/replicas/1p/, LSN: 64, GlobalCommittedLsn: -1, PartitionKeyRangeId: 0, IsValid: True, StatusCode: 404, SubStatusCode: 0, RequestCharge: 1, ItemLSN: -1, SessionToken: -1#64, UsingLocalLSN: True, TransportException: null, ResourceType: Document, OperationType: Read\r\n, SDK: Microsoft.Azure.Documents.Common/2.2.0.0" + "message": "Message: {\"Errors\":[\"Resource Not Found\"]}\r\nActivityId: fbf1eef8-81a3-4aaf-b719-638cdf34e5c8, Request URI: /apps/DocDbApp/services/DocDbServer7/partitions/a4cb4953-38c8-11e6-8106-8cdcd42c33be/replicas/1p/, RequestStats: \r\nRequestStartTime: 2019-12-12T23:26:56.6176577Z, RequestEndTime: 2019-12-12T23:26:56.6186570Z, Number of regions attempted:1\r\nResponseTime: 2019-12-12T23:26:56.6186570Z, StoreResult: StorePhysicalAddress: rntbd://127.0.0.1:10253/apps/DocDbApp/services/DocDbServer7/partitions/a4cb4953-38c8-11e6-8106-8cdcd42c33be/replicas/1p/, LSN: 4053, GlobalCommittedLsn: -1, PartitionKeyRangeId: 0, IsValid: True, StatusCode: 404, SubStatusCode: 0, RequestCharge: 1, ItemLSN: -1, SessionToken: -1#4053, UsingLocalLSN: True, TransportException: null, ResourceType: Document, OperationType: Read\r\n, SDK: Microsoft.Azure.Documents.Common/2.7.0" }, "rawHeaders": [ "Transfer-Encoding", @@ -23,13 +23,13 @@ "Access-Control-Allow-Credentials", "true", "x-ms-last-state-change-utc", - "Thu, 05 Dec 2019 01:23:43.997 GMT", + "Wed, 11 Dec 2019 19:46:09.043 GMT", "lsn", - "64", + "4053", "x-ms-schemaversion", - "1.7", + "1.8", "x-ms-quorum-acked-lsn", - "64", + "4053", "x-ms-current-write-quorum", "1", "x-ms-current-replica-set-size", @@ -41,23 +41,23 @@ "x-ms-number-of-read-regions", "0", "x-ms-transport-request-id", - "151", + "1400", "x-ms-cosmos-llsn", - "64", + "4053", "x-ms-cosmos-quorum-acked-llsn", - "64", + "4053", "x-ms-session-token", - "0:-1#64", + "0:-1#4053", "x-ms-request-charge", "1", "x-ms-serviceversion", - "version=2.2.0.0", + "version=2.7.0.0", "x-ms-activity-id", - "6cca9567-6091-4183-a485-10391a873449", + "fbf1eef8-81a3-4aaf-b719-638cdf34e5c8", "x-ms-gatewayversion", - "version=2.2.0.0", + "version=2.7.0", "Date", - "Thu, 05 Dec 2019 23:03:51 GMT", + "Thu, 12 Dec 2019 23:26:56 GMT", "Connection", "close" ] @@ -98,7 +98,7 @@ "state": { "options": {}, "values": { - "instanceId": "60d9f97a-1f8f-5603-5304-e9b584180411" + "instanceId": "df5b617f-ba9b-d857-e266-d2977274ef17" }, "stepIndex": 0 } @@ -106,11 +106,11 @@ ] } }, - "_rid": "-gMpAKxPACsHAAAAAAAAAA==", - "_self": "dbs/-gMpAA==/colls/-gMpAKxPACs=/docs/-gMpAKxPACsHAAAAAAAAAA==/", - "_etag": "\"00000000-0000-0000-abc0-42d9b44e01d5\"", + "_rid": "gzFFAPwkVIUKAAAAAAAAAA==", + "_self": "dbs/gzFFAA==/colls/gzFFAPwkVIU=/docs/gzFFAPwkVIUKAAAAAAAAAA==/", + "_etag": "\"00000000-0000-0000-b143-a4fd856401d5\"", "_attachments": "attachments/", - "_ts": 1575587032 + "_ts": 1576193216 }, "rawHeaders": [ "Cache-Control", @@ -128,23 +128,23 @@ "Access-Control-Allow-Credentials", "true", "x-ms-last-state-change-utc", - "Thu, 05 Dec 2019 01:23:43.997 GMT", + "Wed, 11 Dec 2019 19:46:09.043 GMT", "etag", - "\"00000000-0000-0000-abc0-42d9b44e01d5\"", + "\"00000000-0000-0000-b143-a4fd856401d5\"", "x-ms-resource-quota", "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", "x-ms-resource-usage", "documentSize=0;documentsSize=0;documentsCount=5;collectionSize=6;", "lsn", - "65", + "4054", "x-ms-schemaversion", - "1.7", + "1.8", "x-ms-alt-content-path", "dbs/test-db/colls/bot-storage", "x-ms-content-path", - "-gMpAKxPACs=", + "gzFFAPwkVIU=", "x-ms-quorum-acked-lsn", - "64", + "4053", "x-ms-current-write-quorum", "1", "x-ms-current-replica-set-size", @@ -156,23 +156,23 @@ "x-ms-number-of-read-regions", "0", "x-ms-transport-request-id", - "152", + "1401", "x-ms-cosmos-llsn", - "65", + "4054", "x-ms-cosmos-quorum-acked-llsn", - "64", + "4053", "x-ms-session-token", - "0:-1#65", + "0:-1#4054", "x-ms-request-charge", "8.38", "x-ms-serviceversion", - "version=2.2.0.0", + "version=2.7.0.0", "x-ms-activity-id", - "615d04f2-88f8-4e4a-a6c9-56b34cf6ced7", + "e97e60b5-e155-4ba3-8eac-3ec68ad698c5", "x-ms-gatewayversion", - "version=2.2.0.0", + "version=2.7.0", "Date", - "Thu, 05 Dec 2019 23:03:51 GMT", + "Thu, 12 Dec 2019 23:26:56 GMT", "Connection", "close" ] @@ -194,7 +194,7 @@ "state": { "options": {}, "values": { - "instanceId": "60d9f97a-1f8f-5603-5304-e9b584180411" + "instanceId": "df5b617f-ba9b-d857-e266-d2977274ef17" }, "stepIndex": 0 } @@ -202,11 +202,11 @@ ] } }, - "_rid": "-gMpAKxPACsHAAAAAAAAAA==", - "_self": "dbs/-gMpAA==/colls/-gMpAKxPACs=/docs/-gMpAKxPACsHAAAAAAAAAA==/", - "_etag": "\"00000000-0000-0000-abc0-42d9b44e01d5\"", + "_rid": "gzFFAPwkVIUKAAAAAAAAAA==", + "_self": "dbs/gzFFAA==/colls/gzFFAPwkVIU=/docs/gzFFAPwkVIUKAAAAAAAAAA==/", + "_etag": "\"00000000-0000-0000-b143-a4fd856401d5\"", "_attachments": "attachments/", - "_ts": 1575587032 + "_ts": 1576193216 }, "rawHeaders": [ "Cache-Control", @@ -226,23 +226,23 @@ "Access-Control-Allow-Credentials", "true", "x-ms-last-state-change-utc", - "Thu, 05 Dec 2019 01:23:43.997 GMT", + "Wed, 11 Dec 2019 19:46:09.043 GMT", "etag", - "\"00000000-0000-0000-abc0-42d9b44e01d5\"", + "\"00000000-0000-0000-b143-a4fd856401d5\"", "x-ms-resource-quota", "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", "x-ms-resource-usage", "documentSize=0;documentsSize=0;documentsCount=6;collectionSize=6;", "lsn", - "65", + "4054", "x-ms-schemaversion", - "1.7", + "1.8", "x-ms-alt-content-path", "dbs/test-db/colls/bot-storage", "x-ms-content-path", - "-gMpAKxPACs=", + "gzFFAPwkVIU=", "x-ms-quorum-acked-lsn", - "65", + "4054", "x-ms-current-write-quorum", "1", "x-ms-current-replica-set-size", @@ -254,27 +254,27 @@ "x-ms-number-of-read-regions", "0", "x-ms-item-lsn", - "65", + "4054", "x-ms-transport-request-id", - "153", + "1402", "x-ms-cosmos-llsn", - "65", + "4054", "x-ms-cosmos-quorum-acked-llsn", - "65", + "4054", "x-ms-cosmos-item-llsn", - "65", + "4054", "x-ms-session-token", - "0:-1#65", + "0:-1#4054", "x-ms-request-charge", "1", "x-ms-serviceversion", - "version=2.2.0.0", + "version=2.7.0.0", "x-ms-activity-id", - "6d0e1d55-df9b-4aac-9814-a40f80bb4608", + "1f6bb54b-fce3-4315-ab5f-c9aa7387ed1a", "x-ms-gatewayversion", - "version=2.2.0.0", + "version=2.7.0", "Date", - "Thu, 05 Dec 2019 23:03:51 GMT", + "Thu, 12 Dec 2019 23:26:56 GMT", "Connection", "close" ] @@ -328,7 +328,7 @@ "state": { "options": {}, "values": { - "instanceId": "60d9f97a-1f8f-5603-5304-e9b584180411" + "instanceId": "df5b617f-ba9b-d857-e266-d2977274ef17" }, "stepIndex": 1 } @@ -349,11 +349,11 @@ ] } }, - "_rid": "-gMpAKxPACsHAAAAAAAAAA==", - "_self": "dbs/-gMpAA==/colls/-gMpAKxPACs=/docs/-gMpAKxPACsHAAAAAAAAAA==/", - "_etag": "\"00000000-0000-0000-abc0-42dcb04801d5\"", + "_rid": "gzFFAPwkVIUKAAAAAAAAAA==", + "_self": "dbs/gzFFAA==/colls/gzFFAPwkVIU=/docs/gzFFAPwkVIUKAAAAAAAAAA==/", + "_etag": "\"00000000-0000-0000-b143-a50446d901d5\"", "_attachments": "attachments/", - "_ts": 1575587032 + "_ts": 1576193216 }, "rawHeaders": [ "Cache-Control", @@ -371,23 +371,23 @@ "Access-Control-Allow-Credentials", "true", "x-ms-last-state-change-utc", - "Thu, 05 Dec 2019 01:23:43.997 GMT", + "Wed, 11 Dec 2019 19:46:09.043 GMT", "etag", - "\"00000000-0000-0000-abc0-42dcb04801d5\"", + "\"00000000-0000-0000-b143-a50446d901d5\"", "x-ms-resource-quota", "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", "x-ms-resource-usage", "documentSize=0;documentsSize=0;documentsCount=6;collectionSize=6;", "lsn", - "66", + "4055", "x-ms-schemaversion", - "1.7", + "1.8", "x-ms-alt-content-path", "dbs/test-db/colls/bot-storage", "x-ms-content-path", - "-gMpAKxPACs=", + "gzFFAPwkVIU=", "x-ms-quorum-acked-lsn", - "65", + "4054", "x-ms-current-write-quorum", "1", "x-ms-current-replica-set-size", @@ -399,23 +399,23 @@ "x-ms-number-of-read-regions", "0", "x-ms-transport-request-id", - "154", + "1403", "x-ms-cosmos-llsn", - "66", + "4055", "x-ms-cosmos-quorum-acked-llsn", - "65", + "4054", "x-ms-session-token", - "0:-1#66", + "0:-1#4055", "x-ms-request-charge", "12.38", "x-ms-serviceversion", - "version=2.2.0.0", + "version=2.7.0.0", "x-ms-activity-id", - "e8975fd7-f429-460c-9797-6ebf97b1d49e", + "e1b076c9-6e57-4b2a-a95d-3090faa6e65c", "x-ms-gatewayversion", - "version=2.2.0.0", + "version=2.7.0", "Date", - "Thu, 05 Dec 2019 23:03:51 GMT", + "Thu, 12 Dec 2019 23:26:56 GMT", "Connection", "close" ] @@ -437,7 +437,7 @@ "state": { "options": {}, "values": { - "instanceId": "60d9f97a-1f8f-5603-5304-e9b584180411" + "instanceId": "df5b617f-ba9b-d857-e266-d2977274ef17" }, "stepIndex": 1 } @@ -458,11 +458,11 @@ ] } }, - "_rid": "-gMpAKxPACsHAAAAAAAAAA==", - "_self": "dbs/-gMpAA==/colls/-gMpAKxPACs=/docs/-gMpAKxPACsHAAAAAAAAAA==/", - "_etag": "\"00000000-0000-0000-abc0-42dcb04801d5\"", + "_rid": "gzFFAPwkVIUKAAAAAAAAAA==", + "_self": "dbs/gzFFAA==/colls/gzFFAPwkVIU=/docs/gzFFAPwkVIUKAAAAAAAAAA==/", + "_etag": "\"00000000-0000-0000-b143-a50446d901d5\"", "_attachments": "attachments/", - "_ts": 1575587032 + "_ts": 1576193216 }, "rawHeaders": [ "Cache-Control", @@ -482,23 +482,23 @@ "Access-Control-Allow-Credentials", "true", "x-ms-last-state-change-utc", - "Thu, 05 Dec 2019 01:23:43.997 GMT", + "Wed, 11 Dec 2019 19:46:09.043 GMT", "etag", - "\"00000000-0000-0000-abc0-42dcb04801d5\"", + "\"00000000-0000-0000-b143-a50446d901d5\"", "x-ms-resource-quota", "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", "x-ms-resource-usage", "documentSize=0;documentsSize=0;documentsCount=6;collectionSize=6;", "lsn", - "66", + "4055", "x-ms-schemaversion", - "1.7", + "1.8", "x-ms-alt-content-path", "dbs/test-db/colls/bot-storage", "x-ms-content-path", - "-gMpAKxPACs=", + "gzFFAPwkVIU=", "x-ms-quorum-acked-lsn", - "66", + "4055", "x-ms-current-write-quorum", "1", "x-ms-current-replica-set-size", @@ -510,27 +510,27 @@ "x-ms-number-of-read-regions", "0", "x-ms-item-lsn", - "66", + "4055", "x-ms-transport-request-id", - "155", + "1404", "x-ms-cosmos-llsn", - "66", + "4055", "x-ms-cosmos-quorum-acked-llsn", - "66", + "4055", "x-ms-cosmos-item-llsn", - "66", + "4055", "x-ms-session-token", - "0:-1#66", + "0:-1#4055", "x-ms-request-charge", "1", "x-ms-serviceversion", - "version=2.2.0.0", + "version=2.7.0.0", "x-ms-activity-id", - "e9ba0976-3097-48e7-b2ec-3603987353f7", + "ae2cd715-0e6b-4bd6-93c8-15e04abfc5fe", "x-ms-gatewayversion", - "version=2.2.0.0", + "version=2.7.0", "Date", - "Thu, 05 Dec 2019 23:03:51 GMT", + "Thu, 12 Dec 2019 23:26:56 GMT", "Connection", "close" ] @@ -586,7 +586,7 @@ "state": { "options": {}, "values": { - "instanceId": "60d9f97a-1f8f-5603-5304-e9b584180411" + "instanceId": "df5b617f-ba9b-d857-e266-d2977274ef17" }, "stepIndex": 1 } @@ -609,11 +609,11 @@ ] } }, - "_rid": "-gMpAKxPACsHAAAAAAAAAA==", - "_self": "dbs/-gMpAA==/colls/-gMpAKxPACs=/docs/-gMpAKxPACsHAAAAAAAAAA==/", - "_etag": "\"00000000-0000-0000-abc0-42df63b401d5\"", + "_rid": "gzFFAPwkVIUKAAAAAAAAAA==", + "_self": "dbs/gzFFAA==/colls/gzFFAPwkVIU=/docs/gzFFAPwkVIUKAAAAAAAAAA==/", + "_etag": "\"00000000-0000-0000-b143-a50772ee01d5\"", "_attachments": "attachments/", - "_ts": 1575587032 + "_ts": 1576193216 }, "rawHeaders": [ "Cache-Control", @@ -631,23 +631,23 @@ "Access-Control-Allow-Credentials", "true", "x-ms-last-state-change-utc", - "Thu, 05 Dec 2019 01:23:43.997 GMT", + "Wed, 11 Dec 2019 19:46:09.043 GMT", "etag", - "\"00000000-0000-0000-abc0-42df63b401d5\"", + "\"00000000-0000-0000-b143-a50772ee01d5\"", "x-ms-resource-quota", "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", "x-ms-resource-usage", "documentSize=0;documentsSize=0;documentsCount=6;collectionSize=6;", "lsn", - "67", + "4056", "x-ms-schemaversion", - "1.7", + "1.8", "x-ms-alt-content-path", "dbs/test-db/colls/bot-storage", "x-ms-content-path", - "-gMpAKxPACs=", + "gzFFAPwkVIU=", "x-ms-quorum-acked-lsn", - "66", + "4055", "x-ms-current-write-quorum", "1", "x-ms-current-replica-set-size", @@ -659,23 +659,23 @@ "x-ms-number-of-read-regions", "0", "x-ms-transport-request-id", - "156", + "1405", "x-ms-cosmos-llsn", - "67", + "4056", "x-ms-cosmos-quorum-acked-llsn", - "66", + "4055", "x-ms-session-token", - "0:-1#67", + "0:-1#4056", "x-ms-request-charge", "10.67", "x-ms-serviceversion", - "version=2.2.0.0", + "version=2.7.0.0", "x-ms-activity-id", - "40b24e78-9574-4d6e-b00b-9d3b0db2cff6", + "03d7824e-bf56-4018-992a-6e8f255c5980", "x-ms-gatewayversion", - "version=2.2.0.0", + "version=2.7.0", "Date", - "Thu, 05 Dec 2019 23:03:51 GMT", + "Thu, 12 Dec 2019 23:26:56 GMT", "Connection", "close" ] @@ -697,7 +697,7 @@ "state": { "options": {}, "values": { - "instanceId": "60d9f97a-1f8f-5603-5304-e9b584180411" + "instanceId": "df5b617f-ba9b-d857-e266-d2977274ef17" }, "stepIndex": 1 } @@ -720,11 +720,11 @@ ] } }, - "_rid": "-gMpAKxPACsHAAAAAAAAAA==", - "_self": "dbs/-gMpAA==/colls/-gMpAKxPACs=/docs/-gMpAKxPACsHAAAAAAAAAA==/", - "_etag": "\"00000000-0000-0000-abc0-42df63b401d5\"", + "_rid": "gzFFAPwkVIUKAAAAAAAAAA==", + "_self": "dbs/gzFFAA==/colls/gzFFAPwkVIU=/docs/gzFFAPwkVIUKAAAAAAAAAA==/", + "_etag": "\"00000000-0000-0000-b143-a50772ee01d5\"", "_attachments": "attachments/", - "_ts": 1575587032 + "_ts": 1576193216 }, "rawHeaders": [ "Cache-Control", @@ -744,23 +744,23 @@ "Access-Control-Allow-Credentials", "true", "x-ms-last-state-change-utc", - "Thu, 05 Dec 2019 01:23:43.997 GMT", + "Wed, 11 Dec 2019 19:46:09.043 GMT", "etag", - "\"00000000-0000-0000-abc0-42df63b401d5\"", + "\"00000000-0000-0000-b143-a50772ee01d5\"", "x-ms-resource-quota", "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", "x-ms-resource-usage", "documentSize=0;documentsSize=0;documentsCount=6;collectionSize=6;", "lsn", - "67", + "4056", "x-ms-schemaversion", - "1.7", + "1.8", "x-ms-alt-content-path", "dbs/test-db/colls/bot-storage", "x-ms-content-path", - "-gMpAKxPACs=", + "gzFFAPwkVIU=", "x-ms-quorum-acked-lsn", - "67", + "4056", "x-ms-current-write-quorum", "1", "x-ms-current-replica-set-size", @@ -772,27 +772,27 @@ "x-ms-number-of-read-regions", "0", "x-ms-item-lsn", - "67", + "4056", "x-ms-transport-request-id", - "157", + "1406", "x-ms-cosmos-llsn", - "67", + "4056", "x-ms-cosmos-quorum-acked-llsn", - "67", + "4056", "x-ms-cosmos-item-llsn", - "67", + "4056", "x-ms-session-token", - "0:-1#67", + "0:-1#4056", "x-ms-request-charge", "1", "x-ms-serviceversion", - "version=2.2.0.0", + "version=2.7.0.0", "x-ms-activity-id", - "688c825c-2012-4f37-b939-d83b65e4da4f", + "5e779d1b-de32-4a25-ad1d-0d964ed0c1e2", "x-ms-gatewayversion", - "version=2.2.0.0", + "version=2.7.0", "Date", - "Thu, 05 Dec 2019 23:03:51 GMT", + "Thu, 12 Dec 2019 23:26:56 GMT", "Connection", "close" ] @@ -848,7 +848,7 @@ "state": { "options": {}, "values": { - "instanceId": "60d9f97a-1f8f-5603-5304-e9b584180411" + "instanceId": "df5b617f-ba9b-d857-e266-d2977274ef17" }, "stepIndex": 1 } @@ -871,11 +871,11 @@ ] } }, - "_rid": "-gMpAKxPACsHAAAAAAAAAA==", - "_self": "dbs/-gMpAA==/colls/-gMpAKxPACs=/docs/-gMpAKxPACsHAAAAAAAAAA==/", - "_etag": "\"00000000-0000-0000-abc0-42e2a1a901d5\"", + "_rid": "gzFFAPwkVIUKAAAAAAAAAA==", + "_self": "dbs/gzFFAA==/colls/gzFFAPwkVIU=/docs/gzFFAPwkVIUKAAAAAAAAAA==/", + "_etag": "\"00000000-0000-0000-b143-a50b07ad01d5\"", "_attachments": "attachments/", - "_ts": 1575587032 + "_ts": 1576193216 }, "rawHeaders": [ "Cache-Control", @@ -893,23 +893,23 @@ "Access-Control-Allow-Credentials", "true", "x-ms-last-state-change-utc", - "Thu, 05 Dec 2019 01:23:43.997 GMT", + "Wed, 11 Dec 2019 19:46:09.043 GMT", "etag", - "\"00000000-0000-0000-abc0-42e2a1a901d5\"", + "\"00000000-0000-0000-b143-a50b07ad01d5\"", "x-ms-resource-quota", "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", "x-ms-resource-usage", "documentSize=0;documentsSize=0;documentsCount=6;collectionSize=6;", "lsn", - "68", + "4057", "x-ms-schemaversion", - "1.7", + "1.8", "x-ms-alt-content-path", "dbs/test-db/colls/bot-storage", "x-ms-content-path", - "-gMpAKxPACs=", + "gzFFAPwkVIU=", "x-ms-quorum-acked-lsn", - "67", + "4056", "x-ms-current-write-quorum", "1", "x-ms-current-replica-set-size", @@ -921,23 +921,23 @@ "x-ms-number-of-read-regions", "0", "x-ms-transport-request-id", - "158", + "1407", "x-ms-cosmos-llsn", - "68", + "4057", "x-ms-cosmos-quorum-acked-llsn", - "67", + "4056", "x-ms-session-token", - "0:-1#68", + "0:-1#4057", "x-ms-request-charge", "10.67", "x-ms-serviceversion", - "version=2.2.0.0", + "version=2.7.0.0", "x-ms-activity-id", - "f0a99d12-9989-42af-8cbf-d2d3ce6ab9c1", + "98c9851a-acd7-46c3-8015-7fdd05a2ab5f", "x-ms-gatewayversion", - "version=2.2.0.0", + "version=2.7.0", "Date", - "Thu, 05 Dec 2019 23:03:51 GMT", + "Thu, 12 Dec 2019 23:26:56 GMT", "Connection", "close" ] @@ -959,7 +959,7 @@ "state": { "options": {}, "values": { - "instanceId": "60d9f97a-1f8f-5603-5304-e9b584180411" + "instanceId": "df5b617f-ba9b-d857-e266-d2977274ef17" }, "stepIndex": 1 } @@ -982,11 +982,11 @@ ] } }, - "_rid": "-gMpAKxPACsHAAAAAAAAAA==", - "_self": "dbs/-gMpAA==/colls/-gMpAKxPACs=/docs/-gMpAKxPACsHAAAAAAAAAA==/", - "_etag": "\"00000000-0000-0000-abc0-42e2a1a901d5\"", + "_rid": "gzFFAPwkVIUKAAAAAAAAAA==", + "_self": "dbs/gzFFAA==/colls/gzFFAPwkVIU=/docs/gzFFAPwkVIUKAAAAAAAAAA==/", + "_etag": "\"00000000-0000-0000-b143-a50b07ad01d5\"", "_attachments": "attachments/", - "_ts": 1575587032 + "_ts": 1576193216 }, "rawHeaders": [ "Cache-Control", @@ -1006,23 +1006,23 @@ "Access-Control-Allow-Credentials", "true", "x-ms-last-state-change-utc", - "Thu, 05 Dec 2019 01:23:43.997 GMT", + "Wed, 11 Dec 2019 19:46:09.043 GMT", "etag", - "\"00000000-0000-0000-abc0-42e2a1a901d5\"", + "\"00000000-0000-0000-b143-a50b07ad01d5\"", "x-ms-resource-quota", "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", "x-ms-resource-usage", "documentSize=0;documentsSize=0;documentsCount=6;collectionSize=6;", "lsn", - "68", + "4057", "x-ms-schemaversion", - "1.7", + "1.8", "x-ms-alt-content-path", "dbs/test-db/colls/bot-storage", "x-ms-content-path", - "-gMpAKxPACs=", + "gzFFAPwkVIU=", "x-ms-quorum-acked-lsn", - "68", + "4057", "x-ms-current-write-quorum", "1", "x-ms-current-replica-set-size", @@ -1034,27 +1034,27 @@ "x-ms-number-of-read-regions", "0", "x-ms-item-lsn", - "68", + "4057", "x-ms-transport-request-id", - "159", + "1408", "x-ms-cosmos-llsn", - "68", + "4057", "x-ms-cosmos-quorum-acked-llsn", - "68", + "4057", "x-ms-cosmos-item-llsn", - "68", + "4057", "x-ms-session-token", - "0:-1#68", + "0:-1#4057", "x-ms-request-charge", "1", "x-ms-serviceversion", - "version=2.2.0.0", + "version=2.7.0.0", "x-ms-activity-id", - "e1d382b0-6181-424f-9b29-69033e704c1d", + "470ed7cd-b720-4eee-9b09-21b015f15da8", "x-ms-gatewayversion", - "version=2.2.0.0", + "version=2.7.0", "Date", - "Thu, 05 Dec 2019 23:03:51 GMT", + "Thu, 12 Dec 2019 23:26:56 GMT", "Connection", "close" ] @@ -1110,7 +1110,7 @@ "state": { "options": {}, "values": { - "instanceId": "60d9f97a-1f8f-5603-5304-e9b584180411" + "instanceId": "df5b617f-ba9b-d857-e266-d2977274ef17" }, "stepIndex": 1 } @@ -1133,11 +1133,11 @@ ] } }, - "_rid": "-gMpAKxPACsHAAAAAAAAAA==", - "_self": "dbs/-gMpAA==/colls/-gMpAKxPACs=/docs/-gMpAKxPACsHAAAAAAAAAA==/", - "_etag": "\"00000000-0000-0000-abc0-42e6691501d5\"", + "_rid": "gzFFAPwkVIUKAAAAAAAAAA==", + "_self": "dbs/gzFFAA==/colls/gzFFAPwkVIU=/docs/gzFFAPwkVIUKAAAAAAAAAA==/", + "_etag": "\"00000000-0000-0000-b143-a50e0b2f01d5\"", "_attachments": "attachments/", - "_ts": 1575587032 + "_ts": 1576193216 }, "rawHeaders": [ "Cache-Control", @@ -1155,23 +1155,23 @@ "Access-Control-Allow-Credentials", "true", "x-ms-last-state-change-utc", - "Thu, 05 Dec 2019 01:23:43.997 GMT", + "Wed, 11 Dec 2019 19:46:09.043 GMT", "etag", - "\"00000000-0000-0000-abc0-42e6691501d5\"", + "\"00000000-0000-0000-b143-a50e0b2f01d5\"", "x-ms-resource-quota", "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", "x-ms-resource-usage", "documentSize=0;documentsSize=0;documentsCount=6;collectionSize=6;", "lsn", - "69", + "4058", "x-ms-schemaversion", - "1.7", + "1.8", "x-ms-alt-content-path", "dbs/test-db/colls/bot-storage", "x-ms-content-path", - "-gMpAKxPACs=", + "gzFFAPwkVIU=", "x-ms-quorum-acked-lsn", - "68", + "4057", "x-ms-current-write-quorum", "1", "x-ms-current-replica-set-size", @@ -1183,23 +1183,23 @@ "x-ms-number-of-read-regions", "0", "x-ms-transport-request-id", - "160", + "1409", "x-ms-cosmos-llsn", - "69", + "4058", "x-ms-cosmos-quorum-acked-llsn", - "68", + "4057", "x-ms-session-token", - "0:-1#69", + "0:-1#4058", "x-ms-request-charge", "10.67", "x-ms-serviceversion", - "version=2.2.0.0", + "version=2.7.0.0", "x-ms-activity-id", - "27dfa308-09dd-4638-9818-d83691ec78d5", + "aed62060-598f-4748-accb-f29216346d47", "x-ms-gatewayversion", - "version=2.2.0.0", + "version=2.7.0", "Date", - "Thu, 05 Dec 2019 23:03:51 GMT", + "Thu, 12 Dec 2019 23:26:56 GMT", "Connection", "close" ] @@ -1221,7 +1221,7 @@ "state": { "options": {}, "values": { - "instanceId": "60d9f97a-1f8f-5603-5304-e9b584180411" + "instanceId": "df5b617f-ba9b-d857-e266-d2977274ef17" }, "stepIndex": 1 } @@ -1244,11 +1244,11 @@ ] } }, - "_rid": "-gMpAKxPACsHAAAAAAAAAA==", - "_self": "dbs/-gMpAA==/colls/-gMpAKxPACs=/docs/-gMpAKxPACsHAAAAAAAAAA==/", - "_etag": "\"00000000-0000-0000-abc0-42e6691501d5\"", + "_rid": "gzFFAPwkVIUKAAAAAAAAAA==", + "_self": "dbs/gzFFAA==/colls/gzFFAPwkVIU=/docs/gzFFAPwkVIUKAAAAAAAAAA==/", + "_etag": "\"00000000-0000-0000-b143-a50e0b2f01d5\"", "_attachments": "attachments/", - "_ts": 1575587032 + "_ts": 1576193216 }, "rawHeaders": [ "Cache-Control", @@ -1268,23 +1268,23 @@ "Access-Control-Allow-Credentials", "true", "x-ms-last-state-change-utc", - "Thu, 05 Dec 2019 01:23:43.997 GMT", + "Wed, 11 Dec 2019 19:46:09.043 GMT", "etag", - "\"00000000-0000-0000-abc0-42e6691501d5\"", + "\"00000000-0000-0000-b143-a50e0b2f01d5\"", "x-ms-resource-quota", "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", "x-ms-resource-usage", "documentSize=0;documentsSize=0;documentsCount=6;collectionSize=6;", "lsn", - "69", + "4058", "x-ms-schemaversion", - "1.7", + "1.8", "x-ms-alt-content-path", "dbs/test-db/colls/bot-storage", "x-ms-content-path", - "-gMpAKxPACs=", + "gzFFAPwkVIU=", "x-ms-quorum-acked-lsn", - "69", + "4058", "x-ms-current-write-quorum", "1", "x-ms-current-replica-set-size", @@ -1296,27 +1296,27 @@ "x-ms-number-of-read-regions", "0", "x-ms-item-lsn", - "69", + "4058", "x-ms-transport-request-id", - "161", + "1410", "x-ms-cosmos-llsn", - "69", + "4058", "x-ms-cosmos-quorum-acked-llsn", - "69", + "4058", "x-ms-cosmos-item-llsn", - "69", + "4058", "x-ms-session-token", - "0:-1#69", + "0:-1#4058", "x-ms-request-charge", "1", "x-ms-serviceversion", - "version=2.2.0.0", + "version=2.7.0.0", "x-ms-activity-id", - "cbdb95ce-1ae6-4671-b7f7-0b5a050fe759", + "216cb515-6d07-47fe-8478-9fef2b997180", "x-ms-gatewayversion", - "version=2.2.0.0", + "version=2.7.0", "Date", - "Thu, 05 Dec 2019 23:03:51 GMT", + "Thu, 12 Dec 2019 23:26:56 GMT", "Connection", "close" ] @@ -1357,7 +1357,7 @@ "state": { "options": {}, "values": { - "instanceId": "60d9f97a-1f8f-5603-5304-e9b584180411" + "instanceId": "df5b617f-ba9b-d857-e266-d2977274ef17" }, "stepIndex": 2 } @@ -1365,11 +1365,11 @@ ] } }, - "_rid": "-gMpAKxPACsHAAAAAAAAAA==", - "_self": "dbs/-gMpAA==/colls/-gMpAKxPACs=/docs/-gMpAKxPACsHAAAAAAAAAA==/", - "_etag": "\"00000000-0000-0000-abc0-42e98ddb01d5\"", + "_rid": "gzFFAPwkVIUKAAAAAAAAAA==", + "_self": "dbs/gzFFAA==/colls/gzFFAPwkVIU=/docs/gzFFAPwkVIUKAAAAAAAAAA==/", + "_etag": "\"00000000-0000-0000-b143-a511eb6501d5\"", "_attachments": "attachments/", - "_ts": 1575587032 + "_ts": 1576193216 }, "rawHeaders": [ "Cache-Control", @@ -1387,23 +1387,23 @@ "Access-Control-Allow-Credentials", "true", "x-ms-last-state-change-utc", - "Thu, 05 Dec 2019 01:23:43.997 GMT", + "Wed, 11 Dec 2019 19:46:09.043 GMT", "etag", - "\"00000000-0000-0000-abc0-42e98ddb01d5\"", + "\"00000000-0000-0000-b143-a511eb6501d5\"", "x-ms-resource-quota", "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", "x-ms-resource-usage", "documentSize=0;documentsSize=0;documentsCount=6;collectionSize=6;", "lsn", - "70", + "4059", "x-ms-schemaversion", - "1.7", + "1.8", "x-ms-alt-content-path", "dbs/test-db/colls/bot-storage", "x-ms-content-path", - "-gMpAKxPACs=", + "gzFFAPwkVIU=", "x-ms-quorum-acked-lsn", - "69", + "4058", "x-ms-current-write-quorum", "1", "x-ms-current-replica-set-size", @@ -1415,23 +1415,23 @@ "x-ms-number-of-read-regions", "0", "x-ms-transport-request-id", - "162", + "1411", "x-ms-cosmos-llsn", - "70", + "4059", "x-ms-cosmos-quorum-acked-llsn", - "69", + "4058", "x-ms-session-token", - "0:-1#70", + "0:-1#4059", "x-ms-request-charge", "12.76", "x-ms-serviceversion", - "version=2.2.0.0", + "version=2.7.0.0", "x-ms-activity-id", - "8edc80d1-c052-4345-9793-a30bfda2d619", + "2ad85470-b66a-4cca-ab35-d87ff35a24d6", "x-ms-gatewayversion", - "version=2.2.0.0", + "version=2.7.0", "Date", - "Thu, 05 Dec 2019 23:03:51 GMT", + "Thu, 12 Dec 2019 23:26:56 GMT", "Connection", "close" ] diff --git a/libraries/botbuilder-azure/tests/TestData/CosmosDbPartitionedStorage - Base Storage Tests/return_empty_object_when_reading_unknown_key.json b/libraries/botbuilder-azure/tests/TestData/CosmosDbPartitionedStorage - Base Storage Tests/return_empty_object_when_reading_unknown_key.json new file mode 100644 index 0000000000..8a32c20f1e --- /dev/null +++ b/libraries/botbuilder-azure/tests/TestData/CosmosDbPartitionedStorage - Base Storage Tests/return_empty_object_when_reading_unknown_key.json @@ -0,0 +1,65 @@ +[ + { + "scope": "https://localhost:8081", + "method": "GET", + "path": "/dbs/test-db/colls/bot-storage/docs/unknown", + "body": "", + "status": 404, + "response": { + "code": "NotFound", + "message": "Message: {\"Errors\":[\"Resource Not Found\"]}\r\nActivityId: d77eb317-0151-4c85-8ecd-037f37509f30, Request URI: /apps/DocDbApp/services/DocDbServer7/partitions/a4cb4953-38c8-11e6-8106-8cdcd42c33be/replicas/1p/, RequestStats: \r\nRequestStartTime: 2019-12-12T23:26:56.0446559Z, RequestEndTime: 2019-12-12T23:26:56.0536541Z, Number of regions attempted:1\r\nResponseTime: 2019-12-12T23:26:56.0536541Z, StoreResult: StorePhysicalAddress: rntbd://127.0.0.1:10253/apps/DocDbApp/services/DocDbServer7/partitions/a4cb4953-38c8-11e6-8106-8cdcd42c33be/replicas/1p/, LSN: 4034, GlobalCommittedLsn: -1, PartitionKeyRangeId: 0, IsValid: True, StatusCode: 404, SubStatusCode: 0, RequestCharge: 1, ItemLSN: -1, SessionToken: -1#4034, UsingLocalLSN: True, TransportException: null, ResourceType: Document, OperationType: Read\r\n, SDK: Microsoft.Azure.Documents.Common/2.7.0" + }, + "rawHeaders": [ + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json", + "Content-Location", + "https://localhost:8081/dbs/test-db/colls/bot-storage/docs/unknown", + "Server", + "Microsoft-HTTPAPI/2.0", + "Access-Control-Allow-Origin", + "", + "Access-Control-Allow-Credentials", + "true", + "x-ms-last-state-change-utc", + "Wed, 11 Dec 2019 19:46:09.043 GMT", + "lsn", + "4034", + "x-ms-schemaversion", + "1.8", + "x-ms-quorum-acked-lsn", + "4034", + "x-ms-current-write-quorum", + "1", + "x-ms-current-replica-set-size", + "1", + "x-ms-xp-role", + "0", + "x-ms-global-Committed-lsn", + "-1", + "x-ms-number-of-read-regions", + "0", + "x-ms-transport-request-id", + "1354", + "x-ms-cosmos-llsn", + "4034", + "x-ms-cosmos-quorum-acked-llsn", + "4034", + "x-ms-session-token", + "0:-1#4034", + "x-ms-request-charge", + "1", + "x-ms-serviceversion", + "version=2.7.0.0", + "x-ms-activity-id", + "d77eb317-0151-4c85-8ecd-037f37509f30", + "x-ms-gatewayversion", + "version=2.7.0", + "Date", + "Thu, 12 Dec 2019 23:26:55 GMT", + "Connection", + "close" + ] + } +] \ No newline at end of file diff --git a/libraries/botbuilder-azure/tests/TestData/CosmosDbPartitionedStorage - Base Storage Tests/throws_when_reading_null_keys.json b/libraries/botbuilder-azure/tests/TestData/CosmosDbPartitionedStorage - Base Storage Tests/throws_when_reading_null_keys.json new file mode 100644 index 0000000000..0637a088a0 --- /dev/null +++ b/libraries/botbuilder-azure/tests/TestData/CosmosDbPartitionedStorage - Base Storage Tests/throws_when_reading_null_keys.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/libraries/botbuilder-azure/tests/TestData/CosmosDbPartitionedStorage - Base Storage Tests/throws_when_writing_null_keys.json b/libraries/botbuilder-azure/tests/TestData/CosmosDbPartitionedStorage - Base Storage Tests/throws_when_writing_null_keys.json new file mode 100644 index 0000000000..0637a088a0 --- /dev/null +++ b/libraries/botbuilder-azure/tests/TestData/CosmosDbPartitionedStorage - Base Storage Tests/throws_when_writing_null_keys.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/libraries/botbuilder-azure/tests/TestData/CosmosDbPartitionedStorage/should_update_an_object.json b/libraries/botbuilder-azure/tests/TestData/CosmosDbPartitionedStorage - Base Storage Tests/update_an_object.json similarity index 72% rename from libraries/botbuilder-azure/tests/TestData/CosmosDbPartitionedStorage/should_update_an_object.json rename to libraries/botbuilder-azure/tests/TestData/CosmosDbPartitionedStorage - Base Storage Tests/update_an_object.json index 5c91be6cce..850c2c7375 100644 --- a/libraries/botbuilder-azure/tests/TestData/CosmosDbPartitionedStorage/should_update_an_object.json +++ b/libraries/botbuilder-azure/tests/TestData/CosmosDbPartitionedStorage - Base Storage Tests/update_an_object.json @@ -4,8 +4,8 @@ "method": "POST", "path": "/dbs/test-db/colls/bot-storage/docs", "body": { - "id": "pocoStoreItem", - "realId": "pocoStoreItem", + "id": "pocoItem", + "realId": "pocoItem", "document": { "id": 1, "count": 1 @@ -13,17 +13,17 @@ }, "status": 201, "response": { - "id": "pocoStoreItem", - "realId": "pocoStoreItem", + "id": "pocoItem", + "realId": "pocoItem", "document": { "id": 1, "count": 1 }, - "_rid": "-gMpAKxPACsEAAAAAAAAAA==", - "_self": "dbs/-gMpAA==/colls/-gMpAKxPACs=/docs/-gMpAKxPACsEAAAAAAAAAA==/", - "_etag": "\"00000000-0000-0000-abc0-42b704c001d5\"", + "_rid": "gzFFAPwkVIUEAAAAAAAAAA==", + "_self": "dbs/gzFFAA==/colls/gzFFAPwkVIU=/docs/gzFFAPwkVIUEAAAAAAAAAA==/", + "_etag": "\"00000000-0000-0000-b143-a4bbf74b01d5\"", "_attachments": "attachments/", - "_ts": 1575587031 + "_ts": 1576193216 }, "rawHeaders": [ "Cache-Control", @@ -41,23 +41,23 @@ "Access-Control-Allow-Credentials", "true", "x-ms-last-state-change-utc", - "Thu, 05 Dec 2019 01:23:43.997 GMT", + "Wed, 11 Dec 2019 19:46:09.043 GMT", "etag", - "\"00000000-0000-0000-abc0-42b704c001d5\"", + "\"00000000-0000-0000-b143-a4bbf74b01d5\"", "x-ms-resource-quota", "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", "x-ms-resource-usage", "documentSize=0;documentsSize=0;documentsCount=3;collectionSize=4;", "lsn", - "55", + "4038", "x-ms-schemaversion", - "1.7", + "1.8", "x-ms-alt-content-path", "dbs/test-db/colls/bot-storage", "x-ms-content-path", - "-gMpAKxPACs=", + "gzFFAPwkVIU=", "x-ms-quorum-acked-lsn", - "54", + "4037", "x-ms-current-write-quorum", "1", "x-ms-current-replica-set-size", @@ -69,23 +69,23 @@ "x-ms-number-of-read-regions", "0", "x-ms-transport-request-id", - "128", + "1363", "x-ms-cosmos-llsn", - "55", + "4038", "x-ms-cosmos-quorum-acked-llsn", - "54", + "4037", "x-ms-session-token", - "0:-1#55", + "0:-1#4038", "x-ms-request-charge", "6.86", "x-ms-serviceversion", - "version=2.2.0.0", + "version=2.7.0.0", "x-ms-activity-id", - "9ae2e636-30a6-4fb8-88a7-37bb8d86368c", + "0b831861-2787-43b3-aef7-91504860ecf1", "x-ms-gatewayversion", - "version=2.2.0.0", + "version=2.7.0", "Date", - "Thu, 05 Dec 2019 23:03:51 GMT", + "Thu, 12 Dec 2019 23:26:55 GMT", "Connection", "close" ] @@ -95,8 +95,8 @@ "method": "POST", "path": "/dbs/test-db/colls/bot-storage/docs", "body": { - "id": "pocoItem", - "realId": "pocoItem", + "id": "pocoStoreItem", + "realId": "pocoStoreItem", "document": { "id": 1, "count": 1 @@ -104,17 +104,17 @@ }, "status": 201, "response": { - "id": "pocoItem", - "realId": "pocoItem", + "id": "pocoStoreItem", + "realId": "pocoStoreItem", "document": { "id": 1, "count": 1 }, - "_rid": "-gMpAKxPACsFAAAAAAAAAA==", - "_self": "dbs/-gMpAA==/colls/-gMpAKxPACs=/docs/-gMpAKxPACsFAAAAAAAAAA==/", - "_etag": "\"00000000-0000-0000-abc0-42b7663c01d5\"", + "_rid": "gzFFAPwkVIUFAAAAAAAAAA==", + "_self": "dbs/gzFFAA==/colls/gzFFAPwkVIU=/docs/gzFFAPwkVIUFAAAAAAAAAA==/", + "_etag": "\"00000000-0000-0000-b143-a4bc95e001d5\"", "_attachments": "attachments/", - "_ts": 1575587031 + "_ts": 1576193216 }, "rawHeaders": [ "Cache-Control", @@ -132,23 +132,23 @@ "Access-Control-Allow-Credentials", "true", "x-ms-last-state-change-utc", - "Thu, 05 Dec 2019 01:23:43.997 GMT", + "Wed, 11 Dec 2019 19:46:09.043 GMT", "etag", - "\"00000000-0000-0000-abc0-42b7663c01d5\"", + "\"00000000-0000-0000-b143-a4bc95e001d5\"", "x-ms-resource-quota", "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", "x-ms-resource-usage", "documentSize=0;documentsSize=0;documentsCount=4;collectionSize=5;", "lsn", - "56", + "4039", "x-ms-schemaversion", - "1.7", + "1.8", "x-ms-alt-content-path", "dbs/test-db/colls/bot-storage", "x-ms-content-path", - "-gMpAKxPACs=", + "gzFFAPwkVIU=", "x-ms-quorum-acked-lsn", - "55", + "4038", "x-ms-current-write-quorum", "1", "x-ms-current-replica-set-size", @@ -160,23 +160,23 @@ "x-ms-number-of-read-regions", "0", "x-ms-transport-request-id", - "127", + "1364", "x-ms-cosmos-llsn", - "56", + "4039", "x-ms-cosmos-quorum-acked-llsn", - "55", + "4038", "x-ms-session-token", - "0:-1#56", + "0:-1#4039", "x-ms-request-charge", "6.86", "x-ms-serviceversion", - "version=2.2.0.0", + "version=2.7.0.0", "x-ms-activity-id", - "6d4bf56b-7542-466d-b1ee-0fd2a416f056", + "6b8ba186-33ed-48d0-910a-881626ec6e8e", "x-ms-gatewayversion", - "version=2.2.0.0", + "version=2.7.0", "Date", - "Thu, 05 Dec 2019 23:03:51 GMT", + "Thu, 12 Dec 2019 23:26:55 GMT", "Connection", "close" ] @@ -194,11 +194,11 @@ "id": 1, "count": 1 }, - "_rid": "-gMpAKxPACsFAAAAAAAAAA==", - "_self": "dbs/-gMpAA==/colls/-gMpAKxPACs=/docs/-gMpAKxPACsFAAAAAAAAAA==/", - "_etag": "\"00000000-0000-0000-abc0-42b7663c01d5\"", + "_rid": "gzFFAPwkVIUEAAAAAAAAAA==", + "_self": "dbs/gzFFAA==/colls/gzFFAPwkVIU=/docs/gzFFAPwkVIUEAAAAAAAAAA==/", + "_etag": "\"00000000-0000-0000-b143-a4bbf74b01d5\"", "_attachments": "attachments/", - "_ts": 1575587031 + "_ts": 1576193216 }, "rawHeaders": [ "Cache-Control", @@ -218,23 +218,23 @@ "Access-Control-Allow-Credentials", "true", "x-ms-last-state-change-utc", - "Thu, 05 Dec 2019 01:23:43.997 GMT", + "Wed, 11 Dec 2019 19:46:09.043 GMT", "etag", - "\"00000000-0000-0000-abc0-42b7663c01d5\"", + "\"00000000-0000-0000-b143-a4bbf74b01d5\"", "x-ms-resource-quota", "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", "x-ms-resource-usage", "documentSize=0;documentsSize=0;documentsCount=5;collectionSize=5;", "lsn", - "56", + "4039", "x-ms-schemaversion", - "1.7", + "1.8", "x-ms-alt-content-path", "dbs/test-db/colls/bot-storage", "x-ms-content-path", - "-gMpAKxPACs=", + "gzFFAPwkVIU=", "x-ms-quorum-acked-lsn", - "56", + "4039", "x-ms-current-write-quorum", "1", "x-ms-current-replica-set-size", @@ -246,27 +246,27 @@ "x-ms-number-of-read-regions", "0", "x-ms-item-lsn", - "56", + "4038", "x-ms-transport-request-id", - "129", + "1365", "x-ms-cosmos-llsn", - "56", + "4039", "x-ms-cosmos-quorum-acked-llsn", - "56", + "4039", "x-ms-cosmos-item-llsn", - "56", + "4038", "x-ms-session-token", - "0:-1#56", + "0:-1#4039", "x-ms-request-charge", "1", "x-ms-serviceversion", - "version=2.2.0.0", + "version=2.7.0.0", "x-ms-activity-id", - "d115e2e4-dc8f-4d8b-baf1-0af2e2d6ca79", + "8c9426e8-ac42-446e-8708-4a4a64f40cc2", "x-ms-gatewayversion", - "version=2.2.0.0", + "version=2.7.0", "Date", - "Thu, 05 Dec 2019 23:03:51 GMT", + "Thu, 12 Dec 2019 23:26:55 GMT", "Connection", "close" ] @@ -284,11 +284,11 @@ "id": 1, "count": 1 }, - "_rid": "-gMpAKxPACsEAAAAAAAAAA==", - "_self": "dbs/-gMpAA==/colls/-gMpAKxPACs=/docs/-gMpAKxPACsEAAAAAAAAAA==/", - "_etag": "\"00000000-0000-0000-abc0-42b704c001d5\"", + "_rid": "gzFFAPwkVIUFAAAAAAAAAA==", + "_self": "dbs/gzFFAA==/colls/gzFFAPwkVIU=/docs/gzFFAPwkVIUFAAAAAAAAAA==/", + "_etag": "\"00000000-0000-0000-b143-a4bc95e001d5\"", "_attachments": "attachments/", - "_ts": 1575587031 + "_ts": 1576193216 }, "rawHeaders": [ "Cache-Control", @@ -308,23 +308,23 @@ "Access-Control-Allow-Credentials", "true", "x-ms-last-state-change-utc", - "Thu, 05 Dec 2019 01:23:43.997 GMT", + "Wed, 11 Dec 2019 19:46:09.043 GMT", "etag", - "\"00000000-0000-0000-abc0-42b704c001d5\"", + "\"00000000-0000-0000-b143-a4bc95e001d5\"", "x-ms-resource-quota", "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", "x-ms-resource-usage", "documentSize=0;documentsSize=0;documentsCount=5;collectionSize=5;", "lsn", - "56", + "4039", "x-ms-schemaversion", - "1.7", + "1.8", "x-ms-alt-content-path", "dbs/test-db/colls/bot-storage", "x-ms-content-path", - "-gMpAKxPACs=", + "gzFFAPwkVIU=", "x-ms-quorum-acked-lsn", - "56", + "4039", "x-ms-current-write-quorum", "1", "x-ms-current-replica-set-size", @@ -336,27 +336,27 @@ "x-ms-number-of-read-regions", "0", "x-ms-item-lsn", - "55", + "4039", "x-ms-transport-request-id", - "130", + "1366", "x-ms-cosmos-llsn", - "56", + "4039", "x-ms-cosmos-quorum-acked-llsn", - "56", + "4039", "x-ms-cosmos-item-llsn", - "55", + "4039", "x-ms-session-token", - "0:-1#56", + "0:-1#4039", "x-ms-request-charge", "1", "x-ms-serviceversion", - "version=2.2.0.0", + "version=2.7.0.0", "x-ms-activity-id", - "4ab90ae9-9930-46ec-9e1a-872e73097375", + "fdde9837-30f7-4449-8b01-c153be4a66f3", "x-ms-gatewayversion", - "version=2.2.0.0", + "version=2.7.0", "Date", - "Thu, 05 Dec 2019 23:03:51 GMT", + "Thu, 12 Dec 2019 23:26:55 GMT", "Connection", "close" ] @@ -381,11 +381,11 @@ "id": 1, "count": 2 }, - "_rid": "-gMpAKxPACsFAAAAAAAAAA==", - "_self": "dbs/-gMpAA==/colls/-gMpAKxPACs=/docs/-gMpAKxPACsFAAAAAAAAAA==/", - "_etag": "\"00000000-0000-0000-abc0-42bc4fb901d5\"", + "_rid": "gzFFAPwkVIUEAAAAAAAAAA==", + "_self": "dbs/gzFFAA==/colls/gzFFAPwkVIU=/docs/gzFFAPwkVIUEAAAAAAAAAA==/", + "_etag": "\"00000000-0000-0000-b143-a4c3b80601d5\"", "_attachments": "attachments/", - "_ts": 1575587031 + "_ts": 1576193216 }, "rawHeaders": [ "Cache-Control", @@ -403,23 +403,23 @@ "Access-Control-Allow-Credentials", "true", "x-ms-last-state-change-utc", - "Thu, 05 Dec 2019 01:23:43.997 GMT", + "Wed, 11 Dec 2019 19:46:09.043 GMT", "etag", - "\"00000000-0000-0000-abc0-42bc4fb901d5\"", + "\"00000000-0000-0000-b143-a4c3b80601d5\"", "x-ms-resource-quota", "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", "x-ms-resource-usage", "documentSize=0;documentsSize=0;documentsCount=5;collectionSize=5;", "lsn", - "57", + "4040", "x-ms-schemaversion", - "1.7", + "1.8", "x-ms-alt-content-path", "dbs/test-db/colls/bot-storage", "x-ms-content-path", - "-gMpAKxPACs=", + "gzFFAPwkVIU=", "x-ms-quorum-acked-lsn", - "56", + "4039", "x-ms-current-write-quorum", "1", "x-ms-current-replica-set-size", @@ -431,23 +431,23 @@ "x-ms-number-of-read-regions", "0", "x-ms-transport-request-id", - "131", + "1367", "x-ms-cosmos-llsn", - "57", + "4040", "x-ms-cosmos-quorum-acked-llsn", - "56", + "4039", "x-ms-session-token", - "0:-1#57", + "0:-1#4040", "x-ms-request-charge", "10.67", "x-ms-serviceversion", - "version=2.2.0.0", + "version=2.7.0.0", "x-ms-activity-id", - "f7c13abd-545d-4a66-9e5a-f1347bba2859", + "310e5f3c-229d-4e98-967e-c13f7edad318", "x-ms-gatewayversion", - "version=2.2.0.0", + "version=2.7.0", "Date", - "Thu, 05 Dec 2019 23:03:51 GMT", + "Thu, 12 Dec 2019 23:26:55 GMT", "Connection", "close" ] @@ -472,11 +472,11 @@ "id": 1, "count": 2 }, - "_rid": "-gMpAKxPACsEAAAAAAAAAA==", - "_self": "dbs/-gMpAA==/colls/-gMpAKxPACs=/docs/-gMpAKxPACsEAAAAAAAAAA==/", - "_etag": "\"00000000-0000-0000-abc0-42bcc49e01d5\"", + "_rid": "gzFFAPwkVIUFAAAAAAAAAA==", + "_self": "dbs/gzFFAA==/colls/gzFFAPwkVIU=/docs/gzFFAPwkVIUFAAAAAAAAAA==/", + "_etag": "\"00000000-0000-0000-b143-a4c502fc01d5\"", "_attachments": "attachments/", - "_ts": 1575587031 + "_ts": 1576193216 }, "rawHeaders": [ "Cache-Control", @@ -494,23 +494,23 @@ "Access-Control-Allow-Credentials", "true", "x-ms-last-state-change-utc", - "Thu, 05 Dec 2019 01:23:43.997 GMT", + "Wed, 11 Dec 2019 19:46:09.043 GMT", "etag", - "\"00000000-0000-0000-abc0-42bcc49e01d5\"", + "\"00000000-0000-0000-b143-a4c502fc01d5\"", "x-ms-resource-quota", "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", "x-ms-resource-usage", "documentSize=0;documentsSize=0;documentsCount=5;collectionSize=5;", "lsn", - "58", + "4041", "x-ms-schemaversion", - "1.7", + "1.8", "x-ms-alt-content-path", "dbs/test-db/colls/bot-storage", "x-ms-content-path", - "-gMpAKxPACs=", + "gzFFAPwkVIU=", "x-ms-quorum-acked-lsn", - "57", + "4040", "x-ms-current-write-quorum", "1", "x-ms-current-replica-set-size", @@ -522,23 +522,23 @@ "x-ms-number-of-read-regions", "0", "x-ms-transport-request-id", - "132", + "1368", "x-ms-cosmos-llsn", - "58", + "4041", "x-ms-cosmos-quorum-acked-llsn", - "57", + "4040", "x-ms-session-token", - "0:-1#58", + "0:-1#4041", "x-ms-request-charge", "10.67", "x-ms-serviceversion", - "version=2.2.0.0", + "version=2.7.0.0", "x-ms-activity-id", - "315e84e6-4867-45d3-b3f3-13e7a0f2a624", + "9e2f4e99-27e9-43b2-ae9a-ed76c1ae0dea", "x-ms-gatewayversion", - "version=2.2.0.0", + "version=2.7.0", "Date", - "Thu, 05 Dec 2019 23:03:51 GMT", + "Thu, 12 Dec 2019 23:26:55 GMT", "Connection", "close" ] @@ -546,21 +546,21 @@ { "scope": "https://localhost:8081", "method": "GET", - "path": "/dbs/test-db/colls/bot-storage/docs/pocoStoreItem", + "path": "/dbs/test-db/colls/bot-storage/docs/pocoItem", "body": "", "status": 200, "response": { - "id": "pocoStoreItem", - "realId": "pocoStoreItem", + "id": "pocoItem", + "realId": "pocoItem", "document": { "id": 1, "count": 2 }, - "_rid": "-gMpAKxPACsEAAAAAAAAAA==", - "_self": "dbs/-gMpAA==/colls/-gMpAKxPACs=/docs/-gMpAKxPACsEAAAAAAAAAA==/", - "_etag": "\"00000000-0000-0000-abc0-42bcc49e01d5\"", + "_rid": "gzFFAPwkVIUEAAAAAAAAAA==", + "_self": "dbs/gzFFAA==/colls/gzFFAPwkVIU=/docs/gzFFAPwkVIUEAAAAAAAAAA==/", + "_etag": "\"00000000-0000-0000-b143-a4c3b80601d5\"", "_attachments": "attachments/", - "_ts": 1575587031 + "_ts": 1576193216 }, "rawHeaders": [ "Cache-Control", @@ -572,7 +572,7 @@ "Content-Type", "application/json", "Content-Location", - "https://localhost:8081/dbs/test-db/colls/bot-storage/docs/pocoStoreItem", + "https://localhost:8081/dbs/test-db/colls/bot-storage/docs/pocoItem", "Server", "Microsoft-HTTPAPI/2.0", "Access-Control-Allow-Origin", @@ -580,23 +580,23 @@ "Access-Control-Allow-Credentials", "true", "x-ms-last-state-change-utc", - "Thu, 05 Dec 2019 01:23:43.997 GMT", + "Wed, 11 Dec 2019 19:46:09.043 GMT", "etag", - "\"00000000-0000-0000-abc0-42bcc49e01d5\"", + "\"00000000-0000-0000-b143-a4c3b80601d5\"", "x-ms-resource-quota", "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", "x-ms-resource-usage", "documentSize=0;documentsSize=0;documentsCount=5;collectionSize=5;", "lsn", - "58", + "4041", "x-ms-schemaversion", - "1.7", + "1.8", "x-ms-alt-content-path", "dbs/test-db/colls/bot-storage", "x-ms-content-path", - "-gMpAKxPACs=", + "gzFFAPwkVIU=", "x-ms-quorum-acked-lsn", - "58", + "4041", "x-ms-current-write-quorum", "1", "x-ms-current-replica-set-size", @@ -608,27 +608,27 @@ "x-ms-number-of-read-regions", "0", "x-ms-item-lsn", - "58", + "4040", "x-ms-transport-request-id", - "134", + "1369", "x-ms-cosmos-llsn", - "58", + "4041", "x-ms-cosmos-quorum-acked-llsn", - "58", + "4041", "x-ms-cosmos-item-llsn", - "58", + "4040", "x-ms-session-token", - "0:-1#58", + "0:-1#4041", "x-ms-request-charge", "1", "x-ms-serviceversion", - "version=2.2.0.0", + "version=2.7.0.0", "x-ms-activity-id", - "acca0eb5-d3bf-4a36-ba41-83d20c412c54", + "03319c28-0522-440d-9de5-e873aac9f3ce", "x-ms-gatewayversion", - "version=2.2.0.0", + "version=2.7.0", "Date", - "Thu, 05 Dec 2019 23:03:51 GMT", + "Thu, 12 Dec 2019 23:26:55 GMT", "Connection", "close" ] @@ -636,21 +636,21 @@ { "scope": "https://localhost:8081", "method": "GET", - "path": "/dbs/test-db/colls/bot-storage/docs/pocoItem", + "path": "/dbs/test-db/colls/bot-storage/docs/pocoStoreItem", "body": "", "status": 200, "response": { - "id": "pocoItem", - "realId": "pocoItem", + "id": "pocoStoreItem", + "realId": "pocoStoreItem", "document": { "id": 1, "count": 2 }, - "_rid": "-gMpAKxPACsFAAAAAAAAAA==", - "_self": "dbs/-gMpAA==/colls/-gMpAKxPACs=/docs/-gMpAKxPACsFAAAAAAAAAA==/", - "_etag": "\"00000000-0000-0000-abc0-42bc4fb901d5\"", + "_rid": "gzFFAPwkVIUFAAAAAAAAAA==", + "_self": "dbs/gzFFAA==/colls/gzFFAPwkVIU=/docs/gzFFAPwkVIUFAAAAAAAAAA==/", + "_etag": "\"00000000-0000-0000-b143-a4c502fc01d5\"", "_attachments": "attachments/", - "_ts": 1575587031 + "_ts": 1576193216 }, "rawHeaders": [ "Cache-Control", @@ -662,7 +662,7 @@ "Content-Type", "application/json", "Content-Location", - "https://localhost:8081/dbs/test-db/colls/bot-storage/docs/pocoItem", + "https://localhost:8081/dbs/test-db/colls/bot-storage/docs/pocoStoreItem", "Server", "Microsoft-HTTPAPI/2.0", "Access-Control-Allow-Origin", @@ -670,23 +670,23 @@ "Access-Control-Allow-Credentials", "true", "x-ms-last-state-change-utc", - "Thu, 05 Dec 2019 01:23:43.997 GMT", + "Wed, 11 Dec 2019 19:46:09.043 GMT", "etag", - "\"00000000-0000-0000-abc0-42bc4fb901d5\"", + "\"00000000-0000-0000-b143-a4c502fc01d5\"", "x-ms-resource-quota", "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", "x-ms-resource-usage", "documentSize=0;documentsSize=0;documentsCount=5;collectionSize=5;", "lsn", - "58", + "4041", "x-ms-schemaversion", - "1.7", + "1.8", "x-ms-alt-content-path", "dbs/test-db/colls/bot-storage", "x-ms-content-path", - "-gMpAKxPACs=", + "gzFFAPwkVIU=", "x-ms-quorum-acked-lsn", - "58", + "4041", "x-ms-current-write-quorum", "1", "x-ms-current-replica-set-size", @@ -698,27 +698,27 @@ "x-ms-number-of-read-regions", "0", "x-ms-item-lsn", - "57", + "4041", "x-ms-transport-request-id", - "133", + "1370", "x-ms-cosmos-llsn", - "58", + "4041", "x-ms-cosmos-quorum-acked-llsn", - "58", + "4041", "x-ms-cosmos-item-llsn", - "57", + "4041", "x-ms-session-token", - "0:-1#58", + "0:-1#4041", "x-ms-request-charge", "1", "x-ms-serviceversion", - "version=2.2.0.0", + "version=2.7.0.0", "x-ms-activity-id", - "7ade8ec9-852f-415d-940a-918b914cd1a2", + "9f1ea04e-eee3-4738-a518-64c6fab19a54", "x-ms-gatewayversion", - "version=2.2.0.0", + "version=2.7.0", "Date", - "Thu, 05 Dec 2019 23:03:51 GMT", + "Thu, 12 Dec 2019 23:26:55 GMT", "Connection", "close" ] @@ -743,11 +743,11 @@ "id": 1, "count": 123 }, - "_rid": "-gMpAKxPACsFAAAAAAAAAA==", - "_self": "dbs/-gMpAA==/colls/-gMpAKxPACs=/docs/-gMpAKxPACsFAAAAAAAAAA==/", - "_etag": "\"00000000-0000-0000-abc0-42c0d5ac01d5\"", + "_rid": "gzFFAPwkVIUEAAAAAAAAAA==", + "_self": "dbs/gzFFAA==/colls/gzFFAPwkVIU=/docs/gzFFAPwkVIUEAAAAAAAAAA==/", + "_etag": "\"00000000-0000-0000-b143-a4c9a96801d5\"", "_attachments": "attachments/", - "_ts": 1575587031 + "_ts": 1576193216 }, "rawHeaders": [ "Cache-Control", @@ -765,23 +765,23 @@ "Access-Control-Allow-Credentials", "true", "x-ms-last-state-change-utc", - "Thu, 05 Dec 2019 01:23:43.997 GMT", + "Wed, 11 Dec 2019 19:46:09.043 GMT", "etag", - "\"00000000-0000-0000-abc0-42c0d5ac01d5\"", + "\"00000000-0000-0000-b143-a4c9a96801d5\"", "x-ms-resource-quota", "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", "x-ms-resource-usage", "documentSize=0;documentsSize=0;documentsCount=5;collectionSize=5;", "lsn", - "59", + "4042", "x-ms-schemaversion", - "1.7", + "1.8", "x-ms-alt-content-path", "dbs/test-db/colls/bot-storage", "x-ms-content-path", - "-gMpAKxPACs=", + "gzFFAPwkVIU=", "x-ms-quorum-acked-lsn", - "58", + "4041", "x-ms-current-write-quorum", "1", "x-ms-current-replica-set-size", @@ -793,23 +793,91 @@ "x-ms-number-of-read-regions", "0", "x-ms-transport-request-id", - "135", + "1371", "x-ms-cosmos-llsn", - "59", + "4042", "x-ms-cosmos-quorum-acked-llsn", - "58", + "4041", "x-ms-session-token", - "0:-1#59", + "0:-1#4042", "x-ms-request-charge", "10.67", "x-ms-serviceversion", - "version=2.2.0.0", + "version=2.7.0.0", + "x-ms-activity-id", + "b989e1b5-766a-483f-8a1e-a4a0303364df", + "x-ms-gatewayversion", + "version=2.7.0", + "Date", + "Thu, 12 Dec 2019 23:26:55 GMT", + "Connection", + "close" + ] + }, + { + "scope": "https://localhost:8081", + "method": "POST", + "path": "/dbs/test-db/colls/bot-storage/docs", + "body": { + "id": "pocoStoreItem", + "realId": "pocoStoreItem", + "document": { + "id": 1, + "count": 123 + } + }, + "status": 412, + "response": { + "code": "PreconditionFailed", + "message": "Message: {\"Errors\":[\"One of the specified pre-condition is not met\"]}\r\nActivityId: 364d74fd-403d-479f-9b38-1a73a2891a58, Request URI: /apps/DocDbApp/services/DocDbServer7/partitions/a4cb4953-38c8-11e6-8106-8cdcd42c33be/replicas/1p/, RequestStats: \r\nRequestStartTime: 2019-12-12T23:26:56.3056573Z, RequestEndTime: 2019-12-12T23:26:56.3076585Z, Number of regions attempted:1\r\nResponseTime: 2019-12-12T23:26:56.3076585Z, StoreResult: StorePhysicalAddress: rntbd://127.0.0.1:10253/apps/DocDbApp/services/DocDbServer7/partitions/a4cb4953-38c8-11e6-8106-8cdcd42c33be/replicas/1p/, LSN: 4042, GlobalCommittedLsn: -1, PartitionKeyRangeId: 0, IsValid: True, StatusCode: 412, SubStatusCode: 0, RequestCharge: 1.24, ItemLSN: -1, SessionToken: -1#4042, UsingLocalLSN: False, TransportException: null, ResourceType: Document, OperationType: Upsert\r\n, SDK: Microsoft.Azure.Documents.Common/2.7.0" + }, + "rawHeaders": [ + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json", + "Server", + "Microsoft-HTTPAPI/2.0", + "Access-Control-Allow-Origin", + "", + "Access-Control-Allow-Credentials", + "true", + "x-ms-last-state-change-utc", + "Wed, 11 Dec 2019 19:46:09.043 GMT", + "lsn", + "4042", + "x-ms-schemaversion", + "1.8", + "x-ms-quorum-acked-lsn", + "4042", + "x-ms-current-write-quorum", + "1", + "x-ms-current-replica-set-size", + "1", + "x-ms-xp-role", + "0", + "x-ms-global-Committed-lsn", + "-1", + "x-ms-number-of-read-regions", + "0", + "x-ms-transport-request-id", + "1372", + "x-ms-cosmos-llsn", + "4042", + "x-ms-cosmos-quorum-acked-llsn", + "4042", + "x-ms-session-token", + "0:-1#4042", + "x-ms-request-charge", + "1.24", + "x-ms-serviceversion", + "version=2.7.0.0", "x-ms-activity-id", - "583e3188-7f67-44ee-92e5-85907bdd77bc", + "364d74fd-403d-479f-9b38-1a73a2891a58", "x-ms-gatewayversion", - "version=2.2.0.0", + "version=2.7.0", "Date", - "Thu, 05 Dec 2019 23:03:51 GMT", + "Thu, 12 Dec 2019 23:26:55 GMT", "Connection", "close" ] @@ -817,21 +885,21 @@ { "scope": "https://localhost:8081", "method": "GET", - "path": "/dbs/test-db/colls/bot-storage/docs/pocoStoreItem", + "path": "/dbs/test-db/colls/bot-storage/docs/pocoItem", "body": "", "status": 200, "response": { - "id": "pocoStoreItem", - "realId": "pocoStoreItem", + "id": "pocoItem", + "realId": "pocoItem", "document": { "id": 1, - "count": 2 + "count": 123 }, - "_rid": "-gMpAKxPACsEAAAAAAAAAA==", - "_self": "dbs/-gMpAA==/colls/-gMpAKxPACs=/docs/-gMpAKxPACsEAAAAAAAAAA==/", - "_etag": "\"00000000-0000-0000-abc0-42bcc49e01d5\"", + "_rid": "gzFFAPwkVIUEAAAAAAAAAA==", + "_self": "dbs/gzFFAA==/colls/gzFFAPwkVIU=/docs/gzFFAPwkVIUEAAAAAAAAAA==/", + "_etag": "\"00000000-0000-0000-b143-a4c9a96801d5\"", "_attachments": "attachments/", - "_ts": 1575587031 + "_ts": 1576193216 }, "rawHeaders": [ "Cache-Control", @@ -843,7 +911,7 @@ "Content-Type", "application/json", "Content-Location", - "https://localhost:8081/dbs/test-db/colls/bot-storage/docs/pocoStoreItem", + "https://localhost:8081/dbs/test-db/colls/bot-storage/docs/pocoItem", "Server", "Microsoft-HTTPAPI/2.0", "Access-Control-Allow-Origin", @@ -851,23 +919,23 @@ "Access-Control-Allow-Credentials", "true", "x-ms-last-state-change-utc", - "Thu, 05 Dec 2019 01:23:43.997 GMT", + "Wed, 11 Dec 2019 19:46:09.043 GMT", "etag", - "\"00000000-0000-0000-abc0-42bcc49e01d5\"", + "\"00000000-0000-0000-b143-a4c9a96801d5\"", "x-ms-resource-quota", "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", "x-ms-resource-usage", "documentSize=0;documentsSize=0;documentsCount=5;collectionSize=5;", "lsn", - "59", + "4042", "x-ms-schemaversion", - "1.7", + "1.8", "x-ms-alt-content-path", "dbs/test-db/colls/bot-storage", "x-ms-content-path", - "-gMpAKxPACs=", + "gzFFAPwkVIU=", "x-ms-quorum-acked-lsn", - "59", + "4042", "x-ms-current-write-quorum", "1", "x-ms-current-replica-set-size", @@ -879,27 +947,27 @@ "x-ms-number-of-read-regions", "0", "x-ms-item-lsn", - "58", + "4042", "x-ms-transport-request-id", - "136", + "1373", "x-ms-cosmos-llsn", - "59", + "4042", "x-ms-cosmos-quorum-acked-llsn", - "59", + "4042", "x-ms-cosmos-item-llsn", - "58", + "4042", "x-ms-session-token", - "0:-1#59", + "0:-1#4042", "x-ms-request-charge", "1", "x-ms-serviceversion", - "version=2.2.0.0", + "version=2.7.0.0", "x-ms-activity-id", - "3731f1fa-7c3f-406c-8c7e-b28903b7985b", + "64a87cc4-89e8-46b7-8ed0-54b7389634eb", "x-ms-gatewayversion", - "version=2.2.0.0", + "version=2.7.0", "Date", - "Thu, 05 Dec 2019 23:03:51 GMT", + "Thu, 12 Dec 2019 23:26:55 GMT", "Connection", "close" ] @@ -907,21 +975,21 @@ { "scope": "https://localhost:8081", "method": "GET", - "path": "/dbs/test-db/colls/bot-storage/docs/pocoItem", + "path": "/dbs/test-db/colls/bot-storage/docs/pocoStoreItem", "body": "", "status": 200, "response": { - "id": "pocoItem", - "realId": "pocoItem", + "id": "pocoStoreItem", + "realId": "pocoStoreItem", "document": { "id": 1, - "count": 123 + "count": 2 }, - "_rid": "-gMpAKxPACsFAAAAAAAAAA==", - "_self": "dbs/-gMpAA==/colls/-gMpAKxPACs=/docs/-gMpAKxPACsFAAAAAAAAAA==/", - "_etag": "\"00000000-0000-0000-abc0-42c0d5ac01d5\"", + "_rid": "gzFFAPwkVIUFAAAAAAAAAA==", + "_self": "dbs/gzFFAA==/colls/gzFFAPwkVIU=/docs/gzFFAPwkVIUFAAAAAAAAAA==/", + "_etag": "\"00000000-0000-0000-b143-a4c502fc01d5\"", "_attachments": "attachments/", - "_ts": 1575587031 + "_ts": 1576193216 }, "rawHeaders": [ "Cache-Control", @@ -933,7 +1001,7 @@ "Content-Type", "application/json", "Content-Location", - "https://localhost:8081/dbs/test-db/colls/bot-storage/docs/pocoItem", + "https://localhost:8081/dbs/test-db/colls/bot-storage/docs/pocoStoreItem", "Server", "Microsoft-HTTPAPI/2.0", "Access-Control-Allow-Origin", @@ -941,23 +1009,23 @@ "Access-Control-Allow-Credentials", "true", "x-ms-last-state-change-utc", - "Thu, 05 Dec 2019 01:23:43.997 GMT", + "Wed, 11 Dec 2019 19:46:09.043 GMT", "etag", - "\"00000000-0000-0000-abc0-42c0d5ac01d5\"", + "\"00000000-0000-0000-b143-a4c502fc01d5\"", "x-ms-resource-quota", "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", "x-ms-resource-usage", "documentSize=0;documentsSize=0;documentsCount=5;collectionSize=5;", "lsn", - "59", + "4042", "x-ms-schemaversion", - "1.7", + "1.8", "x-ms-alt-content-path", "dbs/test-db/colls/bot-storage", "x-ms-content-path", - "-gMpAKxPACs=", + "gzFFAPwkVIU=", "x-ms-quorum-acked-lsn", - "59", + "4042", "x-ms-current-write-quorum", "1", "x-ms-current-replica-set-size", @@ -969,27 +1037,27 @@ "x-ms-number-of-read-regions", "0", "x-ms-item-lsn", - "59", + "4041", "x-ms-transport-request-id", - "137", + "1374", "x-ms-cosmos-llsn", - "59", + "4042", "x-ms-cosmos-quorum-acked-llsn", - "59", + "4042", "x-ms-cosmos-item-llsn", - "59", + "4041", "x-ms-session-token", - "0:-1#59", + "0:-1#4042", "x-ms-request-charge", "1", "x-ms-serviceversion", - "version=2.2.0.0", + "version=2.7.0.0", "x-ms-activity-id", - "8d8eedbc-5378-469c-8eac-0bdf52f3afa4", + "b250684e-5961-4d5e-a55b-99a530be84df", "x-ms-gatewayversion", - "version=2.2.0.0", + "version=2.7.0", "Date", - "Thu, 05 Dec 2019 23:03:51 GMT", + "Thu, 12 Dec 2019 23:26:55 GMT", "Connection", "close" ] @@ -1014,11 +1082,11 @@ "id": 1, "count": 100 }, - "_rid": "-gMpAKxPACsFAAAAAAAAAA==", - "_self": "dbs/-gMpAA==/colls/-gMpAKxPACs=/docs/-gMpAKxPACsFAAAAAAAAAA==/", - "_etag": "\"00000000-0000-0000-abc0-42c5166801d5\"", + "_rid": "gzFFAPwkVIUEAAAAAAAAAA==", + "_self": "dbs/gzFFAA==/colls/gzFFAPwkVIU=/docs/gzFFAPwkVIUEAAAAAAAAAA==/", + "_etag": "\"00000000-0000-0000-b143-a4d08f2b01d5\"", "_attachments": "attachments/", - "_ts": 1575587031 + "_ts": 1576193216 }, "rawHeaders": [ "Cache-Control", @@ -1036,23 +1104,23 @@ "Access-Control-Allow-Credentials", "true", "x-ms-last-state-change-utc", - "Thu, 05 Dec 2019 01:23:43.997 GMT", + "Wed, 11 Dec 2019 19:46:09.043 GMT", "etag", - "\"00000000-0000-0000-abc0-42c5166801d5\"", + "\"00000000-0000-0000-b143-a4d08f2b01d5\"", "x-ms-resource-quota", "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", "x-ms-resource-usage", "documentSize=0;documentsSize=0;documentsCount=5;collectionSize=5;", "lsn", - "60", + "4043", "x-ms-schemaversion", - "1.7", + "1.8", "x-ms-alt-content-path", "dbs/test-db/colls/bot-storage", "x-ms-content-path", - "-gMpAKxPACs=", + "gzFFAPwkVIU=", "x-ms-quorum-acked-lsn", - "59", + "4042", "x-ms-current-write-quorum", "1", "x-ms-current-replica-set-size", @@ -1064,23 +1132,23 @@ "x-ms-number-of-read-regions", "0", "x-ms-transport-request-id", - "138", + "1375", "x-ms-cosmos-llsn", - "60", + "4043", "x-ms-cosmos-quorum-acked-llsn", - "59", + "4042", "x-ms-session-token", - "0:-1#60", + "0:-1#4043", "x-ms-request-charge", "10.67", "x-ms-serviceversion", - "version=2.2.0.0", + "version=2.7.0.0", "x-ms-activity-id", - "9c244f21-3cf6-4f43-aa04-fab257387935", + "d070dd6e-22f6-4f06-970d-d1efa01cd6f5", "x-ms-gatewayversion", - "version=2.2.0.0", + "version=2.7.0", "Date", - "Thu, 05 Dec 2019 23:03:51 GMT", + "Thu, 12 Dec 2019 23:26:55 GMT", "Connection", "close" ] @@ -1105,11 +1173,11 @@ "id": 1, "count": 100 }, - "_rid": "-gMpAKxPACsEAAAAAAAAAA==", - "_self": "dbs/-gMpAA==/colls/-gMpAKxPACs=/docs/-gMpAKxPACsEAAAAAAAAAA==/", - "_etag": "\"00000000-0000-0000-abc0-42c56dc601d5\"", + "_rid": "gzFFAPwkVIUFAAAAAAAAAA==", + "_self": "dbs/gzFFAA==/colls/gzFFAPwkVIU=/docs/gzFFAPwkVIUFAAAAAAAAAA==/", + "_etag": "\"00000000-0000-0000-b143-a4d0f87201d5\"", "_attachments": "attachments/", - "_ts": 1575587031 + "_ts": 1576193216 }, "rawHeaders": [ "Cache-Control", @@ -1127,23 +1195,23 @@ "Access-Control-Allow-Credentials", "true", "x-ms-last-state-change-utc", - "Thu, 05 Dec 2019 01:23:43.997 GMT", + "Wed, 11 Dec 2019 19:46:09.043 GMT", "etag", - "\"00000000-0000-0000-abc0-42c56dc601d5\"", + "\"00000000-0000-0000-b143-a4d0f87201d5\"", "x-ms-resource-quota", "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", "x-ms-resource-usage", "documentSize=0;documentsSize=0;documentsCount=5;collectionSize=5;", "lsn", - "61", + "4044", "x-ms-schemaversion", - "1.7", + "1.8", "x-ms-alt-content-path", "dbs/test-db/colls/bot-storage", "x-ms-content-path", - "-gMpAKxPACs=", + "gzFFAPwkVIU=", "x-ms-quorum-acked-lsn", - "60", + "4043", "x-ms-current-write-quorum", "1", "x-ms-current-replica-set-size", @@ -1155,23 +1223,23 @@ "x-ms-number-of-read-regions", "0", "x-ms-transport-request-id", - "139", + "1376", "x-ms-cosmos-llsn", - "61", + "4044", "x-ms-cosmos-quorum-acked-llsn", - "60", + "4043", "x-ms-session-token", - "0:-1#61", + "0:-1#4044", "x-ms-request-charge", "10.67", "x-ms-serviceversion", - "version=2.2.0.0", + "version=2.7.0.0", "x-ms-activity-id", - "4d0e758a-8bc8-4cb3-a656-a228b119f454", + "d468eaac-ae65-435c-8c41-be549f7e10a3", "x-ms-gatewayversion", - "version=2.2.0.0", + "version=2.7.0", "Date", - "Thu, 05 Dec 2019 23:03:51 GMT", + "Thu, 12 Dec 2019 23:26:55 GMT", "Connection", "close" ] @@ -1179,21 +1247,21 @@ { "scope": "https://localhost:8081", "method": "GET", - "path": "/dbs/test-db/colls/bot-storage/docs/pocoStoreItem", + "path": "/dbs/test-db/colls/bot-storage/docs/pocoItem", "body": "", "status": 200, "response": { - "id": "pocoStoreItem", - "realId": "pocoStoreItem", + "id": "pocoItem", + "realId": "pocoItem", "document": { "id": 1, "count": 100 }, - "_rid": "-gMpAKxPACsEAAAAAAAAAA==", - "_self": "dbs/-gMpAA==/colls/-gMpAKxPACs=/docs/-gMpAKxPACsEAAAAAAAAAA==/", - "_etag": "\"00000000-0000-0000-abc0-42c56dc601d5\"", + "_rid": "gzFFAPwkVIUEAAAAAAAAAA==", + "_self": "dbs/gzFFAA==/colls/gzFFAPwkVIU=/docs/gzFFAPwkVIUEAAAAAAAAAA==/", + "_etag": "\"00000000-0000-0000-b143-a4d08f2b01d5\"", "_attachments": "attachments/", - "_ts": 1575587031 + "_ts": 1576193216 }, "rawHeaders": [ "Cache-Control", @@ -1205,7 +1273,7 @@ "Content-Type", "application/json", "Content-Location", - "https://localhost:8081/dbs/test-db/colls/bot-storage/docs/pocoStoreItem", + "https://localhost:8081/dbs/test-db/colls/bot-storage/docs/pocoItem", "Server", "Microsoft-HTTPAPI/2.0", "Access-Control-Allow-Origin", @@ -1213,23 +1281,23 @@ "Access-Control-Allow-Credentials", "true", "x-ms-last-state-change-utc", - "Thu, 05 Dec 2019 01:23:43.997 GMT", + "Wed, 11 Dec 2019 19:46:09.043 GMT", "etag", - "\"00000000-0000-0000-abc0-42c56dc601d5\"", + "\"00000000-0000-0000-b143-a4d08f2b01d5\"", "x-ms-resource-quota", "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", "x-ms-resource-usage", "documentSize=0;documentsSize=0;documentsCount=5;collectionSize=5;", "lsn", - "61", + "4044", "x-ms-schemaversion", - "1.7", + "1.8", "x-ms-alt-content-path", "dbs/test-db/colls/bot-storage", "x-ms-content-path", - "-gMpAKxPACs=", + "gzFFAPwkVIU=", "x-ms-quorum-acked-lsn", - "61", + "4044", "x-ms-current-write-quorum", "1", "x-ms-current-replica-set-size", @@ -1241,27 +1309,27 @@ "x-ms-number-of-read-regions", "0", "x-ms-item-lsn", - "61", + "4043", "x-ms-transport-request-id", - "141", + "1377", "x-ms-cosmos-llsn", - "61", + "4044", "x-ms-cosmos-quorum-acked-llsn", - "61", + "4044", "x-ms-cosmos-item-llsn", - "61", + "4043", "x-ms-session-token", - "0:-1#61", + "0:-1#4044", "x-ms-request-charge", "1", "x-ms-serviceversion", - "version=2.2.0.0", + "version=2.7.0.0", "x-ms-activity-id", - "5b3716c7-677b-4e7c-9b7a-565077ca4115", + "1fa9d7b6-1a91-4394-a1b2-2fd11e62e579", "x-ms-gatewayversion", - "version=2.2.0.0", + "version=2.7.0", "Date", - "Thu, 05 Dec 2019 23:03:51 GMT", + "Thu, 12 Dec 2019 23:26:55 GMT", "Connection", "close" ] @@ -1269,21 +1337,21 @@ { "scope": "https://localhost:8081", "method": "GET", - "path": "/dbs/test-db/colls/bot-storage/docs/pocoItem", + "path": "/dbs/test-db/colls/bot-storage/docs/pocoStoreItem", "body": "", "status": 200, "response": { - "id": "pocoItem", - "realId": "pocoItem", + "id": "pocoStoreItem", + "realId": "pocoStoreItem", "document": { "id": 1, "count": 100 }, - "_rid": "-gMpAKxPACsFAAAAAAAAAA==", - "_self": "dbs/-gMpAA==/colls/-gMpAKxPACs=/docs/-gMpAKxPACsFAAAAAAAAAA==/", - "_etag": "\"00000000-0000-0000-abc0-42c5166801d5\"", + "_rid": "gzFFAPwkVIUFAAAAAAAAAA==", + "_self": "dbs/gzFFAA==/colls/gzFFAPwkVIU=/docs/gzFFAPwkVIUFAAAAAAAAAA==/", + "_etag": "\"00000000-0000-0000-b143-a4d0f87201d5\"", "_attachments": "attachments/", - "_ts": 1575587031 + "_ts": 1576193216 }, "rawHeaders": [ "Cache-Control", @@ -1295,7 +1363,7 @@ "Content-Type", "application/json", "Content-Location", - "https://localhost:8081/dbs/test-db/colls/bot-storage/docs/pocoItem", + "https://localhost:8081/dbs/test-db/colls/bot-storage/docs/pocoStoreItem", "Server", "Microsoft-HTTPAPI/2.0", "Access-Control-Allow-Origin", @@ -1303,23 +1371,23 @@ "Access-Control-Allow-Credentials", "true", "x-ms-last-state-change-utc", - "Thu, 05 Dec 2019 01:23:43.997 GMT", + "Wed, 11 Dec 2019 19:46:09.043 GMT", "etag", - "\"00000000-0000-0000-abc0-42c5166801d5\"", + "\"00000000-0000-0000-b143-a4d0f87201d5\"", "x-ms-resource-quota", "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", "x-ms-resource-usage", "documentSize=0;documentsSize=0;documentsCount=5;collectionSize=5;", "lsn", - "61", + "4044", "x-ms-schemaversion", - "1.7", + "1.8", "x-ms-alt-content-path", "dbs/test-db/colls/bot-storage", "x-ms-content-path", - "-gMpAKxPACs=", + "gzFFAPwkVIU=", "x-ms-quorum-acked-lsn", - "61", + "4044", "x-ms-current-write-quorum", "1", "x-ms-current-replica-set-size", @@ -1331,27 +1399,27 @@ "x-ms-number-of-read-regions", "0", "x-ms-item-lsn", - "60", + "4044", "x-ms-transport-request-id", - "140", + "1378", "x-ms-cosmos-llsn", - "61", + "4044", "x-ms-cosmos-quorum-acked-llsn", - "61", + "4044", "x-ms-cosmos-item-llsn", - "60", + "4044", "x-ms-session-token", - "0:-1#61", + "0:-1#4044", "x-ms-request-charge", "1", "x-ms-serviceversion", - "version=2.2.0.0", + "version=2.7.0.0", "x-ms-activity-id", - "4cb94f4f-19dd-4bb5-80f3-6cd8ed85ce0a", + "6582dddc-c14e-4bd6-923d-7d0ecb732269", "x-ms-gatewayversion", - "version=2.2.0.0", + "version=2.7.0", "Date", - "Thu, 05 Dec 2019 23:03:51 GMT", + "Thu, 12 Dec 2019 23:26:55 GMT", "Connection", "close" ] @@ -1369,11 +1437,11 @@ "id": 1, "count": 100 }, - "_rid": "-gMpAKxPACsEAAAAAAAAAA==", - "_self": "dbs/-gMpAA==/colls/-gMpAKxPACs=/docs/-gMpAKxPACsEAAAAAAAAAA==/", - "_etag": "\"00000000-0000-0000-abc0-42c56dc601d5\"", + "_rid": "gzFFAPwkVIUFAAAAAAAAAA==", + "_self": "dbs/gzFFAA==/colls/gzFFAPwkVIU=/docs/gzFFAPwkVIUFAAAAAAAAAA==/", + "_etag": "\"00000000-0000-0000-b143-a4d0f87201d5\"", "_attachments": "attachments/", - "_ts": 1575587031 + "_ts": 1576193216 }, "rawHeaders": [ "Cache-Control", @@ -1393,23 +1461,23 @@ "Access-Control-Allow-Credentials", "true", "x-ms-last-state-change-utc", - "Thu, 05 Dec 2019 01:23:43.997 GMT", + "Wed, 11 Dec 2019 19:46:09.043 GMT", "etag", - "\"00000000-0000-0000-abc0-42c56dc601d5\"", + "\"00000000-0000-0000-b143-a4d0f87201d5\"", "x-ms-resource-quota", "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", "x-ms-resource-usage", "documentSize=0;documentsSize=0;documentsCount=5;collectionSize=5;", "lsn", - "61", + "4044", "x-ms-schemaversion", - "1.7", + "1.8", "x-ms-alt-content-path", "dbs/test-db/colls/bot-storage", "x-ms-content-path", - "-gMpAKxPACs=", + "gzFFAPwkVIU=", "x-ms-quorum-acked-lsn", - "61", + "4044", "x-ms-current-write-quorum", "1", "x-ms-current-replica-set-size", @@ -1421,27 +1489,27 @@ "x-ms-number-of-read-regions", "0", "x-ms-item-lsn", - "61", + "4044", "x-ms-transport-request-id", - "142", + "1379", "x-ms-cosmos-llsn", - "61", + "4044", "x-ms-cosmos-quorum-acked-llsn", - "61", + "4044", "x-ms-cosmos-item-llsn", - "61", + "4044", "x-ms-session-token", - "0:-1#61", + "0:-1#4044", "x-ms-request-charge", "1", "x-ms-serviceversion", - "version=2.2.0.0", + "version=2.7.0.0", "x-ms-activity-id", - "48dd375f-339b-49bd-8110-80df0cb598f7", + "854ed749-c0cf-40e6-b101-b92be9c7db91", "x-ms-gatewayversion", - "version=2.2.0.0", + "version=2.7.0", "Date", - "Thu, 05 Dec 2019 23:03:51 GMT", + "Thu, 12 Dec 2019 23:26:55 GMT", "Connection", "close" ] @@ -1466,11 +1534,11 @@ "id": 1, "count": 100 }, - "_rid": "-gMpAKxPACsEAAAAAAAAAA==", - "_self": "dbs/-gMpAA==/colls/-gMpAKxPACs=/docs/-gMpAKxPACsEAAAAAAAAAA==/", - "_etag": "\"00000000-0000-0000-abc0-42ca13a801d5\"", + "_rid": "gzFFAPwkVIUFAAAAAAAAAA==", + "_self": "dbs/gzFFAA==/colls/gzFFAPwkVIU=/docs/gzFFAPwkVIUFAAAAAAAAAA==/", + "_etag": "\"00000000-0000-0000-b143-a4d71a8d01d5\"", "_attachments": "attachments/", - "_ts": 1575587031 + "_ts": 1576193216 }, "rawHeaders": [ "Cache-Control", @@ -1488,23 +1556,23 @@ "Access-Control-Allow-Credentials", "true", "x-ms-last-state-change-utc", - "Thu, 05 Dec 2019 01:23:43.997 GMT", + "Wed, 11 Dec 2019 19:46:09.043 GMT", "etag", - "\"00000000-0000-0000-abc0-42ca13a801d5\"", + "\"00000000-0000-0000-b143-a4d71a8d01d5\"", "x-ms-resource-quota", "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", "x-ms-resource-usage", "documentSize=0;documentsSize=0;documentsCount=5;collectionSize=5;", "lsn", - "62", + "4045", "x-ms-schemaversion", - "1.7", + "1.8", "x-ms-alt-content-path", "dbs/test-db/colls/bot-storage", "x-ms-content-path", - "-gMpAKxPACs=", + "gzFFAPwkVIU=", "x-ms-quorum-acked-lsn", - "61", + "4044", "x-ms-current-write-quorum", "1", "x-ms-current-replica-set-size", @@ -1516,23 +1584,23 @@ "x-ms-number-of-read-regions", "0", "x-ms-transport-request-id", - "143", + "1380", "x-ms-cosmos-llsn", - "62", + "4045", "x-ms-cosmos-quorum-acked-llsn", - "61", + "4044", "x-ms-session-token", - "0:-1#62", + "0:-1#4045", "x-ms-request-charge", "10.29", "x-ms-serviceversion", - "version=2.2.0.0", + "version=2.7.0.0", "x-ms-activity-id", - "e0a9b645-a792-4200-82a4-8030459bd6b1", + "68a850bf-0604-4752-bcde-84ec0fe5cdd6", "x-ms-gatewayversion", - "version=2.2.0.0", + "version=2.7.0", "Date", - "Thu, 05 Dec 2019 23:03:51 GMT", + "Thu, 12 Dec 2019 23:26:55 GMT", "Connection", "close" ] @@ -1550,11 +1618,11 @@ "id": 1, "count": 100 }, - "_rid": "-gMpAKxPACsFAAAAAAAAAA==", - "_self": "dbs/-gMpAA==/colls/-gMpAKxPACs=/docs/-gMpAKxPACsFAAAAAAAAAA==/", - "_etag": "\"00000000-0000-0000-abc0-42c5166801d5\"", + "_rid": "gzFFAPwkVIUEAAAAAAAAAA==", + "_self": "dbs/gzFFAA==/colls/gzFFAPwkVIU=/docs/gzFFAPwkVIUEAAAAAAAAAA==/", + "_etag": "\"00000000-0000-0000-b143-a4d08f2b01d5\"", "_attachments": "attachments/", - "_ts": 1575587031 + "_ts": 1576193216 }, "rawHeaders": [ "Cache-Control", @@ -1574,23 +1642,23 @@ "Access-Control-Allow-Credentials", "true", "x-ms-last-state-change-utc", - "Thu, 05 Dec 2019 01:23:43.997 GMT", + "Wed, 11 Dec 2019 19:46:09.043 GMT", "etag", - "\"00000000-0000-0000-abc0-42c5166801d5\"", + "\"00000000-0000-0000-b143-a4d08f2b01d5\"", "x-ms-resource-quota", "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", "x-ms-resource-usage", "documentSize=0;documentsSize=0;documentsCount=5;collectionSize=5;", "lsn", - "62", + "4045", "x-ms-schemaversion", - "1.7", + "1.8", "x-ms-alt-content-path", "dbs/test-db/colls/bot-storage", "x-ms-content-path", - "-gMpAKxPACs=", + "gzFFAPwkVIU=", "x-ms-quorum-acked-lsn", - "62", + "4045", "x-ms-current-write-quorum", "1", "x-ms-current-replica-set-size", @@ -1602,27 +1670,27 @@ "x-ms-number-of-read-regions", "0", "x-ms-item-lsn", - "60", + "4043", "x-ms-transport-request-id", - "144", + "1381", "x-ms-cosmos-llsn", - "62", + "4045", "x-ms-cosmos-quorum-acked-llsn", - "62", + "4045", "x-ms-cosmos-item-llsn", - "60", + "4043", "x-ms-session-token", - "0:-1#62", + "0:-1#4045", "x-ms-request-charge", "1", "x-ms-serviceversion", - "version=2.2.0.0", + "version=2.7.0.0", "x-ms-activity-id", - "ac1bc345-a1f9-4f7e-aea9-e14864ca39d0", + "87b3740d-6545-4e0f-9f39-78522703ff4b", "x-ms-gatewayversion", - "version=2.2.0.0", + "version=2.7.0", "Date", - "Thu, 05 Dec 2019 23:03:51 GMT", + "Thu, 12 Dec 2019 23:26:55 GMT", "Connection", "close" ] @@ -1640,11 +1708,11 @@ "id": 1, "count": 100 }, - "_rid": "-gMpAKxPACsEAAAAAAAAAA==", - "_self": "dbs/-gMpAA==/colls/-gMpAKxPACs=/docs/-gMpAKxPACsEAAAAAAAAAA==/", - "_etag": "\"00000000-0000-0000-abc0-42ca13a801d5\"", + "_rid": "gzFFAPwkVIUFAAAAAAAAAA==", + "_self": "dbs/gzFFAA==/colls/gzFFAPwkVIU=/docs/gzFFAPwkVIUFAAAAAAAAAA==/", + "_etag": "\"00000000-0000-0000-b143-a4d71a8d01d5\"", "_attachments": "attachments/", - "_ts": 1575587031 + "_ts": 1576193216 }, "rawHeaders": [ "Cache-Control", @@ -1664,23 +1732,23 @@ "Access-Control-Allow-Credentials", "true", "x-ms-last-state-change-utc", - "Thu, 05 Dec 2019 01:23:43.997 GMT", + "Wed, 11 Dec 2019 19:46:09.043 GMT", "etag", - "\"00000000-0000-0000-abc0-42ca13a801d5\"", + "\"00000000-0000-0000-b143-a4d71a8d01d5\"", "x-ms-resource-quota", "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", "x-ms-resource-usage", "documentSize=0;documentsSize=0;documentsCount=5;collectionSize=5;", "lsn", - "62", + "4045", "x-ms-schemaversion", - "1.7", + "1.8", "x-ms-alt-content-path", "dbs/test-db/colls/bot-storage", "x-ms-content-path", - "-gMpAKxPACs=", + "gzFFAPwkVIU=", "x-ms-quorum-acked-lsn", - "62", + "4045", "x-ms-current-write-quorum", "1", "x-ms-current-replica-set-size", @@ -1692,27 +1760,27 @@ "x-ms-number-of-read-regions", "0", "x-ms-item-lsn", - "62", + "4045", "x-ms-transport-request-id", - "145", + "1382", "x-ms-cosmos-llsn", - "62", + "4045", "x-ms-cosmos-quorum-acked-llsn", - "62", + "4045", "x-ms-cosmos-item-llsn", - "62", + "4045", "x-ms-session-token", - "0:-1#62", + "0:-1#4045", "x-ms-request-charge", "1", "x-ms-serviceversion", - "version=2.2.0.0", + "version=2.7.0.0", "x-ms-activity-id", - "02b60408-4cdc-470f-974c-aca92ab58a2c", + "895e4e38-955e-4ac8-b334-380d37206be8", "x-ms-gatewayversion", - "version=2.2.0.0", + "version=2.7.0", "Date", - "Thu, 05 Dec 2019 23:03:51 GMT", + "Thu, 12 Dec 2019 23:26:55 GMT", "Connection", "close" ] diff --git a/libraries/botbuilder-azure/tests/TestData/CosmosDbPartitionedStorage/should_throw_on_invalid_options.json b/libraries/botbuilder-azure/tests/TestData/CosmosDbPartitionedStorage - Constructor Tests/passes_cosmosClientOptions_to_CosmosClient.json similarity index 69% rename from libraries/botbuilder-azure/tests/TestData/CosmosDbPartitionedStorage/should_throw_on_invalid_options.json rename to libraries/botbuilder-azure/tests/TestData/CosmosDbPartitionedStorage - Constructor Tests/passes_cosmosClientOptions_to_CosmosClient.json index d766958cc5..a384ca9e24 100644 --- a/libraries/botbuilder-azure/tests/TestData/CosmosDbPartitionedStorage/should_throw_on_invalid_options.json +++ b/libraries/botbuilder-azure/tests/TestData/CosmosDbPartitionedStorage - Constructor Tests/passes_cosmosClientOptions_to_CosmosClient.json @@ -41,7 +41,7 @@ "primaryReadCoefficient": 1, "secondaryReadCoefficient": 1 }, - "queryEngineConfiguration": "{\"maxSqlQueryInputLength\":262144,\"maxJoinsPerSqlQuery\":5,\"maxLogicalAndPerSqlQuery\":500,\"maxLogicalOrPerSqlQuery\":500,\"maxUdfRefPerSqlQuery\":10,\"maxInExpressionItemsCount\":16000,\"queryMaxInMemorySortDocumentCount\":500,\"maxQueryRequestTimeoutFraction\":0.9,\"sqlAllowNonFiniteNumbers\":false,\"sqlAllowAggregateFunctions\":true,\"sqlAllowSubQuery\":true,\"sqlAllowScalarSubQuery\":true,\"allowNewKeywords\":true,\"sqlAllowLike\":false,\"sqlAllowGroupByClause\":false,\"maxSpatialQueryCells\":12,\"spatialMaxGeometryPointCount\":256,\"sqlAllowTop\":true,\"enableSpatialIndexing\":true}" + "queryEngineConfiguration": "{\"maxSqlQueryInputLength\":262144,\"maxJoinsPerSqlQuery\":5,\"maxLogicalAndPerSqlQuery\":500,\"maxLogicalOrPerSqlQuery\":500,\"maxUdfRefPerSqlQuery\":10,\"maxInExpressionItemsCount\":16000,\"queryMaxInMemorySortDocumentCount\":500,\"maxQueryRequestTimeoutFraction\":0.9,\"sqlAllowNonFiniteNumbers\":false,\"sqlAllowAggregateFunctions\":true,\"sqlAllowSubQuery\":true,\"sqlAllowScalarSubQuery\":true,\"allowNewKeywords\":true,\"sqlAllowLike\":false,\"sqlAllowGroupByClause\":true,\"maxSpatialQueryCells\":12,\"spatialMaxGeometryPointCount\":256,\"sqlAllowTop\":true,\"enableSpatialIndexing\":true}" }, "rawHeaders": [ "Cache-Control", @@ -71,9 +71,9 @@ "x-ms-databaseaccount-provisioned-mb", "0", "x-ms-gatewayversion", - "version=2.2.0.0", + "version=2.7.0", "Date", - "Thu, 05 Dec 2019 23:03:51 GMT", + "Thu, 12 Dec 2019 23:26:55 GMT", "Connection", "close" ] @@ -86,7 +86,7 @@ "status": 404, "response": { "code": "NotFound", - "message": "Message: {\"Errors\":[\"Resource Not Found\"]}\r\nActivityId: 1d9449d4-d6cc-4e90-8fb7-bdc4d6b59956, Request URI: /apps/DocDbApp/services/DocDbMaster0/partitions/780e44f4-38c8-11e6-8106-8cdcd42c33be/replicas/1p/, RequestStats: \r\nRequestStartTime: 2019-12-05T23:03:51.5007771Z, RequestEndTime: 2019-12-05T23:03:51.5017775Z, Number of regions attempted: 1\r\nResponseTime: 2019-12-05T23:03:51.5017775Z, StoreResult: StorePhysicalAddress: rntbd://127.0.0.1:10251/apps/DocDbApp/services/DocDbMaster0/partitions/780e44f4-38c8-11e6-8106-8cdcd42c33be/replicas/1p/, LSN: 18, GlobalCommittedLsn: -1, PartitionKeyRangeId: , IsValid: True, StatusCode: 404, SubStatusCode: 0, RequestCharge: 1, ItemLSN: -1, SessionToken: -1#18, UsingLocalLSN: False, TransportException: null, ResourceType: Collection, OperationType: Read\r\nResponseTime: 2019-12-05T23:03:51.5017775Z, StoreResult: StorePhysicalAddress: rntbd://127.0.0.1:10251/apps/DocDbApp/services/DocDbMaster0/partitions/780e44f4-38c8-11e6-8106-8cdcd42c33be/replicas/1p/, LSN: 18, GlobalCommittedLsn: -1, PartitionKeyRangeId: , IsValid: True, StatusCode: 404, SubStatusCode: 0, RequestCharge: 1, ItemLSN: -1, SessionToken: -1#18, UsingLocalLSN: False, TransportException: null, ResourceType: Collection, OperationType: Read\r\n, SDK: Microsoft.Azure.Documents.Common/2.2.0.0" + "message": "Message: {\"Errors\":[\"Resource Not Found\"]}\r\nActivityId: 3ad19961-2314-4883-a907-1e3dcecf6b57, Request URI: /apps/DocDbApp/services/DocDbMaster0/partitions/780e44f4-38c8-11e6-8106-8cdcd42c33be/replicas/1p/, RequestStats: \r\nRequestStartTime: 2019-12-12T23:26:55.5956516Z, RequestEndTime: 2019-12-12T23:26:55.5976478Z, Number of regions attempted:1\r\nResponseTime: 2019-12-12T23:26:55.5976478Z, StoreResult: StorePhysicalAddress: rntbd://127.0.0.1:10251/apps/DocDbApp/services/DocDbMaster0/partitions/780e44f4-38c8-11e6-8106-8cdcd42c33be/replicas/1p/, LSN: 3397, GlobalCommittedLsn: -1, PartitionKeyRangeId: , IsValid: True, StatusCode: 404, SubStatusCode: 0, RequestCharge: 1, ItemLSN: -1, SessionToken: -1#3397, UsingLocalLSN: False, TransportException: null, ResourceType: Collection, OperationType: Read\r\nResponseTime: 2019-12-12T23:26:55.5976478Z, StoreResult: StorePhysicalAddress: rntbd://127.0.0.1:10251/apps/DocDbApp/services/DocDbMaster0/partitions/780e44f4-38c8-11e6-8106-8cdcd42c33be/replicas/1p/, LSN: 3397, GlobalCommittedLsn: -1, PartitionKeyRangeId: , IsValid: True, StatusCode: 404, SubStatusCode: 0, RequestCharge: 1, ItemLSN: -1, SessionToken: -1#3397, UsingLocalLSN: False, TransportException: null, ResourceType: Collection, OperationType: Read\r\n, SDK: Microsoft.Azure.Documents.Common/2.7.0" }, "rawHeaders": [ "Transfer-Encoding", @@ -102,13 +102,13 @@ "Access-Control-Allow-Credentials", "true", "x-ms-last-state-change-utc", - "Thu, 05 Dec 2019 01:23:40.951 GMT", + "Wed, 11 Dec 2019 19:45:58.020 GMT", "lsn", - "18", + "3397", "x-ms-schemaversion", - "1.7", + "1.8", "x-ms-quorum-acked-lsn", - "18", + "3397", "x-ms-current-write-quorum", "1", "x-ms-current-replica-set-size", @@ -120,23 +120,23 @@ "x-ms-number-of-read-regions", "0", "x-ms-transport-request-id", - "1464", + "5093", "x-ms-cosmos-llsn", - "18", + "3397", "x-ms-cosmos-quorum-acked-llsn", - "18", + "3397", "x-ms-session-token", - "0:-1#18", + "0:-1#3397", "x-ms-request-charge", "2", "x-ms-serviceversion", - "version=2.2.0.0", + "version=2.7.0.0", "x-ms-activity-id", - "1d9449d4-d6cc-4e90-8fb7-bdc4d6b59956", + "3ad19961-2314-4883-a907-1e3dcecf6b57", "x-ms-gatewayversion", - "version=2.2.0.0", + "version=2.7.0", "Date", - "Thu, 05 Dec 2019 23:03:51 GMT", + "Thu, 12 Dec 2019 23:26:55 GMT", "Connection", "close" ] @@ -149,7 +149,7 @@ "status": 404, "response": { "code": "NotFound", - "message": "Message: {\"Errors\":[\"Resource Not Found\"]}\r\nActivityId: 7050b995-6f37-4516-ab39-b9f9ece4e940, Request URI: /apps/DocDbApp/services/DocDbMaster0/partitions/780e44f4-38c8-11e6-8106-8cdcd42c33be/replicas/1p/, RequestStats: \r\nRequestStartTime: 2019-12-05T23:03:51.5097773Z, RequestEndTime: 2019-12-05T23:03:51.5107771Z, Number of regions attempted: 1\r\nResponseTime: 2019-12-05T23:03:51.5107771Z, StoreResult: StorePhysicalAddress: rntbd://127.0.0.1:10251/apps/DocDbApp/services/DocDbMaster0/partitions/780e44f4-38c8-11e6-8106-8cdcd42c33be/replicas/1p/, LSN: 18, GlobalCommittedLsn: -1, PartitionKeyRangeId: , IsValid: True, StatusCode: 404, SubStatusCode: 0, RequestCharge: 1, ItemLSN: -1, SessionToken: -1#18, UsingLocalLSN: False, TransportException: null, ResourceType: Collection, OperationType: Read\r\nResponseTime: 2019-12-05T23:03:51.5107771Z, StoreResult: StorePhysicalAddress: rntbd://127.0.0.1:10251/apps/DocDbApp/services/DocDbMaster0/partitions/780e44f4-38c8-11e6-8106-8cdcd42c33be/replicas/1p/, LSN: 18, GlobalCommittedLsn: -1, PartitionKeyRangeId: , IsValid: True, StatusCode: 404, SubStatusCode: 0, RequestCharge: 1, ItemLSN: -1, SessionToken: -1#18, UsingLocalLSN: False, TransportException: null, ResourceType: Collection, OperationType: Read\r\n, SDK: Microsoft.Azure.Documents.Common/2.2.0.0" + "message": "Message: {\"Errors\":[\"Resource Not Found\"]}\r\nActivityId: ff94d8a6-8290-4bd7-9869-2a491af3595c, Request URI: /apps/DocDbApp/services/DocDbMaster0/partitions/780e44f4-38c8-11e6-8106-8cdcd42c33be/replicas/1p/, RequestStats: \r\nRequestStartTime: 2019-12-12T23:26:55.6086500Z, RequestEndTime: 2019-12-12T23:26:55.6106504Z, Number of regions attempted:1\r\nResponseTime: 2019-12-12T23:26:55.6106504Z, StoreResult: StorePhysicalAddress: rntbd://127.0.0.1:10251/apps/DocDbApp/services/DocDbMaster0/partitions/780e44f4-38c8-11e6-8106-8cdcd42c33be/replicas/1p/, LSN: 3397, GlobalCommittedLsn: -1, PartitionKeyRangeId: , IsValid: True, StatusCode: 404, SubStatusCode: 0, RequestCharge: 1, ItemLSN: -1, SessionToken: -1#3397, UsingLocalLSN: False, TransportException: null, ResourceType: Collection, OperationType: Read\r\nResponseTime: 2019-12-12T23:26:55.6106504Z, StoreResult: StorePhysicalAddress: rntbd://127.0.0.1:10251/apps/DocDbApp/services/DocDbMaster0/partitions/780e44f4-38c8-11e6-8106-8cdcd42c33be/replicas/1p/, LSN: 3397, GlobalCommittedLsn: -1, PartitionKeyRangeId: , IsValid: True, StatusCode: 404, SubStatusCode: 0, RequestCharge: 1, ItemLSN: -1, SessionToken: -1#3397, UsingLocalLSN: False, TransportException: null, ResourceType: Collection, OperationType: Read\r\n, SDK: Microsoft.Azure.Documents.Common/2.7.0" }, "rawHeaders": [ "Transfer-Encoding", @@ -165,13 +165,13 @@ "Access-Control-Allow-Credentials", "true", "x-ms-last-state-change-utc", - "Thu, 05 Dec 2019 01:23:40.951 GMT", + "Wed, 11 Dec 2019 19:45:58.020 GMT", "lsn", - "18", + "3397", "x-ms-schemaversion", - "1.7", + "1.8", "x-ms-quorum-acked-lsn", - "18", + "3397", "x-ms-current-write-quorum", "1", "x-ms-current-replica-set-size", @@ -183,23 +183,23 @@ "x-ms-number-of-read-regions", "0", "x-ms-transport-request-id", - "1466", + "5095", "x-ms-cosmos-llsn", - "18", + "3397", "x-ms-cosmos-quorum-acked-llsn", - "18", + "3397", "x-ms-session-token", - "0:-1#18", + "0:-1#3397", "x-ms-request-charge", "2", "x-ms-serviceversion", - "version=2.2.0.0", + "version=2.7.0.0", "x-ms-activity-id", - "7050b995-6f37-4516-ab39-b9f9ece4e940", + "ff94d8a6-8290-4bd7-9869-2a491af3595c", "x-ms-gatewayversion", - "version=2.2.0.0", + "version=2.7.0", "Date", - "Thu, 05 Dec 2019 23:03:51 GMT", + "Thu, 12 Dec 2019 23:26:55 GMT", "Connection", "close" ] @@ -224,8 +224,7 @@ "automatic": true, "includedPaths": [ { - "path": "/*", - "indexes": [] + "path": "/*" } ], "excludedPaths": [ @@ -240,10 +239,18 @@ ], "kind": "Hash" }, - "_rid": "-gMpAKxPACs=", - "_ts": 1575587031, - "_self": "dbs/-gMpAA==/colls/-gMpAKxPACs=/", - "_etag": "\"00000000-0000-0000-abc0-42853de101d5\"", + "conflictResolutionPolicy": { + "mode": "LastWriterWins", + "conflictResolutionPath": "/_ts", + "conflictResolutionProcedure": "" + }, + "geospatialConfig": { + "type": "Geography" + }, + "_rid": "gzFFAPwkVIU=", + "_ts": 1576193215, + "_self": "dbs/gzFFAA==/colls/gzFFAPwkVIU=/", + "_etag": "\"00000000-0000-0000-b143-a46cbf5301d5\"", "_docs": "docs/", "_sprocs": "sprocs/", "_triggers": "triggers/", @@ -266,21 +273,21 @@ "Access-Control-Allow-Credentials", "true", "x-ms-last-state-change-utc", - "Thu, 05 Dec 2019 01:23:43.997 GMT", + "Wed, 11 Dec 2019 19:46:09.043 GMT", "etag", - "\"00000000-0000-0000-abc0-42853de101d5\"", + "\"00000000-0000-0000-b143-a46cbf5301d5\"", "collection-partition-index", "0", "collection-service-index", "0", "lsn", - "51", + "4034", "x-ms-schemaversion", - "1.7", + "1.8", "x-ms-alt-content-path", "dbs/test-db", "x-ms-quorum-acked-lsn", - "51", + "4034", "x-ms-current-write-quorum", "1", "x-ms-current-replica-set-size", @@ -292,27 +299,27 @@ "x-ms-number-of-read-regions", "0", "x-ms-item-lsn", - "51", + "4034", "x-ms-transport-request-id", - "118", + "1353", "x-ms-cosmos-llsn", - "51", + "4034", "x-ms-cosmos-quorum-acked-llsn", - "51", + "4034", "x-ms-cosmos-item-llsn", - "51", + "4034", "x-ms-session-token", - "0:-1#51", + "0:-1#4034", "x-ms-request-charge", "1", "x-ms-serviceversion", - "version=2.2.0.0", + "version=2.7.0.0", "x-ms-activity-id", - "23079b27-c5fa-4065-9bec-ef441858397a", + "350183d9-2e62-4939-aecd-9d64838e8235", "x-ms-gatewayversion", - "version=2.2.0.0", + "version=2.7.0", "Date", - "Thu, 05 Dec 2019 23:03:51 GMT", + "Thu, 12 Dec 2019 23:26:55 GMT", "Connection", "close" ] diff --git a/libraries/botbuilder-azure/tests/TestData/CosmosDbStorage/read_with_partition_key.json b/libraries/botbuilder-azure/tests/TestData/CosmosDbStorage - Base Storage Tests/create_an_object.json similarity index 56% rename from libraries/botbuilder-azure/tests/TestData/CosmosDbStorage/read_with_partition_key.json rename to libraries/botbuilder-azure/tests/TestData/CosmosDbStorage - Base Storage Tests/create_an_object.json index 966965c330..240708c3ad 100644 --- a/libraries/botbuilder-azure/tests/TestData/CosmosDbStorage/read_with_partition_key.json +++ b/libraries/botbuilder-azure/tests/TestData/CosmosDbStorage - Base Storage Tests/create_an_object.json @@ -2,45 +2,54 @@ { "scope": "https://localhost:8081", "method": "GET", - "path": "/", + "path": "/dbs/test-db/colls/bot-storage", "body": "", "status": 200, "response": { - "_self": "", - "id": "localhost", - "_rid": "localhost", - "media": "//media/", - "addresses": "//addresses/", - "_dbs": "//dbs/", - "writableLocations": [ - { - "name": "South Central US", - "databaseAccountEndpoint": "https://127.0.0.1:8081/" - } - ], - "readableLocations": [ - { - "name": "South Central US", - "databaseAccountEndpoint": "https://127.0.0.1:8081/" - } - ], - "userReplicationPolicy": { - "asyncReplication": false, - "minReplicaSetSize": 1, - "maxReplicasetSize": 4 - }, - "userConsistencyPolicy": { - "defaultConsistencyLevel": "Session" + "id": "bot-storage", + "indexingPolicy": { + "indexingMode": "consistent", + "automatic": true, + "includedPaths": [ + { + "path": "/*", + "indexes": [ + { + "kind": "Range", + "dataType": "Number", + "precision": -1 + }, + { + "kind": "Range", + "dataType": "String", + "precision": -1 + } + ] + } + ], + "excludedPaths": [ + { + "path": "/\"_etag\"/?" + } + ] }, - "systemReplicationPolicy": { - "minReplicaSetSize": 1, - "maxReplicasetSize": 4 + "conflictResolutionPolicy": { + "mode": "LastWriterWins", + "conflictResolutionPath": "/_ts", + "conflictResolutionProcedure": "" }, - "readPolicy": { - "primaryReadCoefficient": 1, - "secondaryReadCoefficient": 1 + "geospatialConfig": { + "type": "Geography" }, - "queryEngineConfiguration": "{\"maxSqlQueryInputLength\":262144,\"maxJoinsPerSqlQuery\":5,\"maxLogicalAndPerSqlQuery\":500,\"maxLogicalOrPerSqlQuery\":500,\"maxUdfRefPerSqlQuery\":10,\"maxInExpressionItemsCount\":16000,\"queryMaxInMemorySortDocumentCount\":500,\"maxQueryRequestTimeoutFraction\":0.9,\"sqlAllowNonFiniteNumbers\":false,\"sqlAllowAggregateFunctions\":true,\"sqlAllowSubQuery\":true,\"sqlAllowScalarSubQuery\":true,\"allowNewKeywords\":true,\"sqlAllowLike\":false,\"sqlAllowGroupByClause\":false,\"maxSpatialQueryCells\":12,\"spatialMaxGeometryPointCount\":256,\"sqlAllowTop\":true,\"enableSpatialIndexing\":true}" + "_rid": "TUIrAJlnrjg=", + "_ts": 1576193248, + "_self": "dbs/TUIrAA==/colls/TUIrAJlnrjg=/", + "_etag": "\"00000000-0000-0000-b143-b802bf7e01d5\"", + "_docs": "docs/", + "_sprocs": "sprocs/", + "_triggers": "triggers/", + "_udfs": "udfs/", + "_conflicts": "conflicts/" }, "rawHeaders": [ "Cache-Control", @@ -52,61 +61,7 @@ "Content-Type", "application/json", "Content-Location", - "https://localhost:8081/", - "Server", - "Microsoft-HTTPAPI/2.0", - "Access-Control-Allow-Origin", - "", - "Access-Control-Allow-Credentials", - "true", - "x-ms-max-media-storage-usage-mb", - "10240", - "x-ms-media-storage-usage-mb", - "0", - "x-ms-databaseaccount-consumed-mb", - "0", - "x-ms-databaseaccount-reserved-mb", - "0", - "x-ms-databaseaccount-provisioned-mb", - "0", - "x-ms-gatewayversion", - "version=2.2.0.0", - "Date", - "Fri, 05 Apr 2019 16:48:27 GMT" - ] - }, - { - "scope": "https://localhost:8081", - "method": "POST", - "path": "/dbs", - "body": { - "query": "SELECT r._self FROM root r WHERE r.id = @id", - "parameters": [ - { - "name": "@id", - "value": "test-db" - } - ] - }, - "status": 200, - "response": { - "_rid": "", - "Databases": [ - { - "_self": "dbs/eLtDAA==/" - } - ], - "_count": 1 - }, - "rawHeaders": [ - "Cache-Control", - "no-store, no-cache", - "Pragma", - "no-cache", - "Transfer-Encoding", - "chunked", - "Content-Type", - "application/json", + "https://127.0.0.1:8081/dbs/test-db/colls/bot-storage", "Server", "Microsoft-HTTPAPI/2.0", "Access-Control-Allow-Origin", @@ -114,19 +69,29 @@ "Access-Control-Allow-Credentials", "true", "x-ms-last-state-change-utc", - "Fri, 29 Mar 2019 04:36:17.258 GMT", + "Wed, 11 Dec 2019 19:46:13.459 GMT", + "etag", + "\"00000000-0000-0000-b143-b802bf7e01d5\"", "x-ms-resource-quota", - "databases=100;", + "functions=25;storedProcedures=100;triggers=25;documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", "x-ms-resource-usage", - "databases=2;", + "functions=0;storedProcedures=0;triggers=0;documentSize=0;documentsSize=0;documentsCount=0;collectionSize=0;", + "collection-partition-index", + "0", + "collection-service-index", + "0", "lsn", - "533", - "x-ms-item-count", - "1", + "522", "x-ms-schemaversion", - "1.7", + "1.8", + "x-ms-alt-content-path", + "dbs/test-db", + "x-ms-content-path", + "TUIrAA==", "x-ms-quorum-acked-lsn", - "533", + "522", + "x-ms-documentdb-collection-index-transformation-progress", + "100", "x-ms-current-write-quorum", "1", "x-ms-current-replica-set-size", @@ -137,48 +102,81 @@ "-1", "x-ms-number-of-read-regions", "0", + "x-ms-item-lsn", + "522", "x-ms-transport-request-id", - "2754", + "1430", "x-ms-cosmos-llsn", - "533", + "522", "x-ms-cosmos-quorum-acked-llsn", - "533", + "522", + "x-ms-cosmos-item-llsn", + "522", "x-ms-session-token", - "0:533", + "0:522", "x-ms-request-charge", - "5.66", + "1", "x-ms-serviceversion", - "version=2.2.0.0", + "version=2.7.0.0", "x-ms-activity-id", - "2c65a2e4-c5c4-4b70-9ab2-ebd28176c1e8", + "6e326c3d-d0c7-4de8-a929-f08fcca4ef3c", "x-ms-gatewayversion", - "version=2.2.0.0", + "version=2.7.0", "Date", - "Fri, 05 Apr 2019 16:48:27 GMT" + "Thu, 12 Dec 2019 23:27:28 GMT" ] }, { "scope": "https://localhost:8081", - "method": "POST", - "path": "/dbs/eLtDAA==/colls/", - "body": { - "query": "SELECT r._self FROM root r WHERE r.id=@id", - "parameters": [ - { - "name": "@id", - "value": "bot-storage" - } - ] - }, + "method": "GET", + "path": "/dbs/test-db/colls/bot-storage", + "body": "", "status": 200, "response": { - "_rid": "eLtDAA==", - "DocumentCollections": [ - { - "_self": "dbs/eLtDAA==/colls/eLtDAL-3CAk=/" - } - ], - "_count": 1 + "id": "bot-storage", + "indexingPolicy": { + "indexingMode": "consistent", + "automatic": true, + "includedPaths": [ + { + "path": "/*", + "indexes": [ + { + "kind": "Range", + "dataType": "Number", + "precision": -1 + }, + { + "kind": "Range", + "dataType": "String", + "precision": -1 + } + ] + } + ], + "excludedPaths": [ + { + "path": "/\"_etag\"/?" + } + ] + }, + "conflictResolutionPolicy": { + "mode": "LastWriterWins", + "conflictResolutionPath": "/_ts", + "conflictResolutionProcedure": "" + }, + "geospatialConfig": { + "type": "Geography" + }, + "_rid": "TUIrAJlnrjg=", + "_ts": 1576193248, + "_self": "dbs/TUIrAA==/colls/TUIrAJlnrjg=/", + "_etag": "\"00000000-0000-0000-b143-b802bf7e01d5\"", + "_docs": "docs/", + "_sprocs": "sprocs/", + "_triggers": "triggers/", + "_udfs": "udfs/", + "_conflicts": "conflicts/" }, "rawHeaders": [ "Cache-Control", @@ -189,6 +187,8 @@ "chunked", "Content-Type", "application/json", + "Content-Location", + "https://127.0.0.1:8081/dbs/test-db/colls/bot-storage", "Server", "Microsoft-HTTPAPI/2.0", "Access-Control-Allow-Origin", @@ -196,25 +196,29 @@ "Access-Control-Allow-Credentials", "true", "x-ms-last-state-change-utc", - "Fri, 29 Mar 2019 04:36:17.258 GMT", + "Wed, 11 Dec 2019 19:46:13.459 GMT", + "etag", + "\"00000000-0000-0000-b143-b802bf7e01d5\"", "x-ms-resource-quota", - "collections=5000;", + "functions=25;storedProcedures=100;triggers=25;documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", "x-ms-resource-usage", - "collections=2;", + "functions=0;storedProcedures=0;triggers=0;documentSize=0;documentsSize=0;documentsCount=0;collectionSize=0;", "collection-partition-index", "0", "collection-service-index", "0", "lsn", - "533", - "x-ms-item-count", - "1", + "522", "x-ms-schemaversion", - "1.7", + "1.8", "x-ms-alt-content-path", "dbs/test-db", + "x-ms-content-path", + "TUIrAA==", "x-ms-quorum-acked-lsn", - "533", + "522", + "x-ms-documentdb-collection-index-transformation-progress", + "100", "x-ms-current-write-quorum", "1", "x-ms-current-replica-set-size", @@ -225,79 +229,53 @@ "-1", "x-ms-number-of-read-regions", "0", + "x-ms-item-lsn", + "522", "x-ms-transport-request-id", - "2756", + "1431", "x-ms-cosmos-llsn", - "533", + "522", "x-ms-cosmos-quorum-acked-llsn", - "533", + "522", + "x-ms-cosmos-item-llsn", + "522", "x-ms-session-token", - "0:533", + "0:522", "x-ms-request-charge", - "5.66", + "1", "x-ms-serviceversion", - "version=2.2.0.0", + "version=2.7.0.0", "x-ms-activity-id", - "fec57047-c3f7-417c-990f-5cd4594ee80a", + "5b2729f2-0cff-4a67-af46-ef673dd2fc36", "x-ms-gatewayversion", - "version=2.2.0.0", + "version=2.7.0", "Date", - "Fri, 05 Apr 2019 16:48:27 GMT" + "Thu, 12 Dec 2019 23:27:28 GMT" ] }, { "scope": "https://localhost:8081", - "method": "GET", - "path": "/dbs/test-db/colls/bot-storage", - "body": "", - "status": 200, + "method": "POST", + "path": "/dbs/test-db/colls/bot-storage/docs", + "body": { + "id": "createPocoStoreItem", + "realId": "createPocoStoreItem", + "document": { + "id": 2 + } + }, + "status": 201, "response": { - "id": "bot-storage", - "indexingPolicy": { - "indexingMode": "consistent", - "automatic": true, - "includedPaths": [ - { - "path": "/*", - "indexes": [ - { - "kind": "Range", - "dataType": "Number", - "precision": -1 - }, - { - "kind": "Range", - "dataType": "String", - "precision": -1 - }, - { - "kind": "Spatial", - "dataType": "Point" - } - ] - } - ], - "excludedPaths": [ - { - "path": "/\"_etag\"/?" - } - ] - }, - "partitionKey": { - "paths": [ - "/document/Location" - ], - "kind": "Hash" + "id": "createPocoStoreItem", + "realId": "createPocoStoreItem", + "document": { + "id": 2 }, - "_rid": "eLtDAL-3CAk=", - "_ts": 1554475922, - "_self": "dbs/eLtDAA==/colls/eLtDAL-3CAk=/", - "_etag": "\"00000000-0000-0000-ebbf-21301dee01d4\"", - "_docs": "docs/", - "_sprocs": "sprocs/", - "_triggers": "triggers/", - "_udfs": "udfs/", - "_conflicts": "conflicts/" + "_rid": "TUIrAJlnrjgBAAAAAAAAAA==", + "_self": "dbs/TUIrAA==/colls/TUIrAJlnrjg=/docs/TUIrAJlnrjgBAAAAAAAAAA==/", + "_etag": "\"00000000-0000-0000-b143-b827025301d5\"", + "_attachments": "attachments/", + "_ts": 1576193248 }, "rawHeaders": [ "Cache-Control", @@ -308,8 +286,6 @@ "chunked", "Content-Type", "application/json", - "Content-Location", - "https://127.0.0.1:8081/dbs/test-db/colls/bot-storage", "Server", "Microsoft-HTTPAPI/2.0", "Access-Control-Allow-Origin", @@ -317,23 +293,23 @@ "Access-Control-Allow-Credentials", "true", "x-ms-last-state-change-utc", - "Fri, 29 Mar 2019 04:36:23.731 GMT", + "Wed, 11 Dec 2019 19:46:13.459 GMT", "etag", - "\"00000000-0000-0000-ebbf-21301dee01d4\"", - "collection-partition-index", - "0", - "collection-service-index", - "0", + "\"00000000-0000-0000-b143-b827025301d5\"", + "x-ms-resource-quota", + "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", + "x-ms-resource-usage", + "documentSize=0;documentsSize=1;documentsCount=0;collectionSize=1;", "lsn", - "1", + "523", "x-ms-schemaversion", - "1.7", + "1.8", "x-ms-alt-content-path", - "dbs/test-db", + "dbs/test-db/colls/bot-storage", "x-ms-content-path", - "eLtDAA==", + "TUIrAJlnrjg=", "x-ms-quorum-acked-lsn", - "1", + "522", "x-ms-current-write-quorum", "1", "x-ms-current-replica-set-size", @@ -344,28 +320,24 @@ "-1", "x-ms-number-of-read-regions", "0", - "x-ms-item-lsn", - "1", "x-ms-transport-request-id", - "769", + "1432", "x-ms-cosmos-llsn", - "1", + "523", "x-ms-cosmos-quorum-acked-llsn", - "1", - "x-ms-cosmos-item-llsn", - "1", + "522", "x-ms-session-token", - "1:1", + "0:523", "x-ms-request-charge", - "1", + "6.48", "x-ms-serviceversion", - "version=2.2.0.0", + "version=2.7.0.0", "x-ms-activity-id", - "15ad0586-b5d9-4de9-aabe-6ebcf66d50c1", + "493a5fcb-90e1-4795-b519-cb15ef2d6a44", "x-ms-gatewayversion", - "version=2.2.0.0", + "version=2.7.0", "Date", - "Fri, 05 Apr 2019 16:48:27 GMT" + "Thu, 12 Dec 2019 23:27:28 GMT" ] }, { @@ -373,32 +345,24 @@ "method": "POST", "path": "/dbs/test-db/colls/bot-storage/docs", "body": { - "id": "001", - "realId": "001", + "id": "createPoco", + "realId": "createPoco", "document": { - "Location": "ARG", - "MessageList": [ - "Hi", - "how are u" - ] + "id": 1 } }, - "status": 200, + "status": 201, "response": { - "id": "001", - "realId": "001", + "id": "createPoco", + "realId": "createPoco", "document": { - "Location": "ARG", - "MessageList": [ - "Hi", - "how are u" - ] + "id": 1 }, - "_rid": "eLtDAL-3CAkqAAAAAAAAAA==", - "_self": "dbs/eLtDAA==/colls/eLtDAL-3CAk=/docs/eLtDAL-3CAkqAAAAAAAAAA==/", - "_etag": "\"00000000-0000-0000-ebcf-64a0a0a801d4\"", + "_rid": "TUIrAJlnrjgCAAAAAAAAAA==", + "_self": "dbs/TUIrAA==/colls/TUIrAJlnrjg=/docs/TUIrAJlnrjgCAAAAAAAAAA==/", + "_etag": "\"00000000-0000-0000-b143-b82777b601d5\"", "_attachments": "attachments/", - "_ts": 1554482907 + "_ts": 1576193248 }, "rawHeaders": [ "Cache-Control", @@ -416,23 +380,23 @@ "Access-Control-Allow-Credentials", "true", "x-ms-last-state-change-utc", - "Fri, 29 Mar 2019 04:36:22.337 GMT", + "Wed, 11 Dec 2019 19:46:13.459 GMT", "etag", - "\"00000000-0000-0000-ebcf-64a0a0a801d4\"", + "\"00000000-0000-0000-b143-b82777b601d5\"", "x-ms-resource-quota", "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", "x-ms-resource-usage", - "documentSize=0;documentsSize=1;documentsCount=1;collectionSize=1;", + "documentSize=0;documentsSize=2;documentsCount=1;collectionSize=2;", "lsn", - "510", + "524", "x-ms-schemaversion", - "1.7", + "1.8", "x-ms-alt-content-path", "dbs/test-db/colls/bot-storage", "x-ms-content-path", - "eLtDAL-3CAk=", + "TUIrAJlnrjg=", "x-ms-quorum-acked-lsn", - "509", + "523", "x-ms-current-write-quorum", "1", "x-ms-current-replica-set-size", @@ -444,56 +408,64 @@ "x-ms-number-of-read-regions", "0", "x-ms-transport-request-id", - "770", + "1433", "x-ms-cosmos-llsn", - "510", + "524", "x-ms-cosmos-quorum-acked-llsn", - "509", + "523", "x-ms-session-token", - "0:510", + "0:524", "x-ms-request-charge", - "10.29", + "6.48", "x-ms-serviceversion", - "version=2.2.0.0", + "version=2.7.0.0", "x-ms-activity-id", - "7b6ab0c3-9ccc-4e97-b10a-60dd0e15aa50", + "14a9f472-4af0-497a-9b38-25e9f85aa559", "x-ms-gatewayversion", - "version=2.2.0.0", + "version=2.7.0", "Date", - "Fri, 05 Apr 2019 16:48:27 GMT" + "Thu, 12 Dec 2019 23:27:28 GMT" ] }, { "scope": "https://localhost:8081", "method": "POST", - "path": "/dbs/eLtDAA==/colls/eLtDAL-3CAk=/docs/", + "path": "/dbs/TUIrAA==/colls/TUIrAJlnrjg=/docs/", "body": { - "query": "SELECT c.id, c.realId, c.document, c._etag FROM c WHERE c.id in (@id0)", + "query": "SELECT c.id, c.realId, c.document, c._etag FROM c WHERE c.id in (@id0,@id1)", "parameters": [ { "name": "@id0", - "value": "001" + "value": "createPoco" + }, + { + "name": "@id1", + "value": "createPocoStoreItem" } ] }, "status": 200, "response": { - "_rid": "eLtDAL-3CAk=", + "_rid": "TUIrAJlnrjg=", "Documents": [ { - "id": "001", - "realId": "001", + "id": "createPocoStoreItem", + "realId": "createPocoStoreItem", "document": { - "Location": "ARG", - "MessageList": [ - "Hi", - "how are u" - ] + "id": 2 + }, + "_etag": "\"00000000-0000-0000-b143-b827025301d5\"" + }, + { + "id": "createPoco", + "realId": "createPoco", + "document": { + "id": 1 }, - "_etag": "\"00000000-0000-0000-ebcf-64a0a0a801d4\"" + "_etag": "\"00000000-0000-0000-b143-b82777b601d5\"" } ], - "_count": 1 + "_count": 2 }, "rawHeaders": [ "Cache-Control", @@ -511,21 +483,21 @@ "Access-Control-Allow-Credentials", "true", "x-ms-last-state-change-utc", - "Fri, 29 Mar 2019 04:36:22.337 GMT", + "Wed, 11 Dec 2019 19:46:13.459 GMT", "x-ms-resource-quota", "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", "x-ms-resource-usage", - "documentSize=0;documentsSize=1;documentsCount=1;collectionSize=1;", + "documentSize=0;documentsSize=2;documentsCount=2;collectionSize=2;", "lsn", - "510", + "524", "x-ms-item-count", - "1", + "2", "x-ms-schemaversion", - "1.7", + "1.8", "x-ms-alt-content-path", "dbs/test-db/colls/bot-storage", "x-ms-quorum-acked-lsn", - "510", + "524", "x-ms-current-write-quorum", "1", "x-ms-current-replica-set-size", @@ -537,23 +509,23 @@ "x-ms-number-of-read-regions", "0", "x-ms-transport-request-id", - "771", + "1434", "x-ms-cosmos-llsn", - "510", + "524", "x-ms-cosmos-quorum-acked-llsn", - "510", + "524", "x-ms-session-token", - "0:510", + "0:524", "x-ms-request-charge", - "3.07", + "3.09", "x-ms-serviceversion", - "version=2.2.0.0", + "version=2.7.0.0", "x-ms-activity-id", - "ae31e618-cd8f-48ba-97d6-88da43b687b3", + "9ab89a56-305e-4e3d-b496-67f62b4dc61f", "x-ms-gatewayversion", - "version=2.2.0.0", + "version=2.7.0", "Date", - "Fri, 05 Apr 2019 16:48:27 GMT" + "Thu, 12 Dec 2019 23:27:28 GMT" ] } ] \ No newline at end of file diff --git a/libraries/botbuilder-azure/tests/TestData/CosmosDbStorage - Base Storage Tests/delete_an_object.json b/libraries/botbuilder-azure/tests/TestData/CosmosDbStorage - Base Storage Tests/delete_an_object.json new file mode 100644 index 0000000000..8081db8a7c --- /dev/null +++ b/libraries/botbuilder-azure/tests/TestData/CosmosDbStorage - Base Storage Tests/delete_an_object.json @@ -0,0 +1,331 @@ +[ + { + "scope": "https://localhost:8081", + "method": "POST", + "path": "/dbs/test-db/colls/bot-storage/docs", + "body": { + "id": "delete1", + "realId": "delete1", + "document": { + "id": 1, + "count": 1 + } + }, + "status": 201, + "response": { + "id": "delete1", + "realId": "delete1", + "document": { + "id": 1, + "count": 1 + }, + "_rid": "TUIrAJlnrjgGAAAAAAAAAA==", + "_self": "dbs/TUIrAA==/colls/TUIrAJlnrjg=/docs/TUIrAJlnrjgGAAAAAAAAAA==/", + "_etag": "\"00000000-0000-0000-b143-b84128fb01d5\"", + "_attachments": "attachments/", + "_ts": 1576193248 + }, + "rawHeaders": [ + "Cache-Control", + "no-store, no-cache", + "Pragma", + "no-cache", + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json", + "Server", + "Microsoft-HTTPAPI/2.0", + "Access-Control-Allow-Origin", + "", + "Access-Control-Allow-Credentials", + "true", + "x-ms-last-state-change-utc", + "Wed, 11 Dec 2019 19:46:13.459 GMT", + "etag", + "\"00000000-0000-0000-b143-b84128fb01d5\"", + "x-ms-resource-quota", + "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", + "x-ms-resource-usage", + "documentSize=0;documentsSize=3;documentsCount=5;collectionSize=6;", + "lsn", + "534", + "x-ms-schemaversion", + "1.8", + "x-ms-alt-content-path", + "dbs/test-db/colls/bot-storage", + "x-ms-content-path", + "TUIrAJlnrjg=", + "x-ms-quorum-acked-lsn", + "533", + "x-ms-current-write-quorum", + "1", + "x-ms-current-replica-set-size", + "1", + "x-ms-xp-role", + "0", + "x-ms-global-Committed-lsn", + "-1", + "x-ms-number-of-read-regions", + "0", + "x-ms-transport-request-id", + "1452", + "x-ms-cosmos-llsn", + "534", + "x-ms-cosmos-quorum-acked-llsn", + "533", + "x-ms-session-token", + "0:534", + "x-ms-request-charge", + "6.86", + "x-ms-serviceversion", + "version=2.7.0.0", + "x-ms-activity-id", + "7fcb93a3-b385-4eff-af45-657e65f95acb", + "x-ms-gatewayversion", + "version=2.7.0", + "Date", + "Thu, 12 Dec 2019 23:27:28 GMT" + ] + }, + { + "scope": "https://localhost:8081", + "method": "POST", + "path": "/dbs/TUIrAA==/colls/TUIrAJlnrjg=/docs/", + "body": { + "query": "SELECT c.id, c.realId, c.document, c._etag FROM c WHERE c.id in (@id0)", + "parameters": [ + { + "name": "@id0", + "value": "delete1" + } + ] + }, + "status": 200, + "response": { + "_rid": "TUIrAJlnrjg=", + "Documents": [ + { + "id": "delete1", + "realId": "delete1", + "document": { + "id": 1, + "count": 1 + }, + "_etag": "\"00000000-0000-0000-b143-b84128fb01d5\"" + } + ], + "_count": 1 + }, + "rawHeaders": [ + "Cache-Control", + "no-store, no-cache", + "Pragma", + "no-cache", + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json", + "Server", + "Microsoft-HTTPAPI/2.0", + "Access-Control-Allow-Origin", + "", + "Access-Control-Allow-Credentials", + "true", + "x-ms-last-state-change-utc", + "Wed, 11 Dec 2019 19:46:13.459 GMT", + "x-ms-resource-quota", + "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", + "x-ms-resource-usage", + "documentSize=0;documentsSize=3;documentsCount=6;collectionSize=6;", + "lsn", + "534", + "x-ms-item-count", + "1", + "x-ms-schemaversion", + "1.8", + "x-ms-alt-content-path", + "dbs/test-db/colls/bot-storage", + "x-ms-quorum-acked-lsn", + "534", + "x-ms-current-write-quorum", + "1", + "x-ms-current-replica-set-size", + "1", + "x-ms-xp-role", + "0", + "x-ms-global-Committed-lsn", + "-1", + "x-ms-number-of-read-regions", + "0", + "x-ms-transport-request-id", + "1453", + "x-ms-cosmos-llsn", + "534", + "x-ms-cosmos-quorum-acked-llsn", + "534", + "x-ms-session-token", + "0:534", + "x-ms-request-charge", + "2.9", + "x-ms-serviceversion", + "version=2.7.0.0", + "x-ms-activity-id", + "bb5eab80-bb98-43c7-bca1-eeeb3ff4d55f", + "x-ms-gatewayversion", + "version=2.7.0", + "Date", + "Thu, 12 Dec 2019 23:27:28 GMT" + ] + }, + { + "scope": "https://localhost:8081", + "method": "DELETE", + "path": "/dbs/test-db/colls/bot-storage/docs/delete1", + "body": "", + "status": 204, + "response": "", + "rawHeaders": [ + "Cache-Control", + "no-store, no-cache", + "Pragma", + "no-cache", + "Content-Length", + "0", + "Content-Type", + "application/json", + "Content-Location", + "https://127.0.0.1:8081/dbs/test-db/colls/bot-storage/docs/delete1", + "Server", + "Microsoft-HTTPAPI/2.0", + "Access-Control-Allow-Origin", + "", + "Access-Control-Allow-Credentials", + "true", + "x-ms-last-state-change-utc", + "Wed, 11 Dec 2019 19:46:13.459 GMT", + "x-ms-resource-quota", + "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", + "x-ms-resource-usage", + "documentSize=0;documentsSize=3;documentsCount=6;collectionSize=5;", + "lsn", + "535", + "x-ms-schemaversion", + "1.8", + "x-ms-alt-content-path", + "dbs/test-db/colls/bot-storage", + "x-ms-content-path", + "TUIrAJlnrjg=", + "x-ms-quorum-acked-lsn", + "534", + "x-ms-current-write-quorum", + "1", + "x-ms-current-replica-set-size", + "1", + "x-ms-xp-role", + "0", + "x-ms-global-Committed-lsn", + "-1", + "x-ms-number-of-read-regions", + "0", + "x-ms-transport-request-id", + "1454", + "x-ms-cosmos-llsn", + "535", + "x-ms-cosmos-quorum-acked-llsn", + "534", + "x-ms-session-token", + "0:535", + "x-ms-request-charge", + "6.86", + "x-ms-serviceversion", + "version=2.7.0.0", + "x-ms-activity-id", + "8e0ef8a1-dd3a-4cd6-b249-c2814981c19b", + "x-ms-gatewayversion", + "version=2.7.0", + "Date", + "Thu, 12 Dec 2019 23:27:28 GMT" + ] + }, + { + "scope": "https://localhost:8081", + "method": "POST", + "path": "/dbs/TUIrAA==/colls/TUIrAJlnrjg=/docs/", + "body": { + "query": "SELECT c.id, c.realId, c.document, c._etag FROM c WHERE c.id in (@id0)", + "parameters": [ + { + "name": "@id0", + "value": "delete1" + } + ] + }, + "status": 200, + "response": { + "_rid": "TUIrAJlnrjg=", + "Documents": [], + "_count": 0 + }, + "rawHeaders": [ + "Cache-Control", + "no-store, no-cache", + "Pragma", + "no-cache", + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json", + "Server", + "Microsoft-HTTPAPI/2.0", + "Access-Control-Allow-Origin", + "", + "Access-Control-Allow-Credentials", + "true", + "x-ms-last-state-change-utc", + "Wed, 11 Dec 2019 19:46:13.459 GMT", + "x-ms-resource-quota", + "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", + "x-ms-resource-usage", + "documentSize=0;documentsSize=3;documentsCount=5;collectionSize=5;", + "lsn", + "535", + "x-ms-item-count", + "0", + "x-ms-schemaversion", + "1.8", + "x-ms-alt-content-path", + "dbs/test-db/colls/bot-storage", + "x-ms-quorum-acked-lsn", + "535", + "x-ms-current-write-quorum", + "1", + "x-ms-current-replica-set-size", + "1", + "x-ms-xp-role", + "0", + "x-ms-global-Committed-lsn", + "-1", + "x-ms-number-of-read-regions", + "0", + "x-ms-transport-request-id", + "1455", + "x-ms-cosmos-llsn", + "535", + "x-ms-cosmos-quorum-acked-llsn", + "535", + "x-ms-session-token", + "0:535", + "x-ms-request-charge", + "2.85", + "x-ms-serviceversion", + "version=2.7.0.0", + "x-ms-activity-id", + "5006d7a4-febb-4c11-8776-b751ff099bea", + "x-ms-gatewayversion", + "version=2.7.0", + "Date", + "Thu, 12 Dec 2019 23:27:28 GMT" + ] + } +] \ No newline at end of file diff --git a/libraries/botbuilder-azure/tests/TestData/CosmosDbStorage - Base Storage Tests/does_not_throw_when_deleting_an_unknown_object.json b/libraries/botbuilder-azure/tests/TestData/CosmosDbStorage - Base Storage Tests/does_not_throw_when_deleting_an_unknown_object.json new file mode 100644 index 0000000000..3519df2d05 --- /dev/null +++ b/libraries/botbuilder-azure/tests/TestData/CosmosDbStorage - Base Storage Tests/does_not_throw_when_deleting_an_unknown_object.json @@ -0,0 +1,63 @@ +[ + { + "scope": "https://localhost:8081", + "method": "DELETE", + "path": "/dbs/test-db/colls/bot-storage/docs/unknown_key", + "body": "", + "status": 404, + "response": { + "code": "NotFound", + "message": "Message: {\"Errors\":[\"Resource Not Found\"]}\r\nActivityId: 0e1814e0-b7a4-4fca-820e-c12193fcbe01, Request URI: /apps/DocDbApp/services/DocDbServer15/partitions/a4cb495b-38c8-11e6-8106-8cdcd42c33be/replicas/1p/, RequestStats: \r\nRequestStartTime: 2019-12-12T23:27:28.9845561Z, RequestEndTime: 2019-12-12T23:27:28.9855546Z, Number of regions attempted:1\r\nResponseTime: 2019-12-12T23:27:28.9855546Z, StoreResult: StorePhysicalAddress: rntbd://127.0.0.1:10253/apps/DocDbApp/services/DocDbServer15/partitions/a4cb495b-38c8-11e6-8106-8cdcd42c33be/replicas/1p/, LSN: 535, GlobalCommittedLsn: -1, PartitionKeyRangeId: 0, IsValid: True, StatusCode: 404, SubStatusCode: 0, RequestCharge: 1.24, ItemLSN: -1, SessionToken: 535, UsingLocalLSN: False, TransportException: null, ResourceType: Document, OperationType: Delete\r\n, SDK: Microsoft.Azure.Documents.Common/2.7.0" + }, + "rawHeaders": [ + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json", + "Content-Location", + "https://127.0.0.1:8081/dbs/test-db/colls/bot-storage/docs/unknown_key", + "Server", + "Microsoft-HTTPAPI/2.0", + "Access-Control-Allow-Origin", + "", + "Access-Control-Allow-Credentials", + "true", + "x-ms-last-state-change-utc", + "Wed, 11 Dec 2019 19:46:13.459 GMT", + "lsn", + "535", + "x-ms-schemaversion", + "1.8", + "x-ms-quorum-acked-lsn", + "535", + "x-ms-current-write-quorum", + "1", + "x-ms-current-replica-set-size", + "1", + "x-ms-xp-role", + "0", + "x-ms-global-Committed-lsn", + "-1", + "x-ms-number-of-read-regions", + "0", + "x-ms-transport-request-id", + "1456", + "x-ms-cosmos-llsn", + "535", + "x-ms-cosmos-quorum-acked-llsn", + "535", + "x-ms-session-token", + "0:535", + "x-ms-request-charge", + "1.24", + "x-ms-serviceversion", + "version=2.7.0.0", + "x-ms-activity-id", + "0e1814e0-b7a4-4fca-820e-c12193fcbe01", + "x-ms-gatewayversion", + "version=2.7.0", + "Date", + "Thu, 12 Dec 2019 23:27:28 GMT" + ] + } +] \ No newline at end of file diff --git a/libraries/botbuilder-azure/tests/TestData/CosmosDbStorage - Base Storage Tests/does_not_throw_when_writing_no_items.json b/libraries/botbuilder-azure/tests/TestData/CosmosDbStorage - Base Storage Tests/does_not_throw_when_writing_no_items.json new file mode 100644 index 0000000000..0637a088a0 --- /dev/null +++ b/libraries/botbuilder-azure/tests/TestData/CosmosDbStorage - Base Storage Tests/does_not_throw_when_writing_no_items.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/libraries/botbuilder-azure/tests/TestData/CosmosDbStorage - Base Storage Tests/handle_crazy_keys.json b/libraries/botbuilder-azure/tests/TestData/CosmosDbStorage - Base Storage Tests/handle_crazy_keys.json new file mode 100644 index 0000000000..b4ef2f688a --- /dev/null +++ b/libraries/botbuilder-azure/tests/TestData/CosmosDbStorage - Base Storage Tests/handle_crazy_keys.json @@ -0,0 +1,178 @@ +[ + { + "scope": "https://localhost:8081", + "method": "POST", + "path": "/dbs/test-db/colls/bot-storage/docs", + "body": { + "id": "!@*23$%^&*2a()~*2f*5c><,.*3f';\"`~", + "realId": "!@#$%^&*()~/\\><,.?';\"`~", + "document": { + "id": 1 + } + }, + "status": 201, + "response": { + "id": "!@*23$%^&*2a()~*2f*5c><,.*3f';\"`~", + "realId": "!@#$%^&*()~/\\><,.?';\"`~", + "document": { + "id": 1 + }, + "_rid": "TUIrAJlnrjgDAAAAAAAAAA==", + "_self": "dbs/TUIrAA==/colls/TUIrAJlnrjg=/docs/TUIrAJlnrjgDAAAAAAAAAA==/", + "_etag": "\"00000000-0000-0000-b143-b82aef4501d5\"", + "_attachments": "attachments/", + "_ts": 1576193248 + }, + "rawHeaders": [ + "Cache-Control", + "no-store, no-cache", + "Pragma", + "no-cache", + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json", + "Server", + "Microsoft-HTTPAPI/2.0", + "Access-Control-Allow-Origin", + "", + "Access-Control-Allow-Credentials", + "true", + "x-ms-last-state-change-utc", + "Wed, 11 Dec 2019 19:46:13.459 GMT", + "etag", + "\"00000000-0000-0000-b143-b82aef4501d5\"", + "x-ms-resource-quota", + "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", + "x-ms-resource-usage", + "documentSize=0;documentsSize=3;documentsCount=2;collectionSize=3;", + "lsn", + "525", + "x-ms-schemaversion", + "1.8", + "x-ms-alt-content-path", + "dbs/test-db/colls/bot-storage", + "x-ms-content-path", + "TUIrAJlnrjg=", + "x-ms-quorum-acked-lsn", + "524", + "x-ms-current-write-quorum", + "1", + "x-ms-current-replica-set-size", + "1", + "x-ms-xp-role", + "0", + "x-ms-global-Committed-lsn", + "-1", + "x-ms-number-of-read-regions", + "0", + "x-ms-transport-request-id", + "1435", + "x-ms-cosmos-llsn", + "525", + "x-ms-cosmos-quorum-acked-llsn", + "524", + "x-ms-session-token", + "0:525", + "x-ms-request-charge", + "6.48", + "x-ms-serviceversion", + "version=2.7.0.0", + "x-ms-activity-id", + "e0d92f22-de79-4c12-ab08-d7bf57441d45", + "x-ms-gatewayversion", + "version=2.7.0", + "Date", + "Thu, 12 Dec 2019 23:27:28 GMT" + ] + }, + { + "scope": "https://localhost:8081", + "method": "POST", + "path": "/dbs/TUIrAA==/colls/TUIrAJlnrjg=/docs/", + "body": { + "query": "SELECT c.id, c.realId, c.document, c._etag FROM c WHERE c.id in (@id0)", + "parameters": [ + { + "name": "@id0", + "value": "!@*23$%^&*2a()~*2f*5c><,.*3f';\"`~" + } + ] + }, + "status": 200, + "response": { + "_rid": "TUIrAJlnrjg=", + "Documents": [ + { + "id": "!@*23$%^&*2a()~*2f*5c><,.*3f';\"`~", + "realId": "!@#$%^&*()~/\\><,.?';\"`~", + "document": { + "id": 1 + }, + "_etag": "\"00000000-0000-0000-b143-b82aef4501d5\"" + } + ], + "_count": 1 + }, + "rawHeaders": [ + "Cache-Control", + "no-store, no-cache", + "Pragma", + "no-cache", + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json", + "Server", + "Microsoft-HTTPAPI/2.0", + "Access-Control-Allow-Origin", + "", + "Access-Control-Allow-Credentials", + "true", + "x-ms-last-state-change-utc", + "Wed, 11 Dec 2019 19:46:13.459 GMT", + "x-ms-resource-quota", + "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", + "x-ms-resource-usage", + "documentSize=0;documentsSize=3;documentsCount=3;collectionSize=3;", + "lsn", + "525", + "x-ms-item-count", + "1", + "x-ms-schemaversion", + "1.8", + "x-ms-alt-content-path", + "dbs/test-db/colls/bot-storage", + "x-ms-quorum-acked-lsn", + "525", + "x-ms-current-write-quorum", + "1", + "x-ms-current-replica-set-size", + "1", + "x-ms-xp-role", + "0", + "x-ms-global-Committed-lsn", + "-1", + "x-ms-number-of-read-regions", + "0", + "x-ms-transport-request-id", + "1436", + "x-ms-cosmos-llsn", + "525", + "x-ms-cosmos-quorum-acked-llsn", + "525", + "x-ms-session-token", + "0:525", + "x-ms-request-charge", + "2.9", + "x-ms-serviceversion", + "version=2.7.0.0", + "x-ms-activity-id", + "295bd922-b512-48bb-83f8-b51934107ba9", + "x-ms-gatewayversion", + "version=2.7.0", + "Date", + "Thu, 12 Dec 2019 23:27:28 GMT" + ] + } +] \ No newline at end of file diff --git a/libraries/botbuilder-azure/tests/TestData/CosmosDbStorage/wildcard_eTag.json b/libraries/botbuilder-azure/tests/TestData/CosmosDbStorage - Base Storage Tests/performs_batch_operations.json similarity index 52% rename from libraries/botbuilder-azure/tests/TestData/CosmosDbStorage/wildcard_eTag.json rename to libraries/botbuilder-azure/tests/TestData/CosmosDbStorage - Base Storage Tests/performs_batch_operations.json index 1ee1fdfa65..b7c41e336a 100644 --- a/libraries/botbuilder-azure/tests/TestData/CosmosDbStorage/wildcard_eTag.json +++ b/libraries/botbuilder-azure/tests/TestData/CosmosDbStorage - Base Storage Tests/performs_batch_operations.json @@ -1,46 +1,27 @@ [ { "scope": "https://localhost:8081", - "method": "GET", - "path": "/", - "body": "", - "status": 200, + "method": "POST", + "path": "/dbs/test-db/colls/bot-storage/docs", + "body": { + "id": "batch1", + "realId": "batch1", + "document": { + "count": 10 + } + }, + "status": 201, "response": { - "_self": "", - "id": "localhost", - "_rid": "localhost", - "media": "//media/", - "addresses": "//addresses/", - "_dbs": "//dbs/", - "writableLocations": [ - { - "name": "South Central US", - "databaseAccountEndpoint": "https://127.0.0.1:8081/" - } - ], - "readableLocations": [ - { - "name": "South Central US", - "databaseAccountEndpoint": "https://127.0.0.1:8081/" - } - ], - "userReplicationPolicy": { - "asyncReplication": false, - "minReplicaSetSize": 1, - "maxReplicasetSize": 4 - }, - "userConsistencyPolicy": { - "defaultConsistencyLevel": "Session" - }, - "systemReplicationPolicy": { - "minReplicaSetSize": 1, - "maxReplicasetSize": 4 - }, - "readPolicy": { - "primaryReadCoefficient": 1, - "secondaryReadCoefficient": 1 + "id": "batch1", + "realId": "batch1", + "document": { + "count": 10 }, - "queryEngineConfiguration": "{\"maxSqlQueryInputLength\":262144,\"maxJoinsPerSqlQuery\":5,\"maxLogicalAndPerSqlQuery\":500,\"maxLogicalOrPerSqlQuery\":500,\"maxUdfRefPerSqlQuery\":10,\"maxInExpressionItemsCount\":16000,\"queryMaxInMemorySortDocumentCount\":500,\"maxQueryRequestTimeoutFraction\":0.9,\"sqlAllowNonFiniteNumbers\":false,\"sqlAllowAggregateFunctions\":true,\"sqlAllowSubQuery\":true,\"sqlAllowScalarSubQuery\":true,\"allowNewKeywords\":true,\"sqlAllowLike\":false,\"maxSpatialQueryCells\":12,\"spatialMaxGeometryPointCount\":256,\"sqlAllowTop\":true,\"enableSpatialIndexing\":true}" + "_rid": "TUIrAJlnrjgHAAAAAAAAAA==", + "_self": "dbs/TUIrAA==/colls/TUIrAJlnrjg=/docs/TUIrAJlnrjgHAAAAAAAAAA==/", + "_etag": "\"00000000-0000-0000-b143-b8492e4601d5\"", + "_attachments": "attachments/", + "_ts": 1576193249 }, "rawHeaders": [ "Cache-Control", @@ -51,48 +32,83 @@ "chunked", "Content-Type", "application/json", - "Content-Location", - "https://localhost:8081/", "Server", "Microsoft-HTTPAPI/2.0", - "x-ms-max-media-storage-usage-mb", - "10240", - "x-ms-media-storage-usage-mb", - "0", - "x-ms-databaseaccount-consumed-mb", - "0", - "x-ms-databaseaccount-reserved-mb", + "Access-Control-Allow-Origin", + "", + "Access-Control-Allow-Credentials", + "true", + "x-ms-last-state-change-utc", + "Wed, 11 Dec 2019 19:46:13.459 GMT", + "etag", + "\"00000000-0000-0000-b143-b8492e4601d5\"", + "x-ms-resource-quota", + "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", + "x-ms-resource-usage", + "documentSize=0;documentsSize=3;documentsCount=5;collectionSize=6;", + "lsn", + "536", + "x-ms-schemaversion", + "1.8", + "x-ms-alt-content-path", + "dbs/test-db/colls/bot-storage", + "x-ms-content-path", + "TUIrAJlnrjg=", + "x-ms-quorum-acked-lsn", + "535", + "x-ms-current-write-quorum", + "1", + "x-ms-current-replica-set-size", + "1", + "x-ms-xp-role", "0", - "x-ms-databaseaccount-provisioned-mb", + "x-ms-global-Committed-lsn", + "-1", + "x-ms-number-of-read-regions", "0", + "x-ms-transport-request-id", + "1457", + "x-ms-cosmos-llsn", + "536", + "x-ms-cosmos-quorum-acked-llsn", + "535", + "x-ms-session-token", + "0:536", + "x-ms-request-charge", + "6.48", + "x-ms-serviceversion", + "version=2.7.0.0", + "x-ms-activity-id", + "0daf9353-a5ee-4b44-8b89-2f807a48785c", "x-ms-gatewayversion", - "version=2.0.0.0", + "version=2.7.0", "Date", - "Thu, 25 Oct 2018 20:14:43 GMT" + "Thu, 12 Dec 2019 23:27:28 GMT" ] }, { "scope": "https://localhost:8081", "method": "POST", - "path": "/dbs", + "path": "/dbs/test-db/colls/bot-storage/docs", "body": { - "query": "SELECT r._self FROM root r WHERE r.id = @id", - "parameters": [ - { - "name": "@id", - "value": "test-db" - } - ] + "id": "batch2", + "realId": "batch2", + "document": { + "count": 20 + } }, - "status": 200, + "status": 201, "response": { - "_rid": "", - "Databases": [ - { - "_self": "dbs/A7V-AA==/" - } - ], - "_count": 1 + "id": "batch2", + "realId": "batch2", + "document": { + "count": 20 + }, + "_rid": "TUIrAJlnrjgIAAAAAAAAAA==", + "_self": "dbs/TUIrAA==/colls/TUIrAJlnrjg=/docs/TUIrAJlnrjgIAAAAAAAAAA==/", + "_etag": "\"00000000-0000-0000-b143-b84980cc01d5\"", + "_attachments": "attachments/", + "_ts": 1576193249 }, "rawHeaders": [ "Cache-Control", @@ -105,20 +121,28 @@ "application/json", "Server", "Microsoft-HTTPAPI/2.0", + "Access-Control-Allow-Origin", + "", + "Access-Control-Allow-Credentials", + "true", "x-ms-last-state-change-utc", - "Thu, 25 Oct 2018 20:14:00.991 GMT", + "Wed, 11 Dec 2019 19:46:13.459 GMT", + "etag", + "\"00000000-0000-0000-b143-b84980cc01d5\"", "x-ms-resource-quota", - "databases=100;", + "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", "x-ms-resource-usage", - "databases=1;", + "documentSize=0;documentsSize=4;documentsCount=6;collectionSize=7;", "lsn", - "79", - "x-ms-item-count", - "1", + "537", "x-ms-schemaversion", - "1.6", + "1.8", + "x-ms-alt-content-path", + "dbs/test-db/colls/bot-storage", + "x-ms-content-path", + "TUIrAJlnrjg=", "x-ms-quorum-acked-lsn", - "79", + "536", "x-ms-current-write-quorum", "1", "x-ms-current-replica-set-size", @@ -130,47 +154,48 @@ "x-ms-number-of-read-regions", "0", "x-ms-transport-request-id", - "59", + "1458", "x-ms-cosmos-llsn", - "79", + "537", "x-ms-cosmos-quorum-acked-llsn", - "79", + "536", "x-ms-session-token", - "0:79", + "0:537", "x-ms-request-charge", - "4.48", + "6.48", "x-ms-serviceversion", - "version=2.0.0.0", + "version=2.7.0.0", "x-ms-activity-id", - "dae6411a-d0dd-42d1-8a1a-f1250300a148", + "d57886f3-ffca-48a4-beef-4e03df485e90", "x-ms-gatewayversion", - "version=2.0.0.0", + "version=2.7.0", "Date", - "Thu, 25 Oct 2018 20:14:43 GMT" + "Thu, 12 Dec 2019 23:27:28 GMT" ] }, { "scope": "https://localhost:8081", "method": "POST", - "path": "/dbs/A7V-AA==/colls/", + "path": "/dbs/test-db/colls/bot-storage/docs", "body": { - "query": "SELECT r._self FROM root r WHERE r.id=@id", - "parameters": [ - { - "name": "@id", - "value": "bot-storage" - } - ] + "id": "batch3", + "realId": "batch3", + "document": { + "count": 30 + } }, - "status": 200, + "status": 201, "response": { - "_rid": "A7V-AA==", - "DocumentCollections": [ - { - "_self": "dbs/A7V-AA==/colls/A7V-AIqw5hc=/" - } - ], - "_count": 1 + "id": "batch3", + "realId": "batch3", + "document": { + "count": 30 + }, + "_rid": "TUIrAJlnrjgJAAAAAAAAAA==", + "_self": "dbs/TUIrAA==/colls/TUIrAJlnrjg=/docs/TUIrAJlnrjgJAAAAAAAAAA==/", + "_etag": "\"00000000-0000-0000-b143-b849d79e01d5\"", + "_attachments": "attachments/", + "_ts": 1576193249 }, "rawHeaders": [ "Cache-Control", @@ -183,26 +208,28 @@ "application/json", "Server", "Microsoft-HTTPAPI/2.0", + "Access-Control-Allow-Origin", + "", + "Access-Control-Allow-Credentials", + "true", "x-ms-last-state-change-utc", - "Thu, 25 Oct 2018 20:14:00.991 GMT", + "Wed, 11 Dec 2019 19:46:13.459 GMT", + "etag", + "\"00000000-0000-0000-b143-b849d79e01d5\"", "x-ms-resource-quota", - "collections=5000;", + "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", "x-ms-resource-usage", - "collections=1;", - "collection-partition-index", - "0", - "collection-service-index", - "0", + "documentSize=0;documentsSize=5;documentsCount=7;collectionSize=8;", "lsn", - "79", - "x-ms-item-count", - "1", + "538", "x-ms-schemaversion", - "1.6", + "1.8", "x-ms-alt-content-path", - "dbs/test-db", + "dbs/test-db/colls/bot-storage", + "x-ms-content-path", + "TUIrAJlnrjg=", "x-ms-quorum-acked-lsn", - "79", + "537", "x-ms-current-write-quorum", "1", "x-ms-current-replica-set-size", @@ -214,64 +241,76 @@ "x-ms-number-of-read-regions", "0", "x-ms-transport-request-id", - "61", + "1459", "x-ms-cosmos-llsn", - "79", + "538", "x-ms-cosmos-quorum-acked-llsn", - "79", + "537", "x-ms-session-token", - "0:79", + "0:538", "x-ms-request-charge", - "4.5", + "6.48", "x-ms-serviceversion", - "version=2.0.0.0", + "version=2.7.0.0", "x-ms-activity-id", - "f6bd4dbb-b1af-46e7-ad71-206e66290437", + "b042d3b0-8b14-44a3-a935-aba54e7cda4d", "x-ms-gatewayversion", - "version=2.0.0.0", + "version=2.7.0", "Date", - "Thu, 25 Oct 2018 20:14:43 GMT" + "Thu, 12 Dec 2019 23:27:28 GMT" ] }, { "scope": "https://localhost:8081", - "method": "GET", - "path": "/dbs/test-db/colls/bot-storage", - "body": "", + "method": "POST", + "path": "/dbs/TUIrAA==/colls/TUIrAJlnrjg=/docs/", + "body": { + "query": "SELECT c.id, c.realId, c.document, c._etag FROM c WHERE c.id in (@id0,@id1,@id2)", + "parameters": [ + { + "name": "@id0", + "value": "batch1" + }, + { + "name": "@id1", + "value": "batch2" + }, + { + "name": "@id2", + "value": "batch3" + } + ] + }, "status": 200, "response": { - "id": "bot-storage", - "indexingPolicy": { - "indexingMode": "consistent", - "automatic": true, - "includedPaths": [ - { - "path": "/*", - "indexes": [ - { - "kind": "Range", - "dataType": "Number", - "precision": -1 - }, - { - "kind": "Hash", - "dataType": "String", - "precision": 3 - } - ] - } - ], - "excludedPaths": [] - }, - "_rid": "A7V-AIqw5hc=", - "_ts": 1540498482, - "_self": "dbs/A7V-AA==/colls/A7V-AIqw5hc=/", - "_etag": "\"00000000-0000-0000-6c9f-5d9f009a01d4\"", - "_docs": "docs/", - "_sprocs": "sprocs/", - "_triggers": "triggers/", - "_udfs": "udfs/", - "_conflicts": "conflicts/" + "_rid": "TUIrAJlnrjg=", + "Documents": [ + { + "id": "batch1", + "realId": "batch1", + "document": { + "count": 10 + }, + "_etag": "\"00000000-0000-0000-b143-b8492e4601d5\"" + }, + { + "id": "batch2", + "realId": "batch2", + "document": { + "count": 20 + }, + "_etag": "\"00000000-0000-0000-b143-b84980cc01d5\"" + }, + { + "id": "batch3", + "realId": "batch3", + "document": { + "count": 30 + }, + "_etag": "\"00000000-0000-0000-b143-b849d79e01d5\"" + } + ], + "_count": 3 }, "rawHeaders": [ "Cache-Control", @@ -282,34 +321,28 @@ "chunked", "Content-Type", "application/json", - "Content-Location", - "https://127.0.0.1:8081/dbs/test-db/colls/bot-storage", "Server", "Microsoft-HTTPAPI/2.0", + "Access-Control-Allow-Origin", + "", + "Access-Control-Allow-Credentials", + "true", "x-ms-last-state-change-utc", - "Thu, 25 Oct 2018 20:14:08.836 GMT", - "etag", - "\"00000000-0000-0000-6c9f-5d9f009a01d4\"", + "Wed, 11 Dec 2019 19:46:13.459 GMT", "x-ms-resource-quota", - "functions=25;storedProcedures=100;triggers=25;documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", + "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", "x-ms-resource-usage", - "functions=0;storedProcedures=0;triggers=0;documentSize=0;documentsSize=2;documentsCount=3;collectionSize=3;", - "collection-partition-index", - "0", - "collection-service-index", - "0", + "documentSize=0;documentsSize=5;documentsCount=8;collectionSize=8;", "lsn", - "239", + "538", + "x-ms-item-count", + "3", "x-ms-schemaversion", - "1.6", + "1.8", "x-ms-alt-content-path", - "dbs/test-db", - "x-ms-content-path", - "A7V-AA==", + "dbs/test-db/colls/bot-storage", "x-ms-quorum-acked-lsn", - "239", - "x-ms-documentdb-collection-index-transformation-progress", - "100", + "538", "x-ms-current-write-quorum", "1", "x-ms-current-replica-set-size", @@ -320,83 +353,66 @@ "-1", "x-ms-number-of-read-regions", "0", - "x-ms-item-lsn", - "234", "x-ms-transport-request-id", - "31", + "1460", "x-ms-cosmos-llsn", - "239", + "538", "x-ms-cosmos-quorum-acked-llsn", - "239", - "x-ms-cosmos-item-llsn", - "234", + "538", "x-ms-session-token", - "0:239", + "0:538", "x-ms-request-charge", - "1", + "3.29", "x-ms-serviceversion", - "version=2.0.0.0", + "version=2.7.0.0", "x-ms-activity-id", - "0fafa792-7d13-477a-a157-fafb35a7662d", + "a19655c8-be1e-4bf4-84f7-012cbce16052", "x-ms-gatewayversion", - "version=2.0.0.0", + "version=2.7.0", "Date", - "Thu, 25 Oct 2018 20:14:43 GMT" + "Thu, 12 Dec 2019 23:27:28 GMT" ] }, { "scope": "https://localhost:8081", - "method": "POST", - "path": "/dbs/test-db/colls/bot-storage/docs", - "body": { - "id": "keyUpdate3", - "realId": "keyUpdate3", - "document": { - "count": 1 - } - }, - "status": 201, - "response": { - "id": "keyUpdate3", - "realId": "keyUpdate3", - "document": { - "count": 1 - }, - "_rid": "A7V-AIqw5hcEAAAAAAAAAA==", - "_self": "dbs/A7V-AA==/colls/A7V-AIqw5hc=/docs/A7V-AIqw5hcEAAAAAAAAAA==/", - "_etag": "\"00000000-0000-0000-6c9f-5e5eb3a801d4\"", - "_attachments": "attachments/", - "_ts": 1540498483 - }, + "method": "DELETE", + "path": "/dbs/test-db/colls/bot-storage/docs/batch1", + "body": "", + "status": 204, + "response": "", "rawHeaders": [ "Cache-Control", "no-store, no-cache", "Pragma", "no-cache", - "Transfer-Encoding", - "chunked", + "Content-Length", + "0", "Content-Type", "application/json", + "Content-Location", + "https://127.0.0.1:8081/dbs/test-db/colls/bot-storage/docs/batch1", "Server", "Microsoft-HTTPAPI/2.0", + "Access-Control-Allow-Origin", + "", + "Access-Control-Allow-Credentials", + "true", "x-ms-last-state-change-utc", - "Thu, 25 Oct 2018 20:14:08.836 GMT", - "etag", - "\"00000000-0000-0000-6c9f-5e5eb3a801d4\"", + "Wed, 11 Dec 2019 19:46:13.459 GMT", "x-ms-resource-quota", "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", "x-ms-resource-usage", - "documentSize=0;documentsSize=3;documentsCount=3;collectionSize=4;", + "documentSize=0;documentsSize=4;documentsCount=8;collectionSize=7;", "lsn", - "240", + "539", "x-ms-schemaversion", - "1.6", + "1.8", "x-ms-alt-content-path", "dbs/test-db/colls/bot-storage", "x-ms-content-path", - "A7V-AIqw5hc=", + "TUIrAJlnrjg=", "x-ms-quorum-acked-lsn", - "239", + "538", "x-ms-current-write-quorum", "1", "x-ms-current-replica-set-size", @@ -408,80 +424,65 @@ "x-ms-number-of-read-regions", "0", "x-ms-transport-request-id", - "36", + "1461", "x-ms-cosmos-llsn", - "240", + "539", "x-ms-cosmos-quorum-acked-llsn", - "239", + "538", "x-ms-session-token", - "0:240", + "0:539", "x-ms-request-charge", - "5.9", + "6.48", "x-ms-serviceversion", - "version=2.0.0.0", + "version=2.7.0.0", "x-ms-activity-id", - "33c69070-6111-4f03-84c7-e4adbe7bec41", + "4ac21659-ac34-4f78-994b-2801d2aead28", "x-ms-gatewayversion", - "version=2.0.0.0", + "version=2.7.0", "Date", - "Thu, 25 Oct 2018 20:14:43 GMT" + "Thu, 12 Dec 2019 23:27:28 GMT" ] }, { "scope": "https://localhost:8081", - "method": "POST", - "path": "/dbs/A7V-AA==/colls/A7V-AIqw5hc=/docs/", - "body": { - "query": "SELECT c.id, c.realId, c.document, c._etag FROM c WHERE c.id in (@id0)", - "parameters": [ - { - "name": "@id0", - "value": "keyUpdate3" - } - ] - }, - "status": 200, - "response": { - "_rid": "A7V-AIqw5hc=", - "Documents": [ - { - "id": "keyUpdate3", - "realId": "keyUpdate3", - "document": { - "count": 1 - }, - "_etag": "\"00000000-0000-0000-6c9f-5e5eb3a801d4\"" - } - ], - "_count": 1 - }, + "method": "DELETE", + "path": "/dbs/test-db/colls/bot-storage/docs/batch2", + "body": "", + "status": 204, + "response": "", "rawHeaders": [ "Cache-Control", "no-store, no-cache", "Pragma", "no-cache", - "Transfer-Encoding", - "chunked", + "Content-Length", + "0", "Content-Type", "application/json", + "Content-Location", + "https://127.0.0.1:8081/dbs/test-db/colls/bot-storage/docs/batch2", "Server", "Microsoft-HTTPAPI/2.0", + "Access-Control-Allow-Origin", + "", + "Access-Control-Allow-Credentials", + "true", "x-ms-last-state-change-utc", - "Thu, 25 Oct 2018 20:14:08.836 GMT", + "Wed, 11 Dec 2019 19:46:13.459 GMT", "x-ms-resource-quota", "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", "x-ms-resource-usage", - "documentSize=0;documentsSize=3;documentsCount=4;collectionSize=4;", + "documentSize=0;documentsSize=3;documentsCount=7;collectionSize=6;", "lsn", - "240", - "x-ms-item-count", - "1", + "540", "x-ms-schemaversion", - "1.6", + "1.8", "x-ms-alt-content-path", "dbs/test-db/colls/bot-storage", + "x-ms-content-path", + "TUIrAJlnrjg=", "x-ms-quorum-acked-lsn", - "240", + "539", "x-ms-current-write-quorum", "1", "x-ms-current-replica-set-size", @@ -493,78 +494,65 @@ "x-ms-number-of-read-regions", "0", "x-ms-transport-request-id", - "37", + "1462", "x-ms-cosmos-llsn", - "240", + "540", "x-ms-cosmos-quorum-acked-llsn", - "240", + "539", "x-ms-session-token", - "0:240", + "0:540", "x-ms-request-charge", - "2.25", + "6.48", "x-ms-serviceversion", - "version=2.0.0.0", + "version=2.7.0.0", "x-ms-activity-id", - "37b3516e-8687-44cf-8df8-42aa67d79a1e", + "cce332d4-aad4-4a73-aac6-c2be27f5d916", "x-ms-gatewayversion", - "version=2.0.0.0", + "version=2.7.0", "Date", - "Thu, 25 Oct 2018 20:14:43 GMT" + "Thu, 12 Dec 2019 23:27:28 GMT" ] }, { "scope": "https://localhost:8081", - "method": "POST", - "path": "/dbs/test-db/colls/bot-storage/docs", - "body": { - "id": "keyUpdate3", - "realId": "keyUpdate3", - "document": { - "count": 2 - } - }, - "status": 200, - "response": { - "id": "keyUpdate3", - "realId": "keyUpdate3", - "document": { - "count": 2 - }, - "_rid": "A7V-AIqw5hcEAAAAAAAAAA==", - "_self": "dbs/A7V-AA==/colls/A7V-AIqw5hc=/docs/A7V-AIqw5hcEAAAAAAAAAA==/", - "_etag": "\"00000000-0000-0000-6c9f-5e62185d01d4\"", - "_attachments": "attachments/", - "_ts": 1540498483 - }, + "method": "DELETE", + "path": "/dbs/test-db/colls/bot-storage/docs/batch3", + "body": "", + "status": 204, + "response": "", "rawHeaders": [ "Cache-Control", "no-store, no-cache", "Pragma", "no-cache", - "Transfer-Encoding", - "chunked", + "Content-Length", + "0", "Content-Type", "application/json", + "Content-Location", + "https://127.0.0.1:8081/dbs/test-db/colls/bot-storage/docs/batch3", "Server", "Microsoft-HTTPAPI/2.0", + "Access-Control-Allow-Origin", + "", + "Access-Control-Allow-Credentials", + "true", "x-ms-last-state-change-utc", - "Thu, 25 Oct 2018 20:14:08.836 GMT", - "etag", - "\"00000000-0000-0000-6c9f-5e62185d01d4\"", + "Wed, 11 Dec 2019 19:46:13.459 GMT", "x-ms-resource-quota", "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", "x-ms-resource-usage", - "documentSize=0;documentsSize=3;documentsCount=4;collectionSize=4;", + "documentSize=0;documentsSize=3;documentsCount=6;collectionSize=5;", "lsn", - "241", + "541", "x-ms-schemaversion", - "1.6", + "1.8", "x-ms-alt-content-path", "dbs/test-db/colls/bot-storage", "x-ms-content-path", - "A7V-AIqw5hc=", + "TUIrAJlnrjg=", "x-ms-quorum-acked-lsn", - "240", + "540", "x-ms-current-write-quorum", "1", "x-ms-current-replica-set-size", @@ -576,48 +564,51 @@ "x-ms-number-of-read-regions", "0", "x-ms-transport-request-id", - "38", + "1463", "x-ms-cosmos-llsn", - "241", + "541", "x-ms-cosmos-quorum-acked-llsn", - "240", + "540", "x-ms-session-token", - "0:241", + "0:541", "x-ms-request-charge", - "11.05", + "6.48", "x-ms-serviceversion", - "version=2.0.0.0", + "version=2.7.0.0", "x-ms-activity-id", - "50776477-18f5-40bb-a11a-2fa1eb6b6308", + "0b05cef2-6ba2-4c54-af95-2239e210e8a2", "x-ms-gatewayversion", - "version=2.0.0.0", + "version=2.7.0", "Date", - "Thu, 25 Oct 2018 20:14:43 GMT" + "Thu, 12 Dec 2019 23:27:28 GMT" ] }, { "scope": "https://localhost:8081", "method": "POST", - "path": "/dbs/test-db/colls/bot-storage/docs", + "path": "/dbs/TUIrAA==/colls/TUIrAJlnrjg=/docs/", "body": { - "id": "keyUpdate3", - "realId": "keyUpdate3", - "document": { - "count": 3 - } + "query": "SELECT c.id, c.realId, c.document, c._etag FROM c WHERE c.id in (@id0,@id1,@id2)", + "parameters": [ + { + "name": "@id0", + "value": "batch1" + }, + { + "name": "@id1", + "value": "batch2" + }, + { + "name": "@id2", + "value": "batch3" + } + ] }, "status": 200, "response": { - "id": "keyUpdate3", - "realId": "keyUpdate3", - "document": { - "count": 3 - }, - "_rid": "A7V-AIqw5hcEAAAAAAAAAA==", - "_self": "dbs/A7V-AA==/colls/A7V-AIqw5hc=/docs/A7V-AIqw5hcEAAAAAAAAAA==/", - "_etag": "\"00000000-0000-0000-6c9f-5e63812901d4\"", - "_attachments": "attachments/", - "_ts": 1540498483 + "_rid": "TUIrAJlnrjg=", + "Documents": [], + "_count": 0 }, "rawHeaders": [ "Cache-Control", @@ -630,24 +621,26 @@ "application/json", "Server", "Microsoft-HTTPAPI/2.0", + "Access-Control-Allow-Origin", + "", + "Access-Control-Allow-Credentials", + "true", "x-ms-last-state-change-utc", - "Thu, 25 Oct 2018 20:14:08.836 GMT", - "etag", - "\"00000000-0000-0000-6c9f-5e63812901d4\"", + "Wed, 11 Dec 2019 19:46:13.459 GMT", "x-ms-resource-quota", "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", "x-ms-resource-usage", - "documentSize=0;documentsSize=2;documentsCount=4;collectionSize=4;", + "documentSize=0;documentsSize=3;documentsCount=5;collectionSize=5;", "lsn", - "242", + "541", + "x-ms-item-count", + "0", "x-ms-schemaversion", - "1.6", + "1.8", "x-ms-alt-content-path", "dbs/test-db/colls/bot-storage", - "x-ms-content-path", - "A7V-AIqw5hc=", "x-ms-quorum-acked-lsn", - "241", + "541", "x-ms-current-write-quorum", "1", "x-ms-current-replica-set-size", @@ -659,23 +652,23 @@ "x-ms-number-of-read-regions", "0", "x-ms-transport-request-id", - "39", + "1464", "x-ms-cosmos-llsn", - "242", + "541", "x-ms-cosmos-quorum-acked-llsn", - "241", + "541", "x-ms-session-token", - "0:242", + "0:541", "x-ms-request-charge", - "11.05", + "3.15", "x-ms-serviceversion", - "version=2.0.0.0", + "version=2.7.0.0", "x-ms-activity-id", - "8a5b6156-cd0b-481d-9f94-d44dcca1c67a", + "35880014-146f-4597-bf89-96e85e01827e", "x-ms-gatewayversion", - "version=2.0.0.0", + "version=2.7.0", "Date", - "Thu, 25 Oct 2018 20:14:43 GMT" + "Thu, 12 Dec 2019 23:27:28 GMT" ] } ] \ No newline at end of file diff --git a/libraries/botbuilder-azure/tests/TestData/CosmosDbStorage - Base Storage Tests/proceeds_through_a_waterfall_dialog.json b/libraries/botbuilder-azure/tests/TestData/CosmosDbStorage - Base Storage Tests/proceeds_through_a_waterfall_dialog.json new file mode 100644 index 0000000000..6b5dd59a00 --- /dev/null +++ b/libraries/botbuilder-azure/tests/TestData/CosmosDbStorage - Base Storage Tests/proceeds_through_a_waterfall_dialog.json @@ -0,0 +1,1444 @@ +[ + { + "scope": "https://localhost:8081", + "method": "POST", + "path": "/dbs/TUIrAA==/colls/TUIrAJlnrjg=/docs/", + "body": { + "query": "SELECT c.id, c.realId, c.document, c._etag FROM c WHERE c.id in (@id0)", + "parameters": [ + { + "name": "@id0", + "value": "test*2fconversations*2fConvo1*2f" + } + ] + }, + "status": 200, + "response": { + "_rid": "TUIrAJlnrjg=", + "Documents": [], + "_count": 0 + }, + "rawHeaders": [ + "Cache-Control", + "no-store, no-cache", + "Pragma", + "no-cache", + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json", + "Server", + "Microsoft-HTTPAPI/2.0", + "Access-Control-Allow-Origin", + "", + "Access-Control-Allow-Credentials", + "true", + "x-ms-last-state-change-utc", + "Wed, 11 Dec 2019 19:46:13.459 GMT", + "x-ms-resource-quota", + "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", + "x-ms-resource-usage", + "documentSize=0;documentsSize=3;documentsCount=5;collectionSize=5;", + "lsn", + "541", + "x-ms-item-count", + "0", + "x-ms-schemaversion", + "1.8", + "x-ms-alt-content-path", + "dbs/test-db/colls/bot-storage", + "x-ms-quorum-acked-lsn", + "541", + "x-ms-current-write-quorum", + "1", + "x-ms-current-replica-set-size", + "1", + "x-ms-xp-role", + "0", + "x-ms-global-Committed-lsn", + "-1", + "x-ms-number-of-read-regions", + "0", + "x-ms-transport-request-id", + "1465", + "x-ms-cosmos-llsn", + "541", + "x-ms-cosmos-quorum-acked-llsn", + "541", + "x-ms-session-token", + "0:541", + "x-ms-request-charge", + "2.85", + "x-ms-serviceversion", + "version=2.7.0.0", + "x-ms-activity-id", + "9b1a41a4-2e77-4a02-91eb-6fbf7db252c0", + "x-ms-gatewayversion", + "version=2.7.0", + "Date", + "Thu, 12 Dec 2019 23:27:28 GMT" + ] + }, + { + "scope": "https://localhost:8081", + "method": "POST", + "path": "/dbs/test-db/colls/bot-storage/docs", + "body": { + "id": "test*2fconversations*2fConvo1*2f", + "realId": "test/conversations/Convo1/", + "document": { + "dialogState": { + "dialogStack": [ + { + "id": "waterfallDialog", + "state": { + "options": {}, + "values": { + "instanceId": "fakeInstanceId" + }, + "stepIndex": 0 + } + } + ] + } + } + }, + "status": 201, + "response": { + "id": "test*2fconversations*2fConvo1*2f", + "realId": "test/conversations/Convo1/", + "document": { + "dialogState": { + "dialogStack": [ + { + "id": "waterfallDialog", + "state": { + "options": {}, + "values": { + "instanceId": "528abd58-bd62-e84c-3357-036c89a637f4" + }, + "stepIndex": 0 + } + } + ] + } + }, + "_rid": "TUIrAJlnrjgKAAAAAAAAAA==", + "_self": "dbs/TUIrAA==/colls/TUIrAJlnrjg=/docs/TUIrAJlnrjgKAAAAAAAAAA==/", + "_etag": "\"00000000-0000-0000-b143-b853a95401d5\"", + "_attachments": "attachments/", + "_ts": 1576193249 + }, + "rawHeaders": [ + "Cache-Control", + "no-store, no-cache", + "Pragma", + "no-cache", + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json", + "Server", + "Microsoft-HTTPAPI/2.0", + "Access-Control-Allow-Origin", + "", + "Access-Control-Allow-Credentials", + "true", + "x-ms-last-state-change-utc", + "Wed, 11 Dec 2019 19:46:13.459 GMT", + "etag", + "\"00000000-0000-0000-b143-b853a95401d5\"", + "x-ms-resource-quota", + "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", + "x-ms-resource-usage", + "documentSize=0;documentsSize=3;documentsCount=5;collectionSize=6;", + "lsn", + "542", + "x-ms-schemaversion", + "1.8", + "x-ms-alt-content-path", + "dbs/test-db/colls/bot-storage", + "x-ms-content-path", + "TUIrAJlnrjg=", + "x-ms-quorum-acked-lsn", + "541", + "x-ms-current-write-quorum", + "1", + "x-ms-current-replica-set-size", + "1", + "x-ms-xp-role", + "0", + "x-ms-global-Committed-lsn", + "-1", + "x-ms-number-of-read-regions", + "0", + "x-ms-transport-request-id", + "1466", + "x-ms-cosmos-llsn", + "542", + "x-ms-cosmos-quorum-acked-llsn", + "541", + "x-ms-session-token", + "0:542", + "x-ms-request-charge", + "8.38", + "x-ms-serviceversion", + "version=2.7.0.0", + "x-ms-activity-id", + "c7c77e98-c4a9-467a-a5db-e9ba897c9556", + "x-ms-gatewayversion", + "version=2.7.0", + "Date", + "Thu, 12 Dec 2019 23:27:28 GMT" + ] + }, + { + "scope": "https://localhost:8081", + "method": "POST", + "path": "/dbs/TUIrAA==/colls/TUIrAJlnrjg=/docs/", + "body": { + "query": "SELECT c.id, c.realId, c.document, c._etag FROM c WHERE c.id in (@id0)", + "parameters": [ + { + "name": "@id0", + "value": "test*2fconversations*2fConvo1*2f" + } + ] + }, + "status": 200, + "response": { + "_rid": "TUIrAJlnrjg=", + "Documents": [ + { + "id": "test*2fconversations*2fConvo1*2f", + "realId": "test/conversations/Convo1/", + "document": { + "dialogState": { + "dialogStack": [ + { + "id": "waterfallDialog", + "state": { + "options": {}, + "values": { + "instanceId": "528abd58-bd62-e84c-3357-036c89a637f4" + }, + "stepIndex": 0 + } + } + ] + } + }, + "_etag": "\"00000000-0000-0000-b143-b853a95401d5\"" + } + ], + "_count": 1 + }, + "rawHeaders": [ + "Cache-Control", + "no-store, no-cache", + "Pragma", + "no-cache", + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json", + "Server", + "Microsoft-HTTPAPI/2.0", + "Access-Control-Allow-Origin", + "", + "Access-Control-Allow-Credentials", + "true", + "x-ms-last-state-change-utc", + "Wed, 11 Dec 2019 19:46:13.459 GMT", + "x-ms-resource-quota", + "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", + "x-ms-resource-usage", + "documentSize=0;documentsSize=3;documentsCount=6;collectionSize=6;", + "lsn", + "542", + "x-ms-item-count", + "1", + "x-ms-schemaversion", + "1.8", + "x-ms-alt-content-path", + "dbs/test-db/colls/bot-storage", + "x-ms-quorum-acked-lsn", + "542", + "x-ms-current-write-quorum", + "1", + "x-ms-current-replica-set-size", + "1", + "x-ms-xp-role", + "0", + "x-ms-global-Committed-lsn", + "-1", + "x-ms-number-of-read-regions", + "0", + "x-ms-transport-request-id", + "1467", + "x-ms-cosmos-llsn", + "542", + "x-ms-cosmos-quorum-acked-llsn", + "542", + "x-ms-session-token", + "0:542", + "x-ms-request-charge", + "2.9", + "x-ms-serviceversion", + "version=2.7.0.0", + "x-ms-activity-id", + "918ea2b3-9a01-4b43-9a77-654f189c8638", + "x-ms-gatewayversion", + "version=2.7.0", + "Date", + "Thu, 12 Dec 2019 23:27:28 GMT" + ] + }, + { + "scope": "https://localhost:8081", + "method": "POST", + "path": "/dbs/test-db/colls/bot-storage/docs", + "body": { + "id": "test*2fconversations*2fConvo1*2f", + "realId": "test/conversations/Convo1/", + "document": { + "dialogState": { + "dialogStack": [ + { + "id": "waterfallDialog", + "state": { + "options": {}, + "values": { + "instanceId": "fakeInstanceId" + }, + "stepIndex": 1 + } + }, + { + "id": "textPrompt", + "state": { + "options": { + "prompt": { + "type": "message", + "text": "Please type your name.", + "inputHint": "acceptingInput" + } + }, + "state": {} + } + } + ] + } + } + }, + "status": 200, + "response": { + "id": "test*2fconversations*2fConvo1*2f", + "realId": "test/conversations/Convo1/", + "document": { + "dialogState": { + "dialogStack": [ + { + "id": "waterfallDialog", + "state": { + "options": {}, + "values": { + "instanceId": "528abd58-bd62-e84c-3357-036c89a637f4" + }, + "stepIndex": 1 + } + }, + { + "id": "textPrompt", + "state": { + "options": { + "prompt": { + "type": "message", + "text": "Please type your name.", + "inputHint": "acceptingInput" + } + }, + "state": {} + } + } + ] + } + }, + "_rid": "TUIrAJlnrjgKAAAAAAAAAA==", + "_self": "dbs/TUIrAA==/colls/TUIrAJlnrjg=/docs/TUIrAJlnrjgKAAAAAAAAAA==/", + "_etag": "\"00000000-0000-0000-b143-b85615eb01d5\"", + "_attachments": "attachments/", + "_ts": 1576193249 + }, + "rawHeaders": [ + "Cache-Control", + "no-store, no-cache", + "Pragma", + "no-cache", + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json", + "Server", + "Microsoft-HTTPAPI/2.0", + "Access-Control-Allow-Origin", + "", + "Access-Control-Allow-Credentials", + "true", + "x-ms-last-state-change-utc", + "Wed, 11 Dec 2019 19:46:13.459 GMT", + "etag", + "\"00000000-0000-0000-b143-b85615eb01d5\"", + "x-ms-resource-quota", + "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", + "x-ms-resource-usage", + "documentSize=0;documentsSize=3;documentsCount=6;collectionSize=6;", + "lsn", + "543", + "x-ms-schemaversion", + "1.8", + "x-ms-alt-content-path", + "dbs/test-db/colls/bot-storage", + "x-ms-content-path", + "TUIrAJlnrjg=", + "x-ms-quorum-acked-lsn", + "542", + "x-ms-current-write-quorum", + "1", + "x-ms-current-replica-set-size", + "1", + "x-ms-xp-role", + "0", + "x-ms-global-Committed-lsn", + "-1", + "x-ms-number-of-read-regions", + "0", + "x-ms-transport-request-id", + "1468", + "x-ms-cosmos-llsn", + "543", + "x-ms-cosmos-quorum-acked-llsn", + "542", + "x-ms-session-token", + "0:543", + "x-ms-request-charge", + "12.38", + "x-ms-serviceversion", + "version=2.7.0.0", + "x-ms-activity-id", + "d2da80b3-3290-4d6c-bbd8-2a1469a164a3", + "x-ms-gatewayversion", + "version=2.7.0", + "Date", + "Thu, 12 Dec 2019 23:27:28 GMT" + ] + }, + { + "scope": "https://localhost:8081", + "method": "POST", + "path": "/dbs/TUIrAA==/colls/TUIrAJlnrjg=/docs/", + "body": { + "query": "SELECT c.id, c.realId, c.document, c._etag FROM c WHERE c.id in (@id0)", + "parameters": [ + { + "name": "@id0", + "value": "test*2fconversations*2fConvo1*2f" + } + ] + }, + "status": 200, + "response": { + "_rid": "TUIrAJlnrjg=", + "Documents": [ + { + "id": "test*2fconversations*2fConvo1*2f", + "realId": "test/conversations/Convo1/", + "document": { + "dialogState": { + "dialogStack": [ + { + "id": "waterfallDialog", + "state": { + "options": {}, + "values": { + "instanceId": "528abd58-bd62-e84c-3357-036c89a637f4" + }, + "stepIndex": 1 + } + }, + { + "id": "textPrompt", + "state": { + "options": { + "prompt": { + "type": "message", + "text": "Please type your name.", + "inputHint": "acceptingInput" + } + }, + "state": {} + } + } + ] + } + }, + "_etag": "\"00000000-0000-0000-b143-b85615eb01d5\"" + } + ], + "_count": 1 + }, + "rawHeaders": [ + "Cache-Control", + "no-store, no-cache", + "Pragma", + "no-cache", + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json", + "Server", + "Microsoft-HTTPAPI/2.0", + "Access-Control-Allow-Origin", + "", + "Access-Control-Allow-Credentials", + "true", + "x-ms-last-state-change-utc", + "Wed, 11 Dec 2019 19:46:13.459 GMT", + "x-ms-resource-quota", + "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", + "x-ms-resource-usage", + "documentSize=0;documentsSize=3;documentsCount=6;collectionSize=6;", + "lsn", + "543", + "x-ms-item-count", + "1", + "x-ms-schemaversion", + "1.8", + "x-ms-alt-content-path", + "dbs/test-db/colls/bot-storage", + "x-ms-quorum-acked-lsn", + "543", + "x-ms-current-write-quorum", + "1", + "x-ms-current-replica-set-size", + "1", + "x-ms-xp-role", + "0", + "x-ms-global-Committed-lsn", + "-1", + "x-ms-number-of-read-regions", + "0", + "x-ms-transport-request-id", + "1469", + "x-ms-cosmos-llsn", + "543", + "x-ms-cosmos-quorum-acked-llsn", + "543", + "x-ms-session-token", + "0:543", + "x-ms-request-charge", + "2.9", + "x-ms-serviceversion", + "version=2.7.0.0", + "x-ms-activity-id", + "1a8349af-a6f8-4012-8113-913d877a9cc2", + "x-ms-gatewayversion", + "version=2.7.0", + "Date", + "Thu, 12 Dec 2019 23:27:28 GMT" + ] + }, + { + "scope": "https://localhost:8081", + "method": "POST", + "path": "/dbs/test-db/colls/bot-storage/docs", + "body": { + "id": "test*2fconversations*2fConvo1*2f", + "realId": "test/conversations/Convo1/", + "document": { + "dialogState": { + "dialogStack": [ + { + "id": "waterfallDialog", + "state": { + "options": {}, + "values": { + "instanceId": "fakeInstanceId" + }, + "stepIndex": 1 + } + }, + { + "id": "textPrompt", + "state": { + "options": { + "prompt": { + "type": "message", + "text": "Please type your name.", + "inputHint": "acceptingInput" + } + }, + "state": { + "attemptCount": 1 + } + } + } + ] + } + } + }, + "status": 200, + "response": { + "id": "test*2fconversations*2fConvo1*2f", + "realId": "test/conversations/Convo1/", + "document": { + "dialogState": { + "dialogStack": [ + { + "id": "waterfallDialog", + "state": { + "options": {}, + "values": { + "instanceId": "528abd58-bd62-e84c-3357-036c89a637f4" + }, + "stepIndex": 1 + } + }, + { + "id": "textPrompt", + "state": { + "options": { + "prompt": { + "type": "message", + "text": "Please type your name.", + "inputHint": "acceptingInput" + } + }, + "state": { + "attemptCount": 1 + } + } + } + ] + } + }, + "_rid": "TUIrAJlnrjgKAAAAAAAAAA==", + "_self": "dbs/TUIrAA==/colls/TUIrAJlnrjg=/docs/TUIrAJlnrjgKAAAAAAAAAA==/", + "_etag": "\"00000000-0000-0000-b143-b8592d9b01d5\"", + "_attachments": "attachments/", + "_ts": 1576193249 + }, + "rawHeaders": [ + "Cache-Control", + "no-store, no-cache", + "Pragma", + "no-cache", + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json", + "Server", + "Microsoft-HTTPAPI/2.0", + "Access-Control-Allow-Origin", + "", + "Access-Control-Allow-Credentials", + "true", + "x-ms-last-state-change-utc", + "Wed, 11 Dec 2019 19:46:13.459 GMT", + "etag", + "\"00000000-0000-0000-b143-b8592d9b01d5\"", + "x-ms-resource-quota", + "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", + "x-ms-resource-usage", + "documentSize=0;documentsSize=3;documentsCount=6;collectionSize=6;", + "lsn", + "544", + "x-ms-schemaversion", + "1.8", + "x-ms-alt-content-path", + "dbs/test-db/colls/bot-storage", + "x-ms-content-path", + "TUIrAJlnrjg=", + "x-ms-quorum-acked-lsn", + "543", + "x-ms-current-write-quorum", + "1", + "x-ms-current-replica-set-size", + "1", + "x-ms-xp-role", + "0", + "x-ms-global-Committed-lsn", + "-1", + "x-ms-number-of-read-regions", + "0", + "x-ms-transport-request-id", + "1470", + "x-ms-cosmos-llsn", + "544", + "x-ms-cosmos-quorum-acked-llsn", + "543", + "x-ms-session-token", + "0:544", + "x-ms-request-charge", + "10.67", + "x-ms-serviceversion", + "version=2.7.0.0", + "x-ms-activity-id", + "53f7e47b-1737-410c-b2ac-4d31a73e489f", + "x-ms-gatewayversion", + "version=2.7.0", + "Date", + "Thu, 12 Dec 2019 23:27:28 GMT" + ] + }, + { + "scope": "https://localhost:8081", + "method": "POST", + "path": "/dbs/TUIrAA==/colls/TUIrAJlnrjg=/docs/", + "body": { + "query": "SELECT c.id, c.realId, c.document, c._etag FROM c WHERE c.id in (@id0)", + "parameters": [ + { + "name": "@id0", + "value": "test*2fconversations*2fConvo1*2f" + } + ] + }, + "status": 200, + "response": { + "_rid": "TUIrAJlnrjg=", + "Documents": [ + { + "id": "test*2fconversations*2fConvo1*2f", + "realId": "test/conversations/Convo1/", + "document": { + "dialogState": { + "dialogStack": [ + { + "id": "waterfallDialog", + "state": { + "options": {}, + "values": { + "instanceId": "528abd58-bd62-e84c-3357-036c89a637f4" + }, + "stepIndex": 1 + } + }, + { + "id": "textPrompt", + "state": { + "options": { + "prompt": { + "type": "message", + "text": "Please type your name.", + "inputHint": "acceptingInput" + } + }, + "state": { + "attemptCount": 1 + } + } + } + ] + } + }, + "_etag": "\"00000000-0000-0000-b143-b8592d9b01d5\"" + } + ], + "_count": 1 + }, + "rawHeaders": [ + "Cache-Control", + "no-store, no-cache", + "Pragma", + "no-cache", + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json", + "Server", + "Microsoft-HTTPAPI/2.0", + "Access-Control-Allow-Origin", + "", + "Access-Control-Allow-Credentials", + "true", + "x-ms-last-state-change-utc", + "Wed, 11 Dec 2019 19:46:13.459 GMT", + "x-ms-resource-quota", + "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", + "x-ms-resource-usage", + "documentSize=0;documentsSize=3;documentsCount=6;collectionSize=6;", + "lsn", + "544", + "x-ms-item-count", + "1", + "x-ms-schemaversion", + "1.8", + "x-ms-alt-content-path", + "dbs/test-db/colls/bot-storage", + "x-ms-quorum-acked-lsn", + "544", + "x-ms-current-write-quorum", + "1", + "x-ms-current-replica-set-size", + "1", + "x-ms-xp-role", + "0", + "x-ms-global-Committed-lsn", + "-1", + "x-ms-number-of-read-regions", + "0", + "x-ms-transport-request-id", + "1471", + "x-ms-cosmos-llsn", + "544", + "x-ms-cosmos-quorum-acked-llsn", + "544", + "x-ms-session-token", + "0:544", + "x-ms-request-charge", + "2.9", + "x-ms-serviceversion", + "version=2.7.0.0", + "x-ms-activity-id", + "c02f9621-a0ff-4659-a7de-e6c54ef4b50d", + "x-ms-gatewayversion", + "version=2.7.0", + "Date", + "Thu, 12 Dec 2019 23:27:28 GMT" + ] + }, + { + "scope": "https://localhost:8081", + "method": "POST", + "path": "/dbs/test-db/colls/bot-storage/docs", + "body": { + "id": "test*2fconversations*2fConvo1*2f", + "realId": "test/conversations/Convo1/", + "document": { + "dialogState": { + "dialogStack": [ + { + "id": "waterfallDialog", + "state": { + "options": {}, + "values": { + "instanceId": "fakeInstanceId" + }, + "stepIndex": 1 + } + }, + { + "id": "textPrompt", + "state": { + "options": { + "prompt": { + "type": "message", + "text": "Please type your name.", + "inputHint": "acceptingInput" + } + }, + "state": { + "attemptCount": 2 + } + } + } + ] + } + } + }, + "status": 200, + "response": { + "id": "test*2fconversations*2fConvo1*2f", + "realId": "test/conversations/Convo1/", + "document": { + "dialogState": { + "dialogStack": [ + { + "id": "waterfallDialog", + "state": { + "options": {}, + "values": { + "instanceId": "528abd58-bd62-e84c-3357-036c89a637f4" + }, + "stepIndex": 1 + } + }, + { + "id": "textPrompt", + "state": { + "options": { + "prompt": { + "type": "message", + "text": "Please type your name.", + "inputHint": "acceptingInput" + } + }, + "state": { + "attemptCount": 2 + } + } + } + ] + } + }, + "_rid": "TUIrAJlnrjgKAAAAAAAAAA==", + "_self": "dbs/TUIrAA==/colls/TUIrAJlnrjg=/docs/TUIrAJlnrjgKAAAAAAAAAA==/", + "_etag": "\"00000000-0000-0000-b143-b85bfe7001d5\"", + "_attachments": "attachments/", + "_ts": 1576193249 + }, + "rawHeaders": [ + "Cache-Control", + "no-store, no-cache", + "Pragma", + "no-cache", + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json", + "Server", + "Microsoft-HTTPAPI/2.0", + "Access-Control-Allow-Origin", + "", + "Access-Control-Allow-Credentials", + "true", + "x-ms-last-state-change-utc", + "Wed, 11 Dec 2019 19:46:13.459 GMT", + "etag", + "\"00000000-0000-0000-b143-b85bfe7001d5\"", + "x-ms-resource-quota", + "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", + "x-ms-resource-usage", + "documentSize=0;documentsSize=3;documentsCount=6;collectionSize=6;", + "lsn", + "545", + "x-ms-schemaversion", + "1.8", + "x-ms-alt-content-path", + "dbs/test-db/colls/bot-storage", + "x-ms-content-path", + "TUIrAJlnrjg=", + "x-ms-quorum-acked-lsn", + "544", + "x-ms-current-write-quorum", + "1", + "x-ms-current-replica-set-size", + "1", + "x-ms-xp-role", + "0", + "x-ms-global-Committed-lsn", + "-1", + "x-ms-number-of-read-regions", + "0", + "x-ms-transport-request-id", + "1472", + "x-ms-cosmos-llsn", + "545", + "x-ms-cosmos-quorum-acked-llsn", + "544", + "x-ms-session-token", + "0:545", + "x-ms-request-charge", + "10.67", + "x-ms-serviceversion", + "version=2.7.0.0", + "x-ms-activity-id", + "c03b25d9-8f01-4578-83eb-56529e26196a", + "x-ms-gatewayversion", + "version=2.7.0", + "Date", + "Thu, 12 Dec 2019 23:27:28 GMT" + ] + }, + { + "scope": "https://localhost:8081", + "method": "POST", + "path": "/dbs/TUIrAA==/colls/TUIrAJlnrjg=/docs/", + "body": { + "query": "SELECT c.id, c.realId, c.document, c._etag FROM c WHERE c.id in (@id0)", + "parameters": [ + { + "name": "@id0", + "value": "test*2fconversations*2fConvo1*2f" + } + ] + }, + "status": 200, + "response": { + "_rid": "TUIrAJlnrjg=", + "Documents": [ + { + "id": "test*2fconversations*2fConvo1*2f", + "realId": "test/conversations/Convo1/", + "document": { + "dialogState": { + "dialogStack": [ + { + "id": "waterfallDialog", + "state": { + "options": {}, + "values": { + "instanceId": "528abd58-bd62-e84c-3357-036c89a637f4" + }, + "stepIndex": 1 + } + }, + { + "id": "textPrompt", + "state": { + "options": { + "prompt": { + "type": "message", + "text": "Please type your name.", + "inputHint": "acceptingInput" + } + }, + "state": { + "attemptCount": 2 + } + } + } + ] + } + }, + "_etag": "\"00000000-0000-0000-b143-b85bfe7001d5\"" + } + ], + "_count": 1 + }, + "rawHeaders": [ + "Cache-Control", + "no-store, no-cache", + "Pragma", + "no-cache", + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json", + "Server", + "Microsoft-HTTPAPI/2.0", + "Access-Control-Allow-Origin", + "", + "Access-Control-Allow-Credentials", + "true", + "x-ms-last-state-change-utc", + "Wed, 11 Dec 2019 19:46:13.459 GMT", + "x-ms-resource-quota", + "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", + "x-ms-resource-usage", + "documentSize=0;documentsSize=3;documentsCount=6;collectionSize=6;", + "lsn", + "545", + "x-ms-item-count", + "1", + "x-ms-schemaversion", + "1.8", + "x-ms-alt-content-path", + "dbs/test-db/colls/bot-storage", + "x-ms-quorum-acked-lsn", + "545", + "x-ms-current-write-quorum", + "1", + "x-ms-current-replica-set-size", + "1", + "x-ms-xp-role", + "0", + "x-ms-global-Committed-lsn", + "-1", + "x-ms-number-of-read-regions", + "0", + "x-ms-transport-request-id", + "1473", + "x-ms-cosmos-llsn", + "545", + "x-ms-cosmos-quorum-acked-llsn", + "545", + "x-ms-session-token", + "0:545", + "x-ms-request-charge", + "2.9", + "x-ms-serviceversion", + "version=2.7.0.0", + "x-ms-activity-id", + "3e7b48ea-c481-4221-b640-5ea75a40d3ba", + "x-ms-gatewayversion", + "version=2.7.0", + "Date", + "Thu, 12 Dec 2019 23:27:28 GMT" + ] + }, + { + "scope": "https://localhost:8081", + "method": "POST", + "path": "/dbs/test-db/colls/bot-storage/docs", + "body": { + "id": "test*2fconversations*2fConvo1*2f", + "realId": "test/conversations/Convo1/", + "document": { + "dialogState": { + "dialogStack": [ + { + "id": "waterfallDialog", + "state": { + "options": {}, + "values": { + "instanceId": "fakeInstanceId" + }, + "stepIndex": 1 + } + }, + { + "id": "textPrompt", + "state": { + "options": { + "prompt": { + "type": "message", + "text": "Please type your name.", + "inputHint": "acceptingInput" + } + }, + "state": { + "attemptCount": 3 + } + } + } + ] + } + } + }, + "status": 200, + "response": { + "id": "test*2fconversations*2fConvo1*2f", + "realId": "test/conversations/Convo1/", + "document": { + "dialogState": { + "dialogStack": [ + { + "id": "waterfallDialog", + "state": { + "options": {}, + "values": { + "instanceId": "528abd58-bd62-e84c-3357-036c89a637f4" + }, + "stepIndex": 1 + } + }, + { + "id": "textPrompt", + "state": { + "options": { + "prompt": { + "type": "message", + "text": "Please type your name.", + "inputHint": "acceptingInput" + } + }, + "state": { + "attemptCount": 3 + } + } + } + ] + } + }, + "_rid": "TUIrAJlnrjgKAAAAAAAAAA==", + "_self": "dbs/TUIrAA==/colls/TUIrAJlnrjg=/docs/TUIrAJlnrjgKAAAAAAAAAA==/", + "_etag": "\"00000000-0000-0000-b143-b85dff7201d5\"", + "_attachments": "attachments/", + "_ts": 1576193249 + }, + "rawHeaders": [ + "Cache-Control", + "no-store, no-cache", + "Pragma", + "no-cache", + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json", + "Server", + "Microsoft-HTTPAPI/2.0", + "Access-Control-Allow-Origin", + "", + "Access-Control-Allow-Credentials", + "true", + "x-ms-last-state-change-utc", + "Wed, 11 Dec 2019 19:46:13.459 GMT", + "etag", + "\"00000000-0000-0000-b143-b85dff7201d5\"", + "x-ms-resource-quota", + "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", + "x-ms-resource-usage", + "documentSize=0;documentsSize=2;documentsCount=6;collectionSize=6;", + "lsn", + "546", + "x-ms-schemaversion", + "1.8", + "x-ms-alt-content-path", + "dbs/test-db/colls/bot-storage", + "x-ms-content-path", + "TUIrAJlnrjg=", + "x-ms-quorum-acked-lsn", + "545", + "x-ms-current-write-quorum", + "1", + "x-ms-current-replica-set-size", + "1", + "x-ms-xp-role", + "0", + "x-ms-global-Committed-lsn", + "-1", + "x-ms-number-of-read-regions", + "0", + "x-ms-transport-request-id", + "1474", + "x-ms-cosmos-llsn", + "546", + "x-ms-cosmos-quorum-acked-llsn", + "545", + "x-ms-session-token", + "0:546", + "x-ms-request-charge", + "10.67", + "x-ms-serviceversion", + "version=2.7.0.0", + "x-ms-activity-id", + "ff6f073b-2e5c-4a83-924d-d9ad9daa12da", + "x-ms-gatewayversion", + "version=2.7.0", + "Date", + "Thu, 12 Dec 2019 23:27:28 GMT" + ] + }, + { + "scope": "https://localhost:8081", + "method": "POST", + "path": "/dbs/TUIrAA==/colls/TUIrAJlnrjg=/docs/", + "body": { + "query": "SELECT c.id, c.realId, c.document, c._etag FROM c WHERE c.id in (@id0)", + "parameters": [ + { + "name": "@id0", + "value": "test*2fconversations*2fConvo1*2f" + } + ] + }, + "status": 200, + "response": { + "_rid": "TUIrAJlnrjg=", + "Documents": [ + { + "id": "test*2fconversations*2fConvo1*2f", + "realId": "test/conversations/Convo1/", + "document": { + "dialogState": { + "dialogStack": [ + { + "id": "waterfallDialog", + "state": { + "options": {}, + "values": { + "instanceId": "528abd58-bd62-e84c-3357-036c89a637f4" + }, + "stepIndex": 1 + } + }, + { + "id": "textPrompt", + "state": { + "options": { + "prompt": { + "type": "message", + "text": "Please type your name.", + "inputHint": "acceptingInput" + } + }, + "state": { + "attemptCount": 3 + } + } + } + ] + } + }, + "_etag": "\"00000000-0000-0000-b143-b85dff7201d5\"" + } + ], + "_count": 1 + }, + "rawHeaders": [ + "Cache-Control", + "no-store, no-cache", + "Pragma", + "no-cache", + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json", + "Server", + "Microsoft-HTTPAPI/2.0", + "Access-Control-Allow-Origin", + "", + "Access-Control-Allow-Credentials", + "true", + "x-ms-last-state-change-utc", + "Wed, 11 Dec 2019 19:46:13.459 GMT", + "x-ms-resource-quota", + "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", + "x-ms-resource-usage", + "documentSize=0;documentsSize=2;documentsCount=6;collectionSize=6;", + "lsn", + "546", + "x-ms-item-count", + "1", + "x-ms-schemaversion", + "1.8", + "x-ms-alt-content-path", + "dbs/test-db/colls/bot-storage", + "x-ms-quorum-acked-lsn", + "546", + "x-ms-current-write-quorum", + "1", + "x-ms-current-replica-set-size", + "1", + "x-ms-xp-role", + "0", + "x-ms-global-Committed-lsn", + "-1", + "x-ms-number-of-read-regions", + "0", + "x-ms-transport-request-id", + "1475", + "x-ms-cosmos-llsn", + "546", + "x-ms-cosmos-quorum-acked-llsn", + "546", + "x-ms-session-token", + "0:546", + "x-ms-request-charge", + "2.9", + "x-ms-serviceversion", + "version=2.7.0.0", + "x-ms-activity-id", + "0fea4405-2f25-4865-8dc0-119bf1579a7b", + "x-ms-gatewayversion", + "version=2.7.0", + "Date", + "Thu, 12 Dec 2019 23:27:28 GMT" + ] + }, + { + "scope": "https://localhost:8081", + "method": "POST", + "path": "/dbs/test-db/colls/bot-storage/docs", + "body": { + "id": "test*2fconversations*2fConvo1*2f", + "realId": "test/conversations/Convo1/", + "document": { + "dialogState": { + "dialogStack": [ + { + "id": "waterfallDialog", + "state": { + "options": {}, + "values": { + "instanceId": "fakeInstanceId" + }, + "stepIndex": 2 + } + } + ] + } + } + }, + "status": 200, + "response": { + "id": "test*2fconversations*2fConvo1*2f", + "realId": "test/conversations/Convo1/", + "document": { + "dialogState": { + "dialogStack": [ + { + "id": "waterfallDialog", + "state": { + "options": {}, + "values": { + "instanceId": "528abd58-bd62-e84c-3357-036c89a637f4" + }, + "stepIndex": 2 + } + } + ] + } + }, + "_rid": "TUIrAJlnrjgKAAAAAAAAAA==", + "_self": "dbs/TUIrAA==/colls/TUIrAJlnrjg=/docs/TUIrAJlnrjgKAAAAAAAAAA==/", + "_etag": "\"00000000-0000-0000-b143-b860299701d5\"", + "_attachments": "attachments/", + "_ts": 1576193249 + }, + "rawHeaders": [ + "Cache-Control", + "no-store, no-cache", + "Pragma", + "no-cache", + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json", + "Server", + "Microsoft-HTTPAPI/2.0", + "Access-Control-Allow-Origin", + "", + "Access-Control-Allow-Credentials", + "true", + "x-ms-last-state-change-utc", + "Wed, 11 Dec 2019 19:46:13.459 GMT", + "etag", + "\"00000000-0000-0000-b143-b860299701d5\"", + "x-ms-resource-quota", + "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", + "x-ms-resource-usage", + "documentSize=0;documentsSize=2;documentsCount=6;collectionSize=6;", + "lsn", + "547", + "x-ms-schemaversion", + "1.8", + "x-ms-alt-content-path", + "dbs/test-db/colls/bot-storage", + "x-ms-content-path", + "TUIrAJlnrjg=", + "x-ms-quorum-acked-lsn", + "546", + "x-ms-current-write-quorum", + "1", + "x-ms-current-replica-set-size", + "1", + "x-ms-xp-role", + "0", + "x-ms-global-Committed-lsn", + "-1", + "x-ms-number-of-read-regions", + "0", + "x-ms-transport-request-id", + "1476", + "x-ms-cosmos-llsn", + "547", + "x-ms-cosmos-quorum-acked-llsn", + "546", + "x-ms-session-token", + "0:547", + "x-ms-request-charge", + "12.76", + "x-ms-serviceversion", + "version=2.7.0.0", + "x-ms-activity-id", + "1c0534fc-702f-415a-a316-0c407406ad79", + "x-ms-gatewayversion", + "version=2.7.0", + "Date", + "Thu, 12 Dec 2019 23:27:28 GMT" + ] + } +] \ No newline at end of file diff --git a/libraries/botbuilder-azure/tests/TestData/CosmosDbStorage/read_of_unknown_key.json b/libraries/botbuilder-azure/tests/TestData/CosmosDbStorage - Base Storage Tests/return_empty_object_when_reading_unknown_key.json similarity index 70% rename from libraries/botbuilder-azure/tests/TestData/CosmosDbStorage/read_of_unknown_key.json rename to libraries/botbuilder-azure/tests/TestData/CosmosDbStorage - Base Storage Tests/return_empty_object_when_reading_unknown_key.json index 54424841d9..ba93103a61 100644 --- a/libraries/botbuilder-azure/tests/TestData/CosmosDbStorage/read_of_unknown_key.json +++ b/libraries/botbuilder-azure/tests/TestData/CosmosDbStorage - Base Storage Tests/return_empty_object_when_reading_unknown_key.json @@ -40,7 +40,7 @@ "primaryReadCoefficient": 1, "secondaryReadCoefficient": 1 }, - "queryEngineConfiguration": "{\"maxSqlQueryInputLength\":262144,\"maxJoinsPerSqlQuery\":5,\"maxLogicalAndPerSqlQuery\":500,\"maxLogicalOrPerSqlQuery\":500,\"maxUdfRefPerSqlQuery\":10,\"maxInExpressionItemsCount\":16000,\"queryMaxInMemorySortDocumentCount\":500,\"maxQueryRequestTimeoutFraction\":0.9,\"sqlAllowNonFiniteNumbers\":false,\"sqlAllowAggregateFunctions\":true,\"sqlAllowSubQuery\":true,\"sqlAllowScalarSubQuery\":true,\"allowNewKeywords\":true,\"sqlAllowLike\":false,\"maxSpatialQueryCells\":12,\"spatialMaxGeometryPointCount\":256,\"sqlAllowTop\":true,\"enableSpatialIndexing\":true}" + "queryEngineConfiguration": "{\"maxSqlQueryInputLength\":262144,\"maxJoinsPerSqlQuery\":5,\"maxLogicalAndPerSqlQuery\":500,\"maxLogicalOrPerSqlQuery\":500,\"maxUdfRefPerSqlQuery\":10,\"maxInExpressionItemsCount\":16000,\"queryMaxInMemorySortDocumentCount\":500,\"maxQueryRequestTimeoutFraction\":0.9,\"sqlAllowNonFiniteNumbers\":false,\"sqlAllowAggregateFunctions\":true,\"sqlAllowSubQuery\":true,\"sqlAllowScalarSubQuery\":true,\"allowNewKeywords\":true,\"sqlAllowLike\":false,\"sqlAllowGroupByClause\":true,\"maxSpatialQueryCells\":12,\"spatialMaxGeometryPointCount\":256,\"sqlAllowTop\":true,\"enableSpatialIndexing\":true}" }, "rawHeaders": [ "Cache-Control", @@ -55,6 +55,10 @@ "https://localhost:8081/", "Server", "Microsoft-HTTPAPI/2.0", + "Access-Control-Allow-Origin", + "", + "Access-Control-Allow-Credentials", + "true", "x-ms-max-media-storage-usage-mb", "10240", "x-ms-media-storage-usage-mb", @@ -66,9 +70,9 @@ "x-ms-databaseaccount-provisioned-mb", "0", "x-ms-gatewayversion", - "version=2.0.0.0", + "version=2.7.0", "Date", - "Thu, 25 Oct 2018 20:14:41 GMT" + "Thu, 12 Dec 2019 23:27:28 GMT" ] }, { @@ -87,8 +91,12 @@ "status": 200, "response": { "_rid": "", - "Databases": [], - "_count": 0 + "Databases": [ + { + "_self": "dbs/TUIrAA==/" + } + ], + "_count": 1 }, "rawHeaders": [ "Cache-Control", @@ -101,92 +109,24 @@ "application/json", "Server", "Microsoft-HTTPAPI/2.0", + "Access-Control-Allow-Origin", + "", + "Access-Control-Allow-Credentials", + "true", "x-ms-last-state-change-utc", - "Thu, 25 Oct 2018 20:14:00.991 GMT", + "Wed, 11 Dec 2019 19:45:58.020 GMT", "x-ms-resource-quota", "databases=100;", "x-ms-resource-usage", - "databases=0;", + "databases=1;", "lsn", - "77", + "3402", "x-ms-item-count", - "0", - "x-ms-schemaversion", - "1.6", - "x-ms-quorum-acked-lsn", - "77", - "x-ms-current-write-quorum", - "1", - "x-ms-current-replica-set-size", "1", - "x-ms-xp-role", - "0", - "x-ms-global-Committed-lsn", - "-1", - "x-ms-number-of-read-regions", - "0", - "x-ms-transport-request-id", - "11", - "x-ms-cosmos-llsn", - "77", - "x-ms-cosmos-quorum-acked-llsn", - "77", - "x-ms-session-token", - "0:77", - "x-ms-request-charge", - "3.94", - "x-ms-serviceversion", - "version=2.0.0.0", - "x-ms-activity-id", - "a74df105-7d01-45f8-882c-6913e4f95b57", - "x-ms-gatewayversion", - "version=2.0.0.0", - "Date", - "Thu, 25 Oct 2018 20:14:41 GMT" - ] - }, - { - "scope": "https://localhost:8081", - "method": "POST", - "path": "/dbs", - "body": { - "id": "test-db" - }, - "status": 201, - "response": { - "id": "test-db", - "_rid": "A7V-AA==", - "_self": "dbs/A7V-AA==/", - "_etag": "\"00000000-0000-0000-6c9f-5d30a6ba01d4\"", - "_colls": "colls/", - "_users": "users/", - "_ts": 1540498481 - }, - "rawHeaders": [ - "Cache-Control", - "no-store, no-cache", - "Pragma", - "no-cache", - "Transfer-Encoding", - "chunked", - "Content-Type", - "application/json", - "Server", - "Microsoft-HTTPAPI/2.0", - "x-ms-last-state-change-utc", - "Thu, 25 Oct 2018 20:14:00.991 GMT", - "etag", - "\"00000000-0000-0000-6c9f-5d30a6ba01d4\"", - "x-ms-resource-quota", - "databases=100;", - "x-ms-resource-usage", - "databases=1;", - "lsn", - "78", "x-ms-schemaversion", - "1.6", + "1.8", "x-ms-quorum-acked-lsn", - "77", + "3402", "x-ms-current-write-quorum", "1", "x-ms-current-replica-set-size", @@ -198,29 +138,29 @@ "x-ms-number-of-read-regions", "0", "x-ms-transport-request-id", - "13", + "5145", "x-ms-cosmos-llsn", - "78", + "3402", "x-ms-cosmos-quorum-acked-llsn", - "77", + "3402", "x-ms-session-token", - "0:78", + "0:3402", "x-ms-request-charge", - "4.95", + "5.64", "x-ms-serviceversion", - "version=2.0.0.0", + "version=2.7.0.0", "x-ms-activity-id", - "7af67ef6-d974-40c1-9e64-37e2822c15d0", + "3eb8ba27-b346-4eb8-aedd-f0e76de08985", "x-ms-gatewayversion", - "version=2.0.0.0", + "version=2.7.0", "Date", - "Thu, 25 Oct 2018 20:14:41 GMT" + "Thu, 12 Dec 2019 23:27:28 GMT" ] }, { "scope": "https://localhost:8081", "method": "POST", - "path": "/dbs/A7V-AA==/colls/", + "path": "/dbs/TUIrAA==/colls/", "body": { "query": "SELECT r._self FROM root r WHERE r.id=@id", "parameters": [ @@ -232,7 +172,7 @@ }, "status": 200, "response": { - "_rid": "A7V-AA==", + "_rid": "TUIrAA==", "DocumentCollections": [], "_count": 0 }, @@ -247,8 +187,12 @@ "application/json", "Server", "Microsoft-HTTPAPI/2.0", + "Access-Control-Allow-Origin", + "", + "Access-Control-Allow-Credentials", + "true", "x-ms-last-state-change-utc", - "Thu, 25 Oct 2018 20:14:00.991 GMT", + "Wed, 11 Dec 2019 19:45:58.020 GMT", "x-ms-resource-quota", "collections=5000;", "x-ms-resource-usage", @@ -258,15 +202,15 @@ "collection-service-index", "0", "lsn", - "78", + "3402", "x-ms-item-count", "0", "x-ms-schemaversion", - "1.6", + "1.8", "x-ms-alt-content-path", "dbs/test-db", "x-ms-quorum-acked-lsn", - "78", + "3402", "x-ms-current-write-quorum", "1", "x-ms-current-replica-set-size", @@ -278,29 +222,29 @@ "x-ms-number-of-read-regions", "0", "x-ms-transport-request-id", - "14", + "5147", "x-ms-cosmos-llsn", - "78", + "3402", "x-ms-cosmos-quorum-acked-llsn", - "78", + "3402", "x-ms-session-token", - "0:78", + "0:3402", "x-ms-request-charge", - "3.94", + "5.58", "x-ms-serviceversion", - "version=2.0.0.0", + "version=2.7.0.0", "x-ms-activity-id", - "c58582f9-9486-4f71-b246-bd7ca9f8d36f", + "6a9ec872-84fa-4231-9066-ff0628a719e2", "x-ms-gatewayversion", - "version=2.0.0.0", + "version=2.7.0", "Date", - "Thu, 25 Oct 2018 20:14:41 GMT" + "Thu, 12 Dec 2019 23:27:28 GMT" ] }, { "scope": "https://localhost:8081", "method": "POST", - "path": "/dbs/A7V-AA==/colls/", + "path": "/dbs/TUIrAA==/colls/", "body": { "id": "bot-storage" }, @@ -320,19 +264,31 @@ "precision": -1 }, { - "kind": "Hash", + "kind": "Range", "dataType": "String", - "precision": 3 + "precision": -1 } ] } ], - "excludedPaths": [] + "excludedPaths": [ + { + "path": "/\"_etag\"/?" + } + ] + }, + "conflictResolutionPolicy": { + "mode": "LastWriterWins", + "conflictResolutionPath": "/_ts", + "conflictResolutionProcedure": "" + }, + "geospatialConfig": { + "type": "Geography" }, - "_rid": "A7V-AIqw5hc=", - "_ts": 1540498482, - "_self": "dbs/A7V-AA==/colls/A7V-AIqw5hc=/", - "_etag": "\"00000000-0000-0000-6c9f-5d9f009a01d4\"", + "_rid": "TUIrAJlnrjg=", + "_ts": 1576193248, + "_self": "dbs/TUIrAA==/colls/TUIrAJlnrjg=/", + "_etag": "\"00000000-0000-0000-b143-b802bf7e01d5\"", "_docs": "docs/", "_sprocs": "sprocs/", "_triggers": "triggers/", @@ -350,10 +306,14 @@ "application/json", "Server", "Microsoft-HTTPAPI/2.0", + "Access-Control-Allow-Origin", + "", + "Access-Control-Allow-Credentials", + "true", "x-ms-last-state-change-utc", - "Thu, 25 Oct 2018 20:14:08.836 GMT", + "Wed, 11 Dec 2019 19:46:13.459 GMT", "etag", - "\"00000000-0000-0000-6c9f-5d9f009a01d4\"", + "\"00000000-0000-0000-b143-b802bf7e01d5\"", "x-ms-resource-quota", "functions=25;storedProcedures=100;triggers=25;documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", "x-ms-resource-usage", @@ -363,13 +323,13 @@ "collection-service-index", "0", "lsn", - "234", + "522", "x-ms-schemaversion", - "1.6", + "1.8", "x-ms-alt-content-path", "dbs/test-db", "x-ms-quorum-acked-lsn", - "234", + "522", "x-ms-documentdb-collection-index-transformation-progress", "100", "x-ms-current-write-quorum", @@ -383,45 +343,45 @@ "x-ms-number-of-read-regions", "0", "x-ms-item-lsn", - "234", + "522", "x-ms-transport-request-id", - "2", + "1426", "x-ms-cosmos-llsn", - "234", + "522", "x-ms-cosmos-quorum-acked-llsn", - "234", + "522", "x-ms-cosmos-item-llsn", - "234", + "522", "x-ms-session-token", - "0:234", + "0:522", "x-ms-request-charge", "1", "x-ms-serviceversion", - "version=2.0.0.0", + "version=2.7.0.0", "x-ms-activity-id", - "4bb04359-cf84-4082-a97f-c758982e431f", + "b3839a4a-7d18-4bb1-935d-6a422984eff1", "x-ms-gatewayversion", - "version=2.0.0.0", + "version=2.7.0", "Date", - "Thu, 25 Oct 2018 20:14:43 GMT" + "Thu, 12 Dec 2019 23:27:28 GMT" ] }, { "scope": "https://localhost:8081", "method": "POST", - "path": "/dbs/A7V-AA==/colls/A7V-AIqw5hc=/docs/", + "path": "/dbs/TUIrAA==/colls/TUIrAJlnrjg=/docs/", "body": { "query": "SELECT c.id, c.realId, c.document, c._etag FROM c WHERE c.id in (@id0)", "parameters": [ { "name": "@id0", - "value": "unk" + "value": "unknown" } ] }, "status": 200, "response": { - "_rid": "A7V-AIqw5hc=", + "_rid": "TUIrAJlnrjg=", "Documents": [], "_count": 0 }, @@ -436,22 +396,26 @@ "application/json", "Server", "Microsoft-HTTPAPI/2.0", + "Access-Control-Allow-Origin", + "", + "Access-Control-Allow-Credentials", + "true", "x-ms-last-state-change-utc", - "Thu, 25 Oct 2018 20:14:08.836 GMT", + "Wed, 11 Dec 2019 19:46:13.459 GMT", "x-ms-resource-quota", "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", "x-ms-resource-usage", "documentSize=0;documentsSize=0;documentsCount=0;collectionSize=0;", "lsn", - "234", + "522", "x-ms-item-count", "0", "x-ms-schemaversion", - "1.6", + "1.8", "x-ms-alt-content-path", "dbs/test-db/colls/bot-storage", "x-ms-quorum-acked-lsn", - "234", + "522", "x-ms-current-write-quorum", "1", "x-ms-current-replica-set-size", @@ -463,23 +427,23 @@ "x-ms-number-of-read-regions", "0", "x-ms-transport-request-id", - "5", + "1427", "x-ms-cosmos-llsn", - "234", + "522", "x-ms-cosmos-quorum-acked-llsn", - "234", + "522", "x-ms-session-token", - "0:234", + "0:522", "x-ms-request-charge", - "1.97", + "2.85", "x-ms-serviceversion", - "version=2.0.0.0", + "version=2.7.0.0", "x-ms-activity-id", - "407e3b18-ac35-4a10-afbb-bd258d58d545", + "94500be9-df6a-456a-8fdd-a45ac51315dc", "x-ms-gatewayversion", - "version=2.0.0.0", + "version=2.7.0", "Date", - "Thu, 25 Oct 2018 20:14:43 GMT" + "Thu, 12 Dec 2019 23:27:28 GMT" ] } ] \ No newline at end of file diff --git a/libraries/botbuilder-azure/tests/TestData/CosmosDbStorage - Base Storage Tests/throws_when_reading_null_keys.json b/libraries/botbuilder-azure/tests/TestData/CosmosDbStorage - Base Storage Tests/throws_when_reading_null_keys.json new file mode 100644 index 0000000000..0637a088a0 --- /dev/null +++ b/libraries/botbuilder-azure/tests/TestData/CosmosDbStorage - Base Storage Tests/throws_when_reading_null_keys.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/libraries/botbuilder-azure/tests/TestData/CosmosDbStorage - Base Storage Tests/throws_when_writing_null_keys.json b/libraries/botbuilder-azure/tests/TestData/CosmosDbStorage - Base Storage Tests/throws_when_writing_null_keys.json new file mode 100644 index 0000000000..0637a088a0 --- /dev/null +++ b/libraries/botbuilder-azure/tests/TestData/CosmosDbStorage - Base Storage Tests/throws_when_writing_null_keys.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/libraries/botbuilder-azure/tests/TestData/CosmosDbStorage - Base Storage Tests/update_an_object.json b/libraries/botbuilder-azure/tests/TestData/CosmosDbStorage - Base Storage Tests/update_an_object.json new file mode 100644 index 0000000000..551d4cb458 --- /dev/null +++ b/libraries/botbuilder-azure/tests/TestData/CosmosDbStorage - Base Storage Tests/update_an_object.json @@ -0,0 +1,1389 @@ +[ + { + "scope": "https://localhost:8081", + "method": "POST", + "path": "/dbs/test-db/colls/bot-storage/docs", + "body": { + "id": "pocoItem", + "realId": "pocoItem", + "document": { + "id": 1, + "count": 1 + } + }, + "status": 201, + "response": { + "id": "pocoItem", + "realId": "pocoItem", + "document": { + "id": 1, + "count": 1 + }, + "_rid": "TUIrAJlnrjgEAAAAAAAAAA==", + "_self": "dbs/TUIrAA==/colls/TUIrAJlnrjg=/docs/TUIrAJlnrjgEAAAAAAAAAA==/", + "_etag": "\"00000000-0000-0000-b143-b82e6c7d01d5\"", + "_attachments": "attachments/", + "_ts": 1576193248 + }, + "rawHeaders": [ + "Cache-Control", + "no-store, no-cache", + "Pragma", + "no-cache", + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json", + "Server", + "Microsoft-HTTPAPI/2.0", + "Access-Control-Allow-Origin", + "", + "Access-Control-Allow-Credentials", + "true", + "x-ms-last-state-change-utc", + "Wed, 11 Dec 2019 19:46:13.459 GMT", + "etag", + "\"00000000-0000-0000-b143-b82e6c7d01d5\"", + "x-ms-resource-quota", + "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", + "x-ms-resource-usage", + "documentSize=0;documentsSize=3;documentsCount=3;collectionSize=4;", + "lsn", + "526", + "x-ms-schemaversion", + "1.8", + "x-ms-alt-content-path", + "dbs/test-db/colls/bot-storage", + "x-ms-content-path", + "TUIrAJlnrjg=", + "x-ms-quorum-acked-lsn", + "525", + "x-ms-current-write-quorum", + "1", + "x-ms-current-replica-set-size", + "1", + "x-ms-xp-role", + "0", + "x-ms-global-Committed-lsn", + "-1", + "x-ms-number-of-read-regions", + "0", + "x-ms-transport-request-id", + "1437", + "x-ms-cosmos-llsn", + "526", + "x-ms-cosmos-quorum-acked-llsn", + "525", + "x-ms-session-token", + "0:526", + "x-ms-request-charge", + "6.86", + "x-ms-serviceversion", + "version=2.7.0.0", + "x-ms-activity-id", + "1296a3e4-792e-4060-b419-87cc6c035e1d", + "x-ms-gatewayversion", + "version=2.7.0", + "Date", + "Thu, 12 Dec 2019 23:27:28 GMT" + ] + }, + { + "scope": "https://localhost:8081", + "method": "POST", + "path": "/dbs/test-db/colls/bot-storage/docs", + "body": { + "id": "pocoStoreItem", + "realId": "pocoStoreItem", + "document": { + "id": 1, + "count": 1 + } + }, + "status": 201, + "response": { + "id": "pocoStoreItem", + "realId": "pocoStoreItem", + "document": { + "id": 1, + "count": 1 + }, + "_rid": "TUIrAJlnrjgFAAAAAAAAAA==", + "_self": "dbs/TUIrAA==/colls/TUIrAJlnrjg=/docs/TUIrAJlnrjgFAAAAAAAAAA==/", + "_etag": "\"00000000-0000-0000-b143-b82ed3bc01d5\"", + "_attachments": "attachments/", + "_ts": 1576193248 + }, + "rawHeaders": [ + "Cache-Control", + "no-store, no-cache", + "Pragma", + "no-cache", + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json", + "Server", + "Microsoft-HTTPAPI/2.0", + "Access-Control-Allow-Origin", + "", + "Access-Control-Allow-Credentials", + "true", + "x-ms-last-state-change-utc", + "Wed, 11 Dec 2019 19:46:13.459 GMT", + "etag", + "\"00000000-0000-0000-b143-b82ed3bc01d5\"", + "x-ms-resource-quota", + "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", + "x-ms-resource-usage", + "documentSize=0;documentsSize=4;documentsCount=4;collectionSize=5;", + "lsn", + "527", + "x-ms-schemaversion", + "1.8", + "x-ms-alt-content-path", + "dbs/test-db/colls/bot-storage", + "x-ms-content-path", + "TUIrAJlnrjg=", + "x-ms-quorum-acked-lsn", + "526", + "x-ms-current-write-quorum", + "1", + "x-ms-current-replica-set-size", + "1", + "x-ms-xp-role", + "0", + "x-ms-global-Committed-lsn", + "-1", + "x-ms-number-of-read-regions", + "0", + "x-ms-transport-request-id", + "1438", + "x-ms-cosmos-llsn", + "527", + "x-ms-cosmos-quorum-acked-llsn", + "526", + "x-ms-session-token", + "0:527", + "x-ms-request-charge", + "6.86", + "x-ms-serviceversion", + "version=2.7.0.0", + "x-ms-activity-id", + "81faf6e0-9522-40f7-8671-5bcb80b029ce", + "x-ms-gatewayversion", + "version=2.7.0", + "Date", + "Thu, 12 Dec 2019 23:27:28 GMT" + ] + }, + { + "scope": "https://localhost:8081", + "method": "POST", + "path": "/dbs/TUIrAA==/colls/TUIrAJlnrjg=/docs/", + "body": { + "query": "SELECT c.id, c.realId, c.document, c._etag FROM c WHERE c.id in (@id0,@id1)", + "parameters": [ + { + "name": "@id0", + "value": "pocoItem" + }, + { + "name": "@id1", + "value": "pocoStoreItem" + } + ] + }, + "status": 200, + "response": { + "_rid": "TUIrAJlnrjg=", + "Documents": [ + { + "id": "pocoItem", + "realId": "pocoItem", + "document": { + "id": 1, + "count": 1 + }, + "_etag": "\"00000000-0000-0000-b143-b82e6c7d01d5\"" + }, + { + "id": "pocoStoreItem", + "realId": "pocoStoreItem", + "document": { + "id": 1, + "count": 1 + }, + "_etag": "\"00000000-0000-0000-b143-b82ed3bc01d5\"" + } + ], + "_count": 2 + }, + "rawHeaders": [ + "Cache-Control", + "no-store, no-cache", + "Pragma", + "no-cache", + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json", + "Server", + "Microsoft-HTTPAPI/2.0", + "Access-Control-Allow-Origin", + "", + "Access-Control-Allow-Credentials", + "true", + "x-ms-last-state-change-utc", + "Wed, 11 Dec 2019 19:46:13.459 GMT", + "x-ms-resource-quota", + "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", + "x-ms-resource-usage", + "documentSize=0;documentsSize=4;documentsCount=5;collectionSize=5;", + "lsn", + "527", + "x-ms-item-count", + "2", + "x-ms-schemaversion", + "1.8", + "x-ms-alt-content-path", + "dbs/test-db/colls/bot-storage", + "x-ms-quorum-acked-lsn", + "527", + "x-ms-current-write-quorum", + "1", + "x-ms-current-replica-set-size", + "1", + "x-ms-xp-role", + "0", + "x-ms-global-Committed-lsn", + "-1", + "x-ms-number-of-read-regions", + "0", + "x-ms-transport-request-id", + "1439", + "x-ms-cosmos-llsn", + "527", + "x-ms-cosmos-quorum-acked-llsn", + "527", + "x-ms-session-token", + "0:527", + "x-ms-request-charge", + "3.1", + "x-ms-serviceversion", + "version=2.7.0.0", + "x-ms-activity-id", + "0bbebfd6-2a54-4f5d-bb94-25ef4ca52fbb", + "x-ms-gatewayversion", + "version=2.7.0", + "Date", + "Thu, 12 Dec 2019 23:27:28 GMT" + ] + }, + { + "scope": "https://localhost:8081", + "method": "POST", + "path": "/dbs/test-db/colls/bot-storage/docs", + "body": { + "id": "pocoItem", + "realId": "pocoItem", + "document": { + "id": 1, + "count": 2 + } + }, + "status": 200, + "response": { + "id": "pocoItem", + "realId": "pocoItem", + "document": { + "id": 1, + "count": 2 + }, + "_rid": "TUIrAJlnrjgEAAAAAAAAAA==", + "_self": "dbs/TUIrAA==/colls/TUIrAJlnrjg=/docs/TUIrAJlnrjgEAAAAAAAAAA==/", + "_etag": "\"00000000-0000-0000-b143-b831da6401d5\"", + "_attachments": "attachments/", + "_ts": 1576193248 + }, + "rawHeaders": [ + "Cache-Control", + "no-store, no-cache", + "Pragma", + "no-cache", + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json", + "Server", + "Microsoft-HTTPAPI/2.0", + "Access-Control-Allow-Origin", + "", + "Access-Control-Allow-Credentials", + "true", + "x-ms-last-state-change-utc", + "Wed, 11 Dec 2019 19:46:13.459 GMT", + "etag", + "\"00000000-0000-0000-b143-b831da6401d5\"", + "x-ms-resource-quota", + "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", + "x-ms-resource-usage", + "documentSize=0;documentsSize=4;documentsCount=5;collectionSize=5;", + "lsn", + "528", + "x-ms-schemaversion", + "1.8", + "x-ms-alt-content-path", + "dbs/test-db/colls/bot-storage", + "x-ms-content-path", + "TUIrAJlnrjg=", + "x-ms-quorum-acked-lsn", + "527", + "x-ms-current-write-quorum", + "1", + "x-ms-current-replica-set-size", + "1", + "x-ms-xp-role", + "0", + "x-ms-global-Committed-lsn", + "-1", + "x-ms-number-of-read-regions", + "0", + "x-ms-transport-request-id", + "1440", + "x-ms-cosmos-llsn", + "528", + "x-ms-cosmos-quorum-acked-llsn", + "527", + "x-ms-session-token", + "0:528", + "x-ms-request-charge", + "10.67", + "x-ms-serviceversion", + "version=2.7.0.0", + "x-ms-activity-id", + "1ad15a47-17f1-4f52-842d-15522c7af11d", + "x-ms-gatewayversion", + "version=2.7.0", + "Date", + "Thu, 12 Dec 2019 23:27:28 GMT" + ] + }, + { + "scope": "https://localhost:8081", + "method": "PUT", + "path": "/dbs/test-db/colls/bot-storage/docs/pocoStoreItem", + "body": { + "id": "pocoStoreItem", + "realId": "pocoStoreItem", + "document": { + "id": 1, + "count": 2 + } + }, + "status": 200, + "response": { + "id": "pocoStoreItem", + "realId": "pocoStoreItem", + "document": { + "id": 1, + "count": 2 + }, + "_rid": "TUIrAJlnrjgFAAAAAAAAAA==", + "_self": "dbs/TUIrAA==/colls/TUIrAJlnrjg=/docs/TUIrAJlnrjgFAAAAAAAAAA==/", + "_etag": "\"00000000-0000-0000-b143-b832f86501d5\"", + "_attachments": "attachments/", + "_ts": 1576193248 + }, + "rawHeaders": [ + "Cache-Control", + "no-store, no-cache", + "Pragma", + "no-cache", + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json", + "Content-Location", + "https://127.0.0.1:8081/dbs/test-db/colls/bot-storage/docs/pocoStoreItem", + "Server", + "Microsoft-HTTPAPI/2.0", + "Access-Control-Allow-Origin", + "", + "Access-Control-Allow-Credentials", + "true", + "x-ms-last-state-change-utc", + "Wed, 11 Dec 2019 19:46:13.459 GMT", + "etag", + "\"00000000-0000-0000-b143-b832f86501d5\"", + "x-ms-resource-quota", + "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", + "x-ms-resource-usage", + "documentSize=0;documentsSize=4;documentsCount=5;collectionSize=5;", + "lsn", + "529", + "x-ms-schemaversion", + "1.8", + "x-ms-alt-content-path", + "dbs/test-db/colls/bot-storage", + "x-ms-content-path", + "TUIrAJlnrjg=", + "x-ms-quorum-acked-lsn", + "528", + "x-ms-current-write-quorum", + "1", + "x-ms-current-replica-set-size", + "1", + "x-ms-xp-role", + "0", + "x-ms-global-Committed-lsn", + "-1", + "x-ms-number-of-read-regions", + "0", + "x-ms-transport-request-id", + "1441", + "x-ms-cosmos-llsn", + "529", + "x-ms-cosmos-quorum-acked-llsn", + "528", + "x-ms-session-token", + "0:529", + "x-ms-request-charge", + "10.67", + "x-ms-serviceversion", + "version=2.7.0.0", + "x-ms-activity-id", + "53b847ad-64c9-404c-b62a-88a4a3b00a36", + "x-ms-gatewayversion", + "version=2.7.0", + "Date", + "Thu, 12 Dec 2019 23:27:28 GMT" + ] + }, + { + "scope": "https://localhost:8081", + "method": "POST", + "path": "/dbs/TUIrAA==/colls/TUIrAJlnrjg=/docs/", + "body": { + "query": "SELECT c.id, c.realId, c.document, c._etag FROM c WHERE c.id in (@id0,@id1)", + "parameters": [ + { + "name": "@id0", + "value": "pocoItem" + }, + { + "name": "@id1", + "value": "pocoStoreItem" + } + ] + }, + "status": 200, + "response": { + "_rid": "TUIrAJlnrjg=", + "Documents": [ + { + "id": "pocoItem", + "realId": "pocoItem", + "document": { + "id": 1, + "count": 2 + }, + "_etag": "\"00000000-0000-0000-b143-b831da6401d5\"" + }, + { + "id": "pocoStoreItem", + "realId": "pocoStoreItem", + "document": { + "id": 1, + "count": 2 + }, + "_etag": "\"00000000-0000-0000-b143-b832f86501d5\"" + } + ], + "_count": 2 + }, + "rawHeaders": [ + "Cache-Control", + "no-store, no-cache", + "Pragma", + "no-cache", + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json", + "Server", + "Microsoft-HTTPAPI/2.0", + "Access-Control-Allow-Origin", + "", + "Access-Control-Allow-Credentials", + "true", + "x-ms-last-state-change-utc", + "Wed, 11 Dec 2019 19:46:13.459 GMT", + "x-ms-resource-quota", + "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", + "x-ms-resource-usage", + "documentSize=0;documentsSize=4;documentsCount=5;collectionSize=5;", + "lsn", + "529", + "x-ms-item-count", + "2", + "x-ms-schemaversion", + "1.8", + "x-ms-alt-content-path", + "dbs/test-db/colls/bot-storage", + "x-ms-quorum-acked-lsn", + "529", + "x-ms-current-write-quorum", + "1", + "x-ms-current-replica-set-size", + "1", + "x-ms-xp-role", + "0", + "x-ms-global-Committed-lsn", + "-1", + "x-ms-number-of-read-regions", + "0", + "x-ms-transport-request-id", + "1442", + "x-ms-cosmos-llsn", + "529", + "x-ms-cosmos-quorum-acked-llsn", + "529", + "x-ms-session-token", + "0:529", + "x-ms-request-charge", + "3.1", + "x-ms-serviceversion", + "version=2.7.0.0", + "x-ms-activity-id", + "f37ce682-fada-4771-bcb9-cf6ab0792838", + "x-ms-gatewayversion", + "version=2.7.0", + "Date", + "Thu, 12 Dec 2019 23:27:28 GMT" + ] + }, + { + "scope": "https://localhost:8081", + "method": "POST", + "path": "/dbs/test-db/colls/bot-storage/docs", + "body": { + "id": "pocoItem", + "realId": "pocoItem", + "document": { + "id": 1, + "count": 123 + } + }, + "status": 200, + "response": { + "id": "pocoItem", + "realId": "pocoItem", + "document": { + "id": 1, + "count": 123 + }, + "_rid": "TUIrAJlnrjgEAAAAAAAAAA==", + "_self": "dbs/TUIrAA==/colls/TUIrAJlnrjg=/docs/TUIrAJlnrjgEAAAAAAAAAA==/", + "_etag": "\"00000000-0000-0000-b143-b835df8d01d5\"", + "_attachments": "attachments/", + "_ts": 1576193248 + }, + "rawHeaders": [ + "Cache-Control", + "no-store, no-cache", + "Pragma", + "no-cache", + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json", + "Server", + "Microsoft-HTTPAPI/2.0", + "Access-Control-Allow-Origin", + "", + "Access-Control-Allow-Credentials", + "true", + "x-ms-last-state-change-utc", + "Wed, 11 Dec 2019 19:46:13.459 GMT", + "etag", + "\"00000000-0000-0000-b143-b835df8d01d5\"", + "x-ms-resource-quota", + "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", + "x-ms-resource-usage", + "documentSize=0;documentsSize=3;documentsCount=5;collectionSize=5;", + "lsn", + "530", + "x-ms-schemaversion", + "1.8", + "x-ms-alt-content-path", + "dbs/test-db/colls/bot-storage", + "x-ms-content-path", + "TUIrAJlnrjg=", + "x-ms-quorum-acked-lsn", + "529", + "x-ms-current-write-quorum", + "1", + "x-ms-current-replica-set-size", + "1", + "x-ms-xp-role", + "0", + "x-ms-global-Committed-lsn", + "-1", + "x-ms-number-of-read-regions", + "0", + "x-ms-transport-request-id", + "1443", + "x-ms-cosmos-llsn", + "530", + "x-ms-cosmos-quorum-acked-llsn", + "529", + "x-ms-session-token", + "0:530", + "x-ms-request-charge", + "10.67", + "x-ms-serviceversion", + "version=2.7.0.0", + "x-ms-activity-id", + "ccf5c947-ebee-4b74-a297-0e67b136e4cd", + "x-ms-gatewayversion", + "version=2.7.0", + "Date", + "Thu, 12 Dec 2019 23:27:28 GMT" + ] + }, + { + "scope": "https://localhost:8081", + "method": "PUT", + "path": "/dbs/test-db/colls/bot-storage/docs/pocoStoreItem", + "body": { + "id": "pocoStoreItem", + "realId": "pocoStoreItem", + "document": { + "id": 1, + "count": 123 + } + }, + "status": 412, + "response": { + "code": "PreconditionFailed", + "message": "Message: {\"Errors\":[\"One of the specified pre-condition is not met\"]}\r\nActivityId: 49c424cb-9235-4ef4-aac9-a558f09c86d1, Request URI: /apps/DocDbApp/services/DocDbServer15/partitions/a4cb495b-38c8-11e6-8106-8cdcd42c33be/replicas/1p/, RequestStats: \r\nRequestStartTime: 2019-12-12T23:27:28.8875503Z, RequestEndTime: 2019-12-12T23:27:28.8885506Z, Number of regions attempted:1\r\nResponseTime: 2019-12-12T23:27:28.8885506Z, StoreResult: StorePhysicalAddress: rntbd://127.0.0.1:10253/apps/DocDbApp/services/DocDbServer15/partitions/a4cb495b-38c8-11e6-8106-8cdcd42c33be/replicas/1p/, LSN: 530, GlobalCommittedLsn: -1, PartitionKeyRangeId: 0, IsValid: True, StatusCode: 412, SubStatusCode: 0, RequestCharge: 1.24, ItemLSN: -1, SessionToken: 530, UsingLocalLSN: False, TransportException: null, ResourceType: Document, OperationType: Replace\r\n, SDK: Microsoft.Azure.Documents.Common/2.7.0" + }, + "rawHeaders": [ + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json", + "Content-Location", + "https://127.0.0.1:8081/dbs/test-db/colls/bot-storage/docs/pocoStoreItem", + "Server", + "Microsoft-HTTPAPI/2.0", + "Access-Control-Allow-Origin", + "", + "Access-Control-Allow-Credentials", + "true", + "x-ms-last-state-change-utc", + "Wed, 11 Dec 2019 19:46:13.459 GMT", + "lsn", + "530", + "x-ms-schemaversion", + "1.8", + "x-ms-quorum-acked-lsn", + "530", + "x-ms-current-write-quorum", + "1", + "x-ms-current-replica-set-size", + "1", + "x-ms-xp-role", + "0", + "x-ms-global-Committed-lsn", + "-1", + "x-ms-number-of-read-regions", + "0", + "x-ms-transport-request-id", + "1444", + "x-ms-cosmos-llsn", + "530", + "x-ms-cosmos-quorum-acked-llsn", + "530", + "x-ms-session-token", + "0:530", + "x-ms-request-charge", + "1.24", + "x-ms-serviceversion", + "version=2.7.0.0", + "x-ms-activity-id", + "49c424cb-9235-4ef4-aac9-a558f09c86d1", + "x-ms-gatewayversion", + "version=2.7.0", + "Date", + "Thu, 12 Dec 2019 23:27:28 GMT" + ] + }, + { + "scope": "https://localhost:8081", + "method": "POST", + "path": "/dbs/TUIrAA==/colls/TUIrAJlnrjg=/docs/", + "body": { + "query": "SELECT c.id, c.realId, c.document, c._etag FROM c WHERE c.id in (@id0,@id1)", + "parameters": [ + { + "name": "@id0", + "value": "pocoItem" + }, + { + "name": "@id1", + "value": "pocoStoreItem" + } + ] + }, + "status": 200, + "response": { + "_rid": "TUIrAJlnrjg=", + "Documents": [ + { + "id": "pocoItem", + "realId": "pocoItem", + "document": { + "id": 1, + "count": 123 + }, + "_etag": "\"00000000-0000-0000-b143-b835df8d01d5\"" + }, + { + "id": "pocoStoreItem", + "realId": "pocoStoreItem", + "document": { + "id": 1, + "count": 2 + }, + "_etag": "\"00000000-0000-0000-b143-b832f86501d5\"" + } + ], + "_count": 2 + }, + "rawHeaders": [ + "Cache-Control", + "no-store, no-cache", + "Pragma", + "no-cache", + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json", + "Server", + "Microsoft-HTTPAPI/2.0", + "Access-Control-Allow-Origin", + "", + "Access-Control-Allow-Credentials", + "true", + "x-ms-last-state-change-utc", + "Wed, 11 Dec 2019 19:46:13.459 GMT", + "x-ms-resource-quota", + "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", + "x-ms-resource-usage", + "documentSize=0;documentsSize=3;documentsCount=5;collectionSize=5;", + "lsn", + "530", + "x-ms-item-count", + "2", + "x-ms-schemaversion", + "1.8", + "x-ms-alt-content-path", + "dbs/test-db/colls/bot-storage", + "x-ms-quorum-acked-lsn", + "530", + "x-ms-current-write-quorum", + "1", + "x-ms-current-replica-set-size", + "1", + "x-ms-xp-role", + "0", + "x-ms-global-Committed-lsn", + "-1", + "x-ms-number-of-read-regions", + "0", + "x-ms-transport-request-id", + "1445", + "x-ms-cosmos-llsn", + "530", + "x-ms-cosmos-quorum-acked-llsn", + "530", + "x-ms-session-token", + "0:530", + "x-ms-request-charge", + "3.1", + "x-ms-serviceversion", + "version=2.7.0.0", + "x-ms-activity-id", + "64f5f23a-06fd-4359-8eac-402be59cdefa", + "x-ms-gatewayversion", + "version=2.7.0", + "Date", + "Thu, 12 Dec 2019 23:27:28 GMT" + ] + }, + { + "scope": "https://localhost:8081", + "method": "POST", + "path": "/dbs/test-db/colls/bot-storage/docs", + "body": { + "id": "pocoItem", + "realId": "pocoItem", + "document": { + "id": 1, + "count": 100 + } + }, + "status": 200, + "response": { + "id": "pocoItem", + "realId": "pocoItem", + "document": { + "id": 1, + "count": 100 + }, + "_rid": "TUIrAJlnrjgEAAAAAAAAAA==", + "_self": "dbs/TUIrAA==/colls/TUIrAJlnrjg=/docs/TUIrAJlnrjgEAAAAAAAAAA==/", + "_etag": "\"00000000-0000-0000-b143-b839a88c01d5\"", + "_attachments": "attachments/", + "_ts": 1576193248 + }, + "rawHeaders": [ + "Cache-Control", + "no-store, no-cache", + "Pragma", + "no-cache", + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json", + "Server", + "Microsoft-HTTPAPI/2.0", + "Access-Control-Allow-Origin", + "", + "Access-Control-Allow-Credentials", + "true", + "x-ms-last-state-change-utc", + "Wed, 11 Dec 2019 19:46:13.459 GMT", + "etag", + "\"00000000-0000-0000-b143-b839a88c01d5\"", + "x-ms-resource-quota", + "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", + "x-ms-resource-usage", + "documentSize=0;documentsSize=3;documentsCount=5;collectionSize=5;", + "lsn", + "531", + "x-ms-schemaversion", + "1.8", + "x-ms-alt-content-path", + "dbs/test-db/colls/bot-storage", + "x-ms-content-path", + "TUIrAJlnrjg=", + "x-ms-quorum-acked-lsn", + "530", + "x-ms-current-write-quorum", + "1", + "x-ms-current-replica-set-size", + "1", + "x-ms-xp-role", + "0", + "x-ms-global-Committed-lsn", + "-1", + "x-ms-number-of-read-regions", + "0", + "x-ms-transport-request-id", + "1446", + "x-ms-cosmos-llsn", + "531", + "x-ms-cosmos-quorum-acked-llsn", + "530", + "x-ms-session-token", + "0:531", + "x-ms-request-charge", + "10.67", + "x-ms-serviceversion", + "version=2.7.0.0", + "x-ms-activity-id", + "a48b8e51-622e-4345-ae7a-b145843ed594", + "x-ms-gatewayversion", + "version=2.7.0", + "Date", + "Thu, 12 Dec 2019 23:27:28 GMT" + ] + }, + { + "scope": "https://localhost:8081", + "method": "POST", + "path": "/dbs/test-db/colls/bot-storage/docs", + "body": { + "id": "pocoStoreItem", + "realId": "pocoStoreItem", + "document": { + "id": 1, + "count": 100 + } + }, + "status": 200, + "response": { + "id": "pocoStoreItem", + "realId": "pocoStoreItem", + "document": { + "id": 1, + "count": 100 + }, + "_rid": "TUIrAJlnrjgFAAAAAAAAAA==", + "_self": "dbs/TUIrAA==/colls/TUIrAJlnrjg=/docs/TUIrAJlnrjgFAAAAAAAAAA==/", + "_etag": "\"00000000-0000-0000-b143-b83a02bd01d5\"", + "_attachments": "attachments/", + "_ts": 1576193248 + }, + "rawHeaders": [ + "Cache-Control", + "no-store, no-cache", + "Pragma", + "no-cache", + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json", + "Server", + "Microsoft-HTTPAPI/2.0", + "Access-Control-Allow-Origin", + "", + "Access-Control-Allow-Credentials", + "true", + "x-ms-last-state-change-utc", + "Wed, 11 Dec 2019 19:46:13.459 GMT", + "etag", + "\"00000000-0000-0000-b143-b83a02bd01d5\"", + "x-ms-resource-quota", + "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", + "x-ms-resource-usage", + "documentSize=0;documentsSize=3;documentsCount=5;collectionSize=5;", + "lsn", + "532", + "x-ms-schemaversion", + "1.8", + "x-ms-alt-content-path", + "dbs/test-db/colls/bot-storage", + "x-ms-content-path", + "TUIrAJlnrjg=", + "x-ms-quorum-acked-lsn", + "531", + "x-ms-current-write-quorum", + "1", + "x-ms-current-replica-set-size", + "1", + "x-ms-xp-role", + "0", + "x-ms-global-Committed-lsn", + "-1", + "x-ms-number-of-read-regions", + "0", + "x-ms-transport-request-id", + "1447", + "x-ms-cosmos-llsn", + "532", + "x-ms-cosmos-quorum-acked-llsn", + "531", + "x-ms-session-token", + "0:532", + "x-ms-request-charge", + "10.67", + "x-ms-serviceversion", + "version=2.7.0.0", + "x-ms-activity-id", + "eb1eb33f-02ef-4bb9-857f-425901c42729", + "x-ms-gatewayversion", + "version=2.7.0", + "Date", + "Thu, 12 Dec 2019 23:27:28 GMT" + ] + }, + { + "scope": "https://localhost:8081", + "method": "POST", + "path": "/dbs/TUIrAA==/colls/TUIrAJlnrjg=/docs/", + "body": { + "query": "SELECT c.id, c.realId, c.document, c._etag FROM c WHERE c.id in (@id0,@id1)", + "parameters": [ + { + "name": "@id0", + "value": "pocoItem" + }, + { + "name": "@id1", + "value": "pocoStoreItem" + } + ] + }, + "status": 200, + "response": { + "_rid": "TUIrAJlnrjg=", + "Documents": [ + { + "id": "pocoItem", + "realId": "pocoItem", + "document": { + "id": 1, + "count": 100 + }, + "_etag": "\"00000000-0000-0000-b143-b839a88c01d5\"" + }, + { + "id": "pocoStoreItem", + "realId": "pocoStoreItem", + "document": { + "id": 1, + "count": 100 + }, + "_etag": "\"00000000-0000-0000-b143-b83a02bd01d5\"" + } + ], + "_count": 2 + }, + "rawHeaders": [ + "Cache-Control", + "no-store, no-cache", + "Pragma", + "no-cache", + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json", + "Server", + "Microsoft-HTTPAPI/2.0", + "Access-Control-Allow-Origin", + "", + "Access-Control-Allow-Credentials", + "true", + "x-ms-last-state-change-utc", + "Wed, 11 Dec 2019 19:46:13.459 GMT", + "x-ms-resource-quota", + "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", + "x-ms-resource-usage", + "documentSize=0;documentsSize=3;documentsCount=5;collectionSize=5;", + "lsn", + "532", + "x-ms-item-count", + "2", + "x-ms-schemaversion", + "1.8", + "x-ms-alt-content-path", + "dbs/test-db/colls/bot-storage", + "x-ms-quorum-acked-lsn", + "532", + "x-ms-current-write-quorum", + "1", + "x-ms-current-replica-set-size", + "1", + "x-ms-xp-role", + "0", + "x-ms-global-Committed-lsn", + "-1", + "x-ms-number-of-read-regions", + "0", + "x-ms-transport-request-id", + "1448", + "x-ms-cosmos-llsn", + "532", + "x-ms-cosmos-quorum-acked-llsn", + "532", + "x-ms-session-token", + "0:532", + "x-ms-request-charge", + "3.1", + "x-ms-serviceversion", + "version=2.7.0.0", + "x-ms-activity-id", + "e8a1118e-8557-4bfc-b2e6-39369dc3b542", + "x-ms-gatewayversion", + "version=2.7.0", + "Date", + "Thu, 12 Dec 2019 23:27:28 GMT" + ] + }, + { + "scope": "https://localhost:8081", + "method": "POST", + "path": "/dbs/TUIrAA==/colls/TUIrAJlnrjg=/docs/", + "body": { + "query": "SELECT c.id, c.realId, c.document, c._etag FROM c WHERE c.id in (@id0)", + "parameters": [ + { + "name": "@id0", + "value": "pocoStoreItem" + } + ] + }, + "status": 200, + "response": { + "_rid": "TUIrAJlnrjg=", + "Documents": [ + { + "id": "pocoStoreItem", + "realId": "pocoStoreItem", + "document": { + "id": 1, + "count": 100 + }, + "_etag": "\"00000000-0000-0000-b143-b83a02bd01d5\"" + } + ], + "_count": 1 + }, + "rawHeaders": [ + "Cache-Control", + "no-store, no-cache", + "Pragma", + "no-cache", + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json", + "Server", + "Microsoft-HTTPAPI/2.0", + "Access-Control-Allow-Origin", + "", + "Access-Control-Allow-Credentials", + "true", + "x-ms-last-state-change-utc", + "Wed, 11 Dec 2019 19:46:13.459 GMT", + "x-ms-resource-quota", + "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", + "x-ms-resource-usage", + "documentSize=0;documentsSize=3;documentsCount=5;collectionSize=5;", + "lsn", + "532", + "x-ms-item-count", + "1", + "x-ms-schemaversion", + "1.8", + "x-ms-alt-content-path", + "dbs/test-db/colls/bot-storage", + "x-ms-quorum-acked-lsn", + "532", + "x-ms-current-write-quorum", + "1", + "x-ms-current-replica-set-size", + "1", + "x-ms-xp-role", + "0", + "x-ms-global-Committed-lsn", + "-1", + "x-ms-number-of-read-regions", + "0", + "x-ms-transport-request-id", + "1449", + "x-ms-cosmos-llsn", + "532", + "x-ms-cosmos-quorum-acked-llsn", + "532", + "x-ms-session-token", + "0:532", + "x-ms-request-charge", + "2.9", + "x-ms-serviceversion", + "version=2.7.0.0", + "x-ms-activity-id", + "372f5c20-99c1-41d0-ab42-6311e591cf12", + "x-ms-gatewayversion", + "version=2.7.0", + "Date", + "Thu, 12 Dec 2019 23:27:28 GMT" + ] + }, + { + "scope": "https://localhost:8081", + "method": "POST", + "path": "/dbs/test-db/colls/bot-storage/docs", + "body": { + "id": "pocoStoreItem", + "realId": "pocoStoreItem", + "document": { + "id": 1, + "count": 100 + } + }, + "status": 200, + "response": { + "id": "pocoStoreItem", + "realId": "pocoStoreItem", + "document": { + "id": 1, + "count": 100 + }, + "_rid": "TUIrAJlnrjgFAAAAAAAAAA==", + "_self": "dbs/TUIrAA==/colls/TUIrAJlnrjg=/docs/TUIrAJlnrjgFAAAAAAAAAA==/", + "_etag": "\"00000000-0000-0000-b143-b83d526a01d5\"", + "_attachments": "attachments/", + "_ts": 1576193248 + }, + "rawHeaders": [ + "Cache-Control", + "no-store, no-cache", + "Pragma", + "no-cache", + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json", + "Server", + "Microsoft-HTTPAPI/2.0", + "Access-Control-Allow-Origin", + "", + "Access-Control-Allow-Credentials", + "true", + "x-ms-last-state-change-utc", + "Wed, 11 Dec 2019 19:46:13.459 GMT", + "etag", + "\"00000000-0000-0000-b143-b83d526a01d5\"", + "x-ms-resource-quota", + "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", + "x-ms-resource-usage", + "documentSize=0;documentsSize=3;documentsCount=5;collectionSize=5;", + "lsn", + "533", + "x-ms-schemaversion", + "1.8", + "x-ms-alt-content-path", + "dbs/test-db/colls/bot-storage", + "x-ms-content-path", + "TUIrAJlnrjg=", + "x-ms-quorum-acked-lsn", + "532", + "x-ms-current-write-quorum", + "1", + "x-ms-current-replica-set-size", + "1", + "x-ms-xp-role", + "0", + "x-ms-global-Committed-lsn", + "-1", + "x-ms-number-of-read-regions", + "0", + "x-ms-transport-request-id", + "1450", + "x-ms-cosmos-llsn", + "533", + "x-ms-cosmos-quorum-acked-llsn", + "532", + "x-ms-session-token", + "0:533", + "x-ms-request-charge", + "10.29", + "x-ms-serviceversion", + "version=2.7.0.0", + "x-ms-activity-id", + "746ecf2f-6fd9-400d-b1d2-886a9a82267c", + "x-ms-gatewayversion", + "version=2.7.0", + "Date", + "Thu, 12 Dec 2019 23:27:28 GMT" + ] + }, + { + "scope": "https://localhost:8081", + "method": "POST", + "path": "/dbs/TUIrAA==/colls/TUIrAJlnrjg=/docs/", + "body": { + "query": "SELECT c.id, c.realId, c.document, c._etag FROM c WHERE c.id in (@id0,@id1)", + "parameters": [ + { + "name": "@id0", + "value": "pocoItem" + }, + { + "name": "@id1", + "value": "pocoStoreItem" + } + ] + }, + "status": 200, + "response": { + "_rid": "TUIrAJlnrjg=", + "Documents": [ + { + "id": "pocoItem", + "realId": "pocoItem", + "document": { + "id": 1, + "count": 100 + }, + "_etag": "\"00000000-0000-0000-b143-b839a88c01d5\"" + }, + { + "id": "pocoStoreItem", + "realId": "pocoStoreItem", + "document": { + "id": 1, + "count": 100 + }, + "_etag": "\"00000000-0000-0000-b143-b83d526a01d5\"" + } + ], + "_count": 2 + }, + "rawHeaders": [ + "Cache-Control", + "no-store, no-cache", + "Pragma", + "no-cache", + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json", + "Server", + "Microsoft-HTTPAPI/2.0", + "Access-Control-Allow-Origin", + "", + "Access-Control-Allow-Credentials", + "true", + "x-ms-last-state-change-utc", + "Wed, 11 Dec 2019 19:46:13.459 GMT", + "x-ms-resource-quota", + "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", + "x-ms-resource-usage", + "documentSize=0;documentsSize=3;documentsCount=5;collectionSize=5;", + "lsn", + "533", + "x-ms-item-count", + "2", + "x-ms-schemaversion", + "1.8", + "x-ms-alt-content-path", + "dbs/test-db/colls/bot-storage", + "x-ms-quorum-acked-lsn", + "533", + "x-ms-current-write-quorum", + "1", + "x-ms-current-replica-set-size", + "1", + "x-ms-xp-role", + "0", + "x-ms-global-Committed-lsn", + "-1", + "x-ms-number-of-read-regions", + "0", + "x-ms-transport-request-id", + "1451", + "x-ms-cosmos-llsn", + "533", + "x-ms-cosmos-quorum-acked-llsn", + "533", + "x-ms-session-token", + "0:533", + "x-ms-request-charge", + "3.1", + "x-ms-serviceversion", + "version=2.7.0.0", + "x-ms-activity-id", + "ff87fd5e-602f-4493-bfd0-a3dc2bb1ff6d", + "x-ms-gatewayversion", + "version=2.7.0", + "Date", + "Thu, 12 Dec 2019 23:27:28 GMT" + ] + } +] \ No newline at end of file diff --git a/libraries/botbuilder-azure/tests/TestData/CosmosDbStorage - PartitionKey Tests/create_and_read_an_object_with_partitionKey.json b/libraries/botbuilder-azure/tests/TestData/CosmosDbStorage - PartitionKey Tests/create_and_read_an_object_with_partitionKey.json new file mode 100644 index 0000000000..13df7e2cd5 --- /dev/null +++ b/libraries/botbuilder-azure/tests/TestData/CosmosDbStorage - PartitionKey Tests/create_and_read_an_object_with_partitionKey.json @@ -0,0 +1,190 @@ +[ + { + "scope": "https://localhost:8081", + "method": "POST", + "path": "/dbs/test-db/colls/bot-storage/docs", + "body": { + "id": "001", + "realId": "001", + "document": { + "Location": "ARG", + "MessageList": [ + "Hi", + "how are u" + ] + } + }, + "status": 201, + "response": { + "id": "001", + "realId": "001", + "document": { + "Location": "ARG", + "MessageList": [ + "Hi", + "how are u" + ] + }, + "_rid": "TUIrAJlnrjgLAAAAAAAAAA==", + "_self": "dbs/TUIrAA==/colls/TUIrAJlnrjg=/docs/TUIrAJlnrjgLAAAAAAAAAA==/", + "_etag": "\"00000000-0000-0000-b143-b867a52401d5\"", + "_attachments": "attachments/", + "_ts": 1576193249 + }, + "rawHeaders": [ + "Cache-Control", + "no-store, no-cache", + "Pragma", + "no-cache", + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json", + "Server", + "Microsoft-HTTPAPI/2.0", + "Access-Control-Allow-Origin", + "", + "Access-Control-Allow-Credentials", + "true", + "x-ms-last-state-change-utc", + "Wed, 11 Dec 2019 19:46:13.459 GMT", + "etag", + "\"00000000-0000-0000-b143-b867a52401d5\"", + "x-ms-resource-quota", + "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", + "x-ms-resource-usage", + "documentSize=0;documentsSize=3;documentsCount=6;collectionSize=7;", + "lsn", + "548", + "x-ms-schemaversion", + "1.8", + "x-ms-alt-content-path", + "dbs/test-db/colls/bot-storage", + "x-ms-content-path", + "TUIrAJlnrjg=", + "x-ms-quorum-acked-lsn", + "547", + "x-ms-current-write-quorum", + "1", + "x-ms-current-replica-set-size", + "1", + "x-ms-xp-role", + "0", + "x-ms-global-Committed-lsn", + "-1", + "x-ms-number-of-read-regions", + "0", + "x-ms-transport-request-id", + "1477", + "x-ms-cosmos-llsn", + "548", + "x-ms-cosmos-quorum-acked-llsn", + "547", + "x-ms-session-token", + "0:548", + "x-ms-request-charge", + "7.24", + "x-ms-serviceversion", + "version=2.7.0.0", + "x-ms-activity-id", + "1ab4bd3b-a32f-4340-a413-4e4a97bb6935", + "x-ms-gatewayversion", + "version=2.7.0", + "Date", + "Thu, 12 Dec 2019 23:27:28 GMT" + ] + }, + { + "scope": "https://localhost:8081", + "method": "POST", + "path": "/dbs/TUIrAA==/colls/TUIrAJlnrjg=/docs/", + "body": { + "query": "SELECT c.id, c.realId, c.document, c._etag FROM c WHERE c.id in (@id0)", + "parameters": [ + { + "name": "@id0", + "value": "001" + } + ] + }, + "status": 200, + "response": { + "_rid": "TUIrAJlnrjg=", + "Documents": [ + { + "id": "001", + "realId": "001", + "document": { + "Location": "ARG", + "MessageList": [ + "Hi", + "how are u" + ] + }, + "_etag": "\"00000000-0000-0000-b143-b867a52401d5\"" + } + ], + "_count": 1 + }, + "rawHeaders": [ + "Cache-Control", + "no-store, no-cache", + "Pragma", + "no-cache", + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json", + "Server", + "Microsoft-HTTPAPI/2.0", + "Access-Control-Allow-Origin", + "", + "Access-Control-Allow-Credentials", + "true", + "x-ms-last-state-change-utc", + "Wed, 11 Dec 2019 19:46:13.459 GMT", + "x-ms-resource-quota", + "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", + "x-ms-resource-usage", + "documentSize=0;documentsSize=3;documentsCount=7;collectionSize=7;", + "lsn", + "548", + "x-ms-item-count", + "1", + "x-ms-schemaversion", + "1.8", + "x-ms-alt-content-path", + "dbs/test-db/colls/bot-storage", + "x-ms-quorum-acked-lsn", + "548", + "x-ms-current-write-quorum", + "1", + "x-ms-current-replica-set-size", + "1", + "x-ms-xp-role", + "0", + "x-ms-global-Committed-lsn", + "-1", + "x-ms-number-of-read-regions", + "0", + "x-ms-transport-request-id", + "1478", + "x-ms-cosmos-llsn", + "548", + "x-ms-cosmos-quorum-acked-llsn", + "548", + "x-ms-session-token", + "0:548", + "x-ms-request-charge", + "2.9", + "x-ms-serviceversion", + "version=2.7.0.0", + "x-ms-activity-id", + "ce6e2fcd-203e-4522-8077-0538b8c67b67", + "x-ms-gatewayversion", + "version=2.7.0", + "Date", + "Thu, 12 Dec 2019 23:27:28 GMT" + ] + } +] \ No newline at end of file diff --git a/libraries/botbuilder-azure/tests/TestData/CosmosDbStorage - PartitionKey Tests/delete_an_object_with_partitionKey.json b/libraries/botbuilder-azure/tests/TestData/CosmosDbStorage - PartitionKey Tests/delete_an_object_with_partitionKey.json new file mode 100644 index 0000000000..87e6e15b5e --- /dev/null +++ b/libraries/botbuilder-azure/tests/TestData/CosmosDbStorage - PartitionKey Tests/delete_an_object_with_partitionKey.json @@ -0,0 +1,340 @@ +[ + { + "scope": "https://localhost:8081", + "method": "POST", + "path": "/dbs/test-db/colls/bot-storage/docs", + "body": { + "id": "001", + "realId": "001", + "document": { + "Location": "ARG", + "MessageList": [ + "Hi", + "how are u" + ] + } + }, + "status": 200, + "response": { + "id": "001", + "realId": "001", + "document": { + "Location": "ARG", + "MessageList": [ + "Hi", + "how are u" + ] + }, + "_rid": "TUIrAJlnrjgLAAAAAAAAAA==", + "_self": "dbs/TUIrAA==/colls/TUIrAJlnrjg=/docs/TUIrAJlnrjgLAAAAAAAAAA==/", + "_etag": "\"00000000-0000-0000-b143-b870795701d5\"", + "_attachments": "attachments/", + "_ts": 1576193249 + }, + "rawHeaders": [ + "Cache-Control", + "no-store, no-cache", + "Pragma", + "no-cache", + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json", + "Server", + "Microsoft-HTTPAPI/2.0", + "Access-Control-Allow-Origin", + "", + "Access-Control-Allow-Credentials", + "true", + "x-ms-last-state-change-utc", + "Wed, 11 Dec 2019 19:46:13.459 GMT", + "etag", + "\"00000000-0000-0000-b143-b870795701d5\"", + "x-ms-resource-quota", + "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", + "x-ms-resource-usage", + "documentSize=0;documentsSize=4;documentsCount=9;collectionSize=9;", + "lsn", + "552", + "x-ms-schemaversion", + "1.8", + "x-ms-alt-content-path", + "dbs/test-db/colls/bot-storage", + "x-ms-content-path", + "TUIrAJlnrjg=", + "x-ms-quorum-acked-lsn", + "551", + "x-ms-current-write-quorum", + "1", + "x-ms-current-replica-set-size", + "1", + "x-ms-xp-role", + "0", + "x-ms-global-Committed-lsn", + "-1", + "x-ms-number-of-read-regions", + "0", + "x-ms-transport-request-id", + "1484", + "x-ms-cosmos-llsn", + "552", + "x-ms-cosmos-quorum-acked-llsn", + "551", + "x-ms-session-token", + "0:552", + "x-ms-request-charge", + "10.29", + "x-ms-serviceversion", + "version=2.7.0.0", + "x-ms-activity-id", + "f3d98e2f-2c89-4eb8-af50-fd1edf64bdaf", + "x-ms-gatewayversion", + "version=2.7.0", + "Date", + "Thu, 12 Dec 2019 23:27:28 GMT" + ] + }, + { + "scope": "https://localhost:8081", + "method": "POST", + "path": "/dbs/TUIrAA==/colls/TUIrAJlnrjg=/docs/", + "body": { + "query": "SELECT c.id, c.realId, c.document, c._etag FROM c WHERE c.id in (@id0)", + "parameters": [ + { + "name": "@id0", + "value": "001" + } + ] + }, + "status": 200, + "response": { + "_rid": "TUIrAJlnrjg=", + "Documents": [ + { + "id": "001", + "realId": "001", + "document": { + "Location": "ARG", + "MessageList": [ + "Hi", + "how are u" + ] + }, + "_etag": "\"00000000-0000-0000-b143-b870795701d5\"" + } + ], + "_count": 1 + }, + "rawHeaders": [ + "Cache-Control", + "no-store, no-cache", + "Pragma", + "no-cache", + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json", + "Server", + "Microsoft-HTTPAPI/2.0", + "Access-Control-Allow-Origin", + "", + "Access-Control-Allow-Credentials", + "true", + "x-ms-last-state-change-utc", + "Wed, 11 Dec 2019 19:46:13.459 GMT", + "x-ms-resource-quota", + "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", + "x-ms-resource-usage", + "documentSize=0;documentsSize=4;documentsCount=9;collectionSize=9;", + "lsn", + "552", + "x-ms-item-count", + "1", + "x-ms-schemaversion", + "1.8", + "x-ms-alt-content-path", + "dbs/test-db/colls/bot-storage", + "x-ms-quorum-acked-lsn", + "552", + "x-ms-current-write-quorum", + "1", + "x-ms-current-replica-set-size", + "1", + "x-ms-xp-role", + "0", + "x-ms-global-Committed-lsn", + "-1", + "x-ms-number-of-read-regions", + "0", + "x-ms-transport-request-id", + "1485", + "x-ms-cosmos-llsn", + "552", + "x-ms-cosmos-quorum-acked-llsn", + "552", + "x-ms-session-token", + "0:552", + "x-ms-request-charge", + "2.9", + "x-ms-serviceversion", + "version=2.7.0.0", + "x-ms-activity-id", + "f5fcfd2a-bdf8-4f99-a691-a3b9e59c5474", + "x-ms-gatewayversion", + "version=2.7.0", + "Date", + "Thu, 12 Dec 2019 23:27:28 GMT" + ] + }, + { + "scope": "https://localhost:8081", + "method": "DELETE", + "path": "/dbs/test-db/colls/bot-storage/docs/001", + "body": "", + "status": 204, + "response": "", + "rawHeaders": [ + "Cache-Control", + "no-store, no-cache", + "Pragma", + "no-cache", + "Content-Length", + "0", + "Content-Type", + "application/json", + "Content-Location", + "https://127.0.0.1:8081/dbs/test-db/colls/bot-storage/docs/001", + "Server", + "Microsoft-HTTPAPI/2.0", + "Access-Control-Allow-Origin", + "", + "Access-Control-Allow-Credentials", + "true", + "x-ms-last-state-change-utc", + "Wed, 11 Dec 2019 19:46:13.459 GMT", + "x-ms-resource-quota", + "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", + "x-ms-resource-usage", + "documentSize=0;documentsSize=3;documentsCount=9;collectionSize=8;", + "lsn", + "553", + "x-ms-schemaversion", + "1.8", + "x-ms-alt-content-path", + "dbs/test-db/colls/bot-storage", + "x-ms-content-path", + "TUIrAJlnrjg=", + "x-ms-quorum-acked-lsn", + "552", + "x-ms-current-write-quorum", + "1", + "x-ms-current-replica-set-size", + "1", + "x-ms-xp-role", + "0", + "x-ms-global-Committed-lsn", + "-1", + "x-ms-number-of-read-regions", + "0", + "x-ms-transport-request-id", + "1486", + "x-ms-cosmos-llsn", + "553", + "x-ms-cosmos-quorum-acked-llsn", + "552", + "x-ms-session-token", + "0:553", + "x-ms-request-charge", + "7.24", + "x-ms-serviceversion", + "version=2.7.0.0", + "x-ms-activity-id", + "e3d48a8e-ae62-4849-86f6-52f0df0ba463", + "x-ms-gatewayversion", + "version=2.7.0", + "Date", + "Thu, 12 Dec 2019 23:27:28 GMT" + ] + }, + { + "scope": "https://localhost:8081", + "method": "POST", + "path": "/dbs/TUIrAA==/colls/TUIrAJlnrjg=/docs/", + "body": { + "query": "SELECT c.id, c.realId, c.document, c._etag FROM c WHERE c.id in (@id0)", + "parameters": [ + { + "name": "@id0", + "value": "001" + } + ] + }, + "status": 200, + "response": { + "_rid": "TUIrAJlnrjg=", + "Documents": [], + "_count": 0 + }, + "rawHeaders": [ + "Cache-Control", + "no-store, no-cache", + "Pragma", + "no-cache", + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json", + "Server", + "Microsoft-HTTPAPI/2.0", + "Access-Control-Allow-Origin", + "", + "Access-Control-Allow-Credentials", + "true", + "x-ms-last-state-change-utc", + "Wed, 11 Dec 2019 19:46:13.459 GMT", + "x-ms-resource-quota", + "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", + "x-ms-resource-usage", + "documentSize=0;documentsSize=3;documentsCount=8;collectionSize=8;", + "lsn", + "553", + "x-ms-item-count", + "0", + "x-ms-schemaversion", + "1.8", + "x-ms-alt-content-path", + "dbs/test-db/colls/bot-storage", + "x-ms-quorum-acked-lsn", + "553", + "x-ms-current-write-quorum", + "1", + "x-ms-current-replica-set-size", + "1", + "x-ms-xp-role", + "0", + "x-ms-global-Committed-lsn", + "-1", + "x-ms-number-of-read-regions", + "0", + "x-ms-transport-request-id", + "1487", + "x-ms-cosmos-llsn", + "553", + "x-ms-cosmos-quorum-acked-llsn", + "553", + "x-ms-session-token", + "0:553", + "x-ms-request-charge", + "2.85", + "x-ms-serviceversion", + "version=2.7.0.0", + "x-ms-activity-id", + "7ac69dd1-5cb3-400d-a08f-9a867f88accc", + "x-ms-gatewayversion", + "version=2.7.0", + "Date", + "Thu, 12 Dec 2019 23:27:28 GMT" + ] + } +] \ No newline at end of file diff --git a/libraries/botbuilder-azure/tests/TestData/CosmosDbStorage - PartitionKey Tests/update_an_object_with_partitionKey.json b/libraries/botbuilder-azure/tests/TestData/CosmosDbStorage - PartitionKey Tests/update_an_object_with_partitionKey.json new file mode 100644 index 0000000000..4b89817c4c --- /dev/null +++ b/libraries/botbuilder-azure/tests/TestData/CosmosDbStorage - PartitionKey Tests/update_an_object_with_partitionKey.json @@ -0,0 +1,447 @@ +[ + { + "scope": "https://localhost:8081", + "method": "POST", + "path": "/dbs/test-db/colls/bot-storage/docs", + "body": { + "id": "keyUpdate", + "realId": "keyUpdate", + "document": { + "count": 1 + } + }, + "status": 201, + "response": { + "id": "keyUpdate", + "realId": "keyUpdate", + "document": { + "count": 1 + }, + "_rid": "TUIrAJlnrjgMAAAAAAAAAA==", + "_self": "dbs/TUIrAA==/colls/TUIrAJlnrjg=/docs/TUIrAJlnrjgMAAAAAAAAAA==/", + "_etag": "\"00000000-0000-0000-b143-b86b0e4101d5\"", + "_attachments": "attachments/", + "_ts": 1576193249 + }, + "rawHeaders": [ + "Cache-Control", + "no-store, no-cache", + "Pragma", + "no-cache", + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json", + "Server", + "Microsoft-HTTPAPI/2.0", + "Access-Control-Allow-Origin", + "", + "Access-Control-Allow-Credentials", + "true", + "x-ms-last-state-change-utc", + "Wed, 11 Dec 2019 19:46:13.459 GMT", + "etag", + "\"00000000-0000-0000-b143-b86b0e4101d5\"", + "x-ms-resource-quota", + "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", + "x-ms-resource-usage", + "documentSize=0;documentsSize=3;documentsCount=7;collectionSize=8;", + "lsn", + "549", + "x-ms-schemaversion", + "1.8", + "x-ms-alt-content-path", + "dbs/test-db/colls/bot-storage", + "x-ms-content-path", + "TUIrAJlnrjg=", + "x-ms-quorum-acked-lsn", + "548", + "x-ms-current-write-quorum", + "1", + "x-ms-current-replica-set-size", + "1", + "x-ms-xp-role", + "0", + "x-ms-global-Committed-lsn", + "-1", + "x-ms-number-of-read-regions", + "0", + "x-ms-transport-request-id", + "1479", + "x-ms-cosmos-llsn", + "549", + "x-ms-cosmos-quorum-acked-llsn", + "548", + "x-ms-session-token", + "0:549", + "x-ms-request-charge", + "6.48", + "x-ms-serviceversion", + "version=2.7.0.0", + "x-ms-activity-id", + "5a28c406-78a9-48f2-a700-ec6988430763", + "x-ms-gatewayversion", + "version=2.7.0", + "Date", + "Thu, 12 Dec 2019 23:27:28 GMT" + ] + }, + { + "scope": "https://localhost:8081", + "method": "POST", + "path": "/dbs/test-db/colls/bot-storage/docs", + "body": { + "id": "Location", + "realId": "Location", + "document": { + "0": "A", + "1": "R", + "2": "G" + } + }, + "status": 201, + "response": { + "id": "Location", + "realId": "Location", + "document": { + "0": "A", + "1": "R", + "2": "G" + }, + "_rid": "TUIrAJlnrjgNAAAAAAAAAA==", + "_self": "dbs/TUIrAA==/colls/TUIrAJlnrjg=/docs/TUIrAJlnrjgNAAAAAAAAAA==/", + "_etag": "\"00000000-0000-0000-b143-b86b6cb901d5\"", + "_attachments": "attachments/", + "_ts": 1576193249 + }, + "rawHeaders": [ + "Cache-Control", + "no-store, no-cache", + "Pragma", + "no-cache", + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json", + "Server", + "Microsoft-HTTPAPI/2.0", + "Access-Control-Allow-Origin", + "", + "Access-Control-Allow-Credentials", + "true", + "x-ms-last-state-change-utc", + "Wed, 11 Dec 2019 19:46:13.459 GMT", + "etag", + "\"00000000-0000-0000-b143-b86b6cb901d5\"", + "x-ms-resource-quota", + "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", + "x-ms-resource-usage", + "documentSize=0;documentsSize=4;documentsCount=8;collectionSize=9;", + "lsn", + "550", + "x-ms-schemaversion", + "1.8", + "x-ms-alt-content-path", + "dbs/test-db/colls/bot-storage", + "x-ms-content-path", + "TUIrAJlnrjg=", + "x-ms-quorum-acked-lsn", + "549", + "x-ms-current-write-quorum", + "1", + "x-ms-current-replica-set-size", + "1", + "x-ms-xp-role", + "0", + "x-ms-global-Committed-lsn", + "-1", + "x-ms-number-of-read-regions", + "0", + "x-ms-transport-request-id", + "1480", + "x-ms-cosmos-llsn", + "550", + "x-ms-cosmos-quorum-acked-llsn", + "549", + "x-ms-session-token", + "0:550", + "x-ms-request-charge", + "7.24", + "x-ms-serviceversion", + "version=2.7.0.0", + "x-ms-activity-id", + "43313bd5-4d47-4453-939f-6002d6fabd06", + "x-ms-gatewayversion", + "version=2.7.0", + "Date", + "Thu, 12 Dec 2019 23:27:28 GMT" + ] + }, + { + "scope": "https://localhost:8081", + "method": "POST", + "path": "/dbs/TUIrAA==/colls/TUIrAJlnrjg=/docs/", + "body": { + "query": "SELECT c.id, c.realId, c.document, c._etag FROM c WHERE c.id in (@id0)", + "parameters": [ + { + "name": "@id0", + "value": "keyUpdate" + } + ] + }, + "status": 200, + "response": { + "_rid": "TUIrAJlnrjg=", + "Documents": [ + { + "id": "keyUpdate", + "realId": "keyUpdate", + "document": { + "count": 1 + }, + "_etag": "\"00000000-0000-0000-b143-b86b0e4101d5\"" + } + ], + "_count": 1 + }, + "rawHeaders": [ + "Cache-Control", + "no-store, no-cache", + "Pragma", + "no-cache", + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json", + "Server", + "Microsoft-HTTPAPI/2.0", + "Access-Control-Allow-Origin", + "", + "Access-Control-Allow-Credentials", + "true", + "x-ms-last-state-change-utc", + "Wed, 11 Dec 2019 19:46:13.459 GMT", + "x-ms-resource-quota", + "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", + "x-ms-resource-usage", + "documentSize=0;documentsSize=4;documentsCount=9;collectionSize=9;", + "lsn", + "550", + "x-ms-item-count", + "1", + "x-ms-schemaversion", + "1.8", + "x-ms-alt-content-path", + "dbs/test-db/colls/bot-storage", + "x-ms-quorum-acked-lsn", + "550", + "x-ms-current-write-quorum", + "1", + "x-ms-current-replica-set-size", + "1", + "x-ms-xp-role", + "0", + "x-ms-global-Committed-lsn", + "-1", + "x-ms-number-of-read-regions", + "0", + "x-ms-transport-request-id", + "1481", + "x-ms-cosmos-llsn", + "550", + "x-ms-cosmos-quorum-acked-llsn", + "550", + "x-ms-session-token", + "0:550", + "x-ms-request-charge", + "2.9", + "x-ms-serviceversion", + "version=2.7.0.0", + "x-ms-activity-id", + "9e4dada8-aeb4-4812-b656-06f90d31d448", + "x-ms-gatewayversion", + "version=2.7.0", + "Date", + "Thu, 12 Dec 2019 23:27:28 GMT" + ] + }, + { + "scope": "https://localhost:8081", + "method": "PUT", + "path": "/dbs/test-db/colls/bot-storage/docs/keyUpdate", + "body": { + "id": "keyUpdate", + "realId": "keyUpdate", + "document": { + "count": 2 + } + }, + "status": 200, + "response": { + "id": "keyUpdate", + "realId": "keyUpdate", + "document": { + "count": 2 + }, + "_rid": "TUIrAJlnrjgMAAAAAAAAAA==", + "_self": "dbs/TUIrAA==/colls/TUIrAJlnrjg=/docs/TUIrAJlnrjgMAAAAAAAAAA==/", + "_etag": "\"00000000-0000-0000-b143-b86d55f701d5\"", + "_attachments": "attachments/", + "_ts": 1576193249 + }, + "rawHeaders": [ + "Cache-Control", + "no-store, no-cache", + "Pragma", + "no-cache", + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json", + "Content-Location", + "https://127.0.0.1:8081/dbs/test-db/colls/bot-storage/docs/keyUpdate", + "Server", + "Microsoft-HTTPAPI/2.0", + "Access-Control-Allow-Origin", + "", + "Access-Control-Allow-Credentials", + "true", + "x-ms-last-state-change-utc", + "Wed, 11 Dec 2019 19:46:13.459 GMT", + "etag", + "\"00000000-0000-0000-b143-b86d55f701d5\"", + "x-ms-resource-quota", + "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", + "x-ms-resource-usage", + "documentSize=0;documentsSize=4;documentsCount=9;collectionSize=9;", + "lsn", + "551", + "x-ms-schemaversion", + "1.8", + "x-ms-alt-content-path", + "dbs/test-db/colls/bot-storage", + "x-ms-content-path", + "TUIrAJlnrjg=", + "x-ms-quorum-acked-lsn", + "550", + "x-ms-current-write-quorum", + "1", + "x-ms-current-replica-set-size", + "1", + "x-ms-xp-role", + "0", + "x-ms-global-Committed-lsn", + "-1", + "x-ms-number-of-read-regions", + "0", + "x-ms-transport-request-id", + "1482", + "x-ms-cosmos-llsn", + "551", + "x-ms-cosmos-quorum-acked-llsn", + "550", + "x-ms-session-token", + "0:551", + "x-ms-request-charge", + "10.67", + "x-ms-serviceversion", + "version=2.7.0.0", + "x-ms-activity-id", + "aac6cc35-fc36-42c8-b38a-fb7552cc8b2e", + "x-ms-gatewayversion", + "version=2.7.0", + "Date", + "Thu, 12 Dec 2019 23:27:28 GMT" + ] + }, + { + "scope": "https://localhost:8081", + "method": "POST", + "path": "/dbs/TUIrAA==/colls/TUIrAJlnrjg=/docs/", + "body": { + "query": "SELECT c.id, c.realId, c.document, c._etag FROM c WHERE c.id in (@id0)", + "parameters": [ + { + "name": "@id0", + "value": "keyUpdate" + } + ] + }, + "status": 200, + "response": { + "_rid": "TUIrAJlnrjg=", + "Documents": [ + { + "id": "keyUpdate", + "realId": "keyUpdate", + "document": { + "count": 2 + }, + "_etag": "\"00000000-0000-0000-b143-b86d55f701d5\"" + } + ], + "_count": 1 + }, + "rawHeaders": [ + "Cache-Control", + "no-store, no-cache", + "Pragma", + "no-cache", + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json", + "Server", + "Microsoft-HTTPAPI/2.0", + "Access-Control-Allow-Origin", + "", + "Access-Control-Allow-Credentials", + "true", + "x-ms-last-state-change-utc", + "Wed, 11 Dec 2019 19:46:13.459 GMT", + "x-ms-resource-quota", + "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", + "x-ms-resource-usage", + "documentSize=0;documentsSize=4;documentsCount=9;collectionSize=9;", + "lsn", + "551", + "x-ms-item-count", + "1", + "x-ms-schemaversion", + "1.8", + "x-ms-alt-content-path", + "dbs/test-db/colls/bot-storage", + "x-ms-quorum-acked-lsn", + "551", + "x-ms-current-write-quorum", + "1", + "x-ms-current-replica-set-size", + "1", + "x-ms-xp-role", + "0", + "x-ms-global-Committed-lsn", + "-1", + "x-ms-number-of-read-regions", + "0", + "x-ms-transport-request-id", + "1483", + "x-ms-cosmos-llsn", + "551", + "x-ms-cosmos-quorum-acked-llsn", + "551", + "x-ms-session-token", + "0:551", + "x-ms-request-charge", + "2.9", + "x-ms-serviceversion", + "version=2.7.0.0", + "x-ms-activity-id", + "1a80dce3-0392-4021-b160-4249a9742dfa", + "x-ms-gatewayversion", + "version=2.7.0", + "Date", + "Thu, 12 Dec 2019 23:27:28 GMT" + ] + } +] \ No newline at end of file diff --git a/libraries/botbuilder-azure/tests/TestData/CosmosDbStorage/batch_operations.json b/libraries/botbuilder-azure/tests/TestData/CosmosDbStorage/batch_operations.json deleted file mode 100644 index f9cb7a1ed6..0000000000 --- a/libraries/botbuilder-azure/tests/TestData/CosmosDbStorage/batch_operations.json +++ /dev/null @@ -1,1209 +0,0 @@ -[ - { - "scope": "https://localhost:8081", - "method": "GET", - "path": "/", - "body": "", - "status": 200, - "response": { - "_self": "", - "id": "localhost", - "_rid": "localhost", - "media": "//media/", - "addresses": "//addresses/", - "_dbs": "//dbs/", - "writableLocations": [ - { - "name": "South Central US", - "databaseAccountEndpoint": "https://127.0.0.1:8081/" - } - ], - "readableLocations": [ - { - "name": "South Central US", - "databaseAccountEndpoint": "https://127.0.0.1:8081/" - } - ], - "userReplicationPolicy": { - "asyncReplication": false, - "minReplicaSetSize": 1, - "maxReplicasetSize": 4 - }, - "userConsistencyPolicy": { - "defaultConsistencyLevel": "Session" - }, - "systemReplicationPolicy": { - "minReplicaSetSize": 1, - "maxReplicasetSize": 4 - }, - "readPolicy": { - "primaryReadCoefficient": 1, - "secondaryReadCoefficient": 1 - }, - "queryEngineConfiguration": "{\"maxSqlQueryInputLength\":262144,\"maxJoinsPerSqlQuery\":5,\"maxLogicalAndPerSqlQuery\":500,\"maxLogicalOrPerSqlQuery\":500,\"maxUdfRefPerSqlQuery\":10,\"maxInExpressionItemsCount\":16000,\"queryMaxInMemorySortDocumentCount\":500,\"maxQueryRequestTimeoutFraction\":0.9,\"sqlAllowNonFiniteNumbers\":false,\"sqlAllowAggregateFunctions\":true,\"sqlAllowSubQuery\":true,\"sqlAllowScalarSubQuery\":true,\"allowNewKeywords\":true,\"sqlAllowLike\":false,\"maxSpatialQueryCells\":12,\"spatialMaxGeometryPointCount\":256,\"sqlAllowTop\":true,\"enableSpatialIndexing\":true}" - }, - "rawHeaders": [ - "Cache-Control", - "no-store, no-cache", - "Pragma", - "no-cache", - "Transfer-Encoding", - "chunked", - "Content-Type", - "application/json", - "Content-Location", - "https://localhost:8081/", - "Server", - "Microsoft-HTTPAPI/2.0", - "x-ms-max-media-storage-usage-mb", - "10240", - "x-ms-media-storage-usage-mb", - "0", - "x-ms-databaseaccount-consumed-mb", - "0", - "x-ms-databaseaccount-reserved-mb", - "0", - "x-ms-databaseaccount-provisioned-mb", - "0", - "x-ms-gatewayversion", - "version=2.0.0.0", - "Date", - "Thu, 25 Oct 2018 20:14:44 GMT" - ] - }, - { - "scope": "https://localhost:8081", - "method": "POST", - "path": "/dbs", - "body": { - "query": "SELECT r._self FROM root r WHERE r.id = @id", - "parameters": [ - { - "name": "@id", - "value": "test-db" - } - ] - }, - "status": 200, - "response": { - "_rid": "", - "Databases": [ - { - "_self": "dbs/A7V-AA==/" - } - ], - "_count": 1 - }, - "rawHeaders": [ - "Cache-Control", - "no-store, no-cache", - "Pragma", - "no-cache", - "Transfer-Encoding", - "chunked", - "Content-Type", - "application/json", - "Server", - "Microsoft-HTTPAPI/2.0", - "x-ms-last-state-change-utc", - "Thu, 25 Oct 2018 20:14:00.991 GMT", - "x-ms-resource-quota", - "databases=100;", - "x-ms-resource-usage", - "databases=1;", - "lsn", - "79", - "x-ms-item-count", - "1", - "x-ms-schemaversion", - "1.6", - "x-ms-quorum-acked-lsn", - "79", - "x-ms-current-write-quorum", - "1", - "x-ms-current-replica-set-size", - "1", - "x-ms-xp-role", - "0", - "x-ms-global-Committed-lsn", - "-1", - "x-ms-number-of-read-regions", - "0", - "x-ms-transport-request-id", - "71", - "x-ms-cosmos-llsn", - "79", - "x-ms-cosmos-quorum-acked-llsn", - "79", - "x-ms-session-token", - "0:79", - "x-ms-request-charge", - "4.48", - "x-ms-serviceversion", - "version=2.0.0.0", - "x-ms-activity-id", - "e0eaf354-f7ae-4f00-9648-a6bdaed82770", - "x-ms-gatewayversion", - "version=2.0.0.0", - "Date", - "Thu, 25 Oct 2018 20:14:44 GMT" - ] - }, - { - "scope": "https://localhost:8081", - "method": "POST", - "path": "/dbs/A7V-AA==/colls/", - "body": { - "query": "SELECT r._self FROM root r WHERE r.id=@id", - "parameters": [ - { - "name": "@id", - "value": "bot-storage" - } - ] - }, - "status": 200, - "response": { - "_rid": "A7V-AA==", - "DocumentCollections": [ - { - "_self": "dbs/A7V-AA==/colls/A7V-AIqw5hc=/" - } - ], - "_count": 1 - }, - "rawHeaders": [ - "Cache-Control", - "no-store, no-cache", - "Pragma", - "no-cache", - "Transfer-Encoding", - "chunked", - "Content-Type", - "application/json", - "Server", - "Microsoft-HTTPAPI/2.0", - "x-ms-last-state-change-utc", - "Thu, 25 Oct 2018 20:14:00.991 GMT", - "x-ms-resource-quota", - "collections=5000;", - "x-ms-resource-usage", - "collections=1;", - "collection-partition-index", - "0", - "collection-service-index", - "0", - "lsn", - "79", - "x-ms-item-count", - "1", - "x-ms-schemaversion", - "1.6", - "x-ms-alt-content-path", - "dbs/test-db", - "x-ms-quorum-acked-lsn", - "79", - "x-ms-current-write-quorum", - "1", - "x-ms-current-replica-set-size", - "1", - "x-ms-xp-role", - "0", - "x-ms-global-Committed-lsn", - "-1", - "x-ms-number-of-read-regions", - "0", - "x-ms-transport-request-id", - "73", - "x-ms-cosmos-llsn", - "79", - "x-ms-cosmos-quorum-acked-llsn", - "79", - "x-ms-session-token", - "0:79", - "x-ms-request-charge", - "4.5", - "x-ms-serviceversion", - "version=2.0.0.0", - "x-ms-activity-id", - "1138034f-88e9-4434-97cb-32810d36ccbf", - "x-ms-gatewayversion", - "version=2.0.0.0", - "Date", - "Thu, 25 Oct 2018 20:14:44 GMT" - ] - }, - { - "scope": "https://localhost:8081", - "method": "GET", - "path": "/dbs/test-db/colls/bot-storage", - "body": "", - "status": 200, - "response": { - "id": "bot-storage", - "indexingPolicy": { - "indexingMode": "consistent", - "automatic": true, - "includedPaths": [ - { - "path": "/*", - "indexes": [ - { - "kind": "Range", - "dataType": "Number", - "precision": -1 - }, - { - "kind": "Hash", - "dataType": "String", - "precision": 3 - } - ] - } - ], - "excludedPaths": [] - }, - "_rid": "A7V-AIqw5hc=", - "_ts": 1540498482, - "_self": "dbs/A7V-AA==/colls/A7V-AIqw5hc=/", - "_etag": "\"00000000-0000-0000-6c9f-5d9f009a01d4\"", - "_docs": "docs/", - "_sprocs": "sprocs/", - "_triggers": "triggers/", - "_udfs": "udfs/", - "_conflicts": "conflicts/" - }, - "rawHeaders": [ - "Cache-Control", - "no-store, no-cache", - "Pragma", - "no-cache", - "Transfer-Encoding", - "chunked", - "Content-Type", - "application/json", - "Content-Location", - "https://127.0.0.1:8081/dbs/test-db/colls/bot-storage", - "Server", - "Microsoft-HTTPAPI/2.0", - "x-ms-last-state-change-utc", - "Thu, 25 Oct 2018 20:14:08.836 GMT", - "etag", - "\"00000000-0000-0000-6c9f-5d9f009a01d4\"", - "x-ms-resource-quota", - "functions=25;storedProcedures=100;triggers=25;documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", - "x-ms-resource-usage", - "functions=0;storedProcedures=0;triggers=0;documentSize=0;documentsSize=2;documentsCount=4;collectionSize=4;", - "collection-partition-index", - "0", - "collection-service-index", - "0", - "lsn", - "244", - "x-ms-schemaversion", - "1.6", - "x-ms-alt-content-path", - "dbs/test-db", - "x-ms-content-path", - "A7V-AA==", - "x-ms-quorum-acked-lsn", - "244", - "x-ms-documentdb-collection-index-transformation-progress", - "100", - "x-ms-current-write-quorum", - "1", - "x-ms-current-replica-set-size", - "1", - "x-ms-xp-role", - "0", - "x-ms-global-Committed-lsn", - "-1", - "x-ms-number-of-read-regions", - "0", - "x-ms-item-lsn", - "234", - "x-ms-transport-request-id", - "49", - "x-ms-cosmos-llsn", - "244", - "x-ms-cosmos-quorum-acked-llsn", - "244", - "x-ms-cosmos-item-llsn", - "234", - "x-ms-session-token", - "0:244", - "x-ms-request-charge", - "1", - "x-ms-serviceversion", - "version=2.0.0.0", - "x-ms-activity-id", - "b800bdf4-558c-4ba8-8e36-4115c6a56db5", - "x-ms-gatewayversion", - "version=2.0.0.0", - "Date", - "Thu, 25 Oct 2018 20:14:44 GMT" - ] - }, - { - "scope": "https://localhost:8081", - "method": "GET", - "path": "/dbs/test-db/colls/bot-storage", - "body": "", - "status": 200, - "response": { - "id": "bot-storage", - "indexingPolicy": { - "indexingMode": "consistent", - "automatic": true, - "includedPaths": [ - { - "path": "/*", - "indexes": [ - { - "kind": "Range", - "dataType": "Number", - "precision": -1 - }, - { - "kind": "Hash", - "dataType": "String", - "precision": 3 - } - ] - } - ], - "excludedPaths": [] - }, - "_rid": "A7V-AIqw5hc=", - "_ts": 1540498482, - "_self": "dbs/A7V-AA==/colls/A7V-AIqw5hc=/", - "_etag": "\"00000000-0000-0000-6c9f-5d9f009a01d4\"", - "_docs": "docs/", - "_sprocs": "sprocs/", - "_triggers": "triggers/", - "_udfs": "udfs/", - "_conflicts": "conflicts/" - }, - "rawHeaders": [ - "Cache-Control", - "no-store, no-cache", - "Pragma", - "no-cache", - "Transfer-Encoding", - "chunked", - "Content-Type", - "application/json", - "Content-Location", - "https://127.0.0.1:8081/dbs/test-db/colls/bot-storage", - "Server", - "Microsoft-HTTPAPI/2.0", - "x-ms-last-state-change-utc", - "Thu, 25 Oct 2018 20:14:08.836 GMT", - "etag", - "\"00000000-0000-0000-6c9f-5d9f009a01d4\"", - "x-ms-resource-quota", - "functions=25;storedProcedures=100;triggers=25;documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", - "x-ms-resource-usage", - "functions=0;storedProcedures=0;triggers=0;documentSize=0;documentsSize=2;documentsCount=4;collectionSize=4;", - "collection-partition-index", - "0", - "collection-service-index", - "0", - "lsn", - "244", - "x-ms-schemaversion", - "1.6", - "x-ms-alt-content-path", - "dbs/test-db", - "x-ms-content-path", - "A7V-AA==", - "x-ms-quorum-acked-lsn", - "244", - "x-ms-documentdb-collection-index-transformation-progress", - "100", - "x-ms-current-write-quorum", - "1", - "x-ms-current-replica-set-size", - "1", - "x-ms-xp-role", - "0", - "x-ms-global-Committed-lsn", - "-1", - "x-ms-number-of-read-regions", - "0", - "x-ms-item-lsn", - "234", - "x-ms-transport-request-id", - "50", - "x-ms-cosmos-llsn", - "244", - "x-ms-cosmos-quorum-acked-llsn", - "244", - "x-ms-cosmos-item-llsn", - "234", - "x-ms-session-token", - "0:244", - "x-ms-request-charge", - "1", - "x-ms-serviceversion", - "version=2.0.0.0", - "x-ms-activity-id", - "3ee60f2d-b449-4531-a60e-36d1a9555be0", - "x-ms-gatewayversion", - "version=2.0.0.0", - "Date", - "Thu, 25 Oct 2018 20:14:44 GMT" - ] - }, - { - "scope": "https://localhost:8081", - "method": "GET", - "path": "/dbs/test-db/colls/bot-storage", - "body": "", - "status": 200, - "response": { - "id": "bot-storage", - "indexingPolicy": { - "indexingMode": "consistent", - "automatic": true, - "includedPaths": [ - { - "path": "/*", - "indexes": [ - { - "kind": "Range", - "dataType": "Number", - "precision": -1 - }, - { - "kind": "Hash", - "dataType": "String", - "precision": 3 - } - ] - } - ], - "excludedPaths": [] - }, - "_rid": "A7V-AIqw5hc=", - "_ts": 1540498482, - "_self": "dbs/A7V-AA==/colls/A7V-AIqw5hc=/", - "_etag": "\"00000000-0000-0000-6c9f-5d9f009a01d4\"", - "_docs": "docs/", - "_sprocs": "sprocs/", - "_triggers": "triggers/", - "_udfs": "udfs/", - "_conflicts": "conflicts/" - }, - "rawHeaders": [ - "Cache-Control", - "no-store, no-cache", - "Pragma", - "no-cache", - "Transfer-Encoding", - "chunked", - "Content-Type", - "application/json", - "Content-Location", - "https://127.0.0.1:8081/dbs/test-db/colls/bot-storage", - "Server", - "Microsoft-HTTPAPI/2.0", - "x-ms-last-state-change-utc", - "Thu, 25 Oct 2018 20:14:08.836 GMT", - "etag", - "\"00000000-0000-0000-6c9f-5d9f009a01d4\"", - "x-ms-resource-quota", - "functions=25;storedProcedures=100;triggers=25;documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", - "x-ms-resource-usage", - "functions=0;storedProcedures=0;triggers=0;documentSize=0;documentsSize=2;documentsCount=4;collectionSize=4;", - "collection-partition-index", - "0", - "collection-service-index", - "0", - "lsn", - "244", - "x-ms-schemaversion", - "1.6", - "x-ms-alt-content-path", - "dbs/test-db", - "x-ms-content-path", - "A7V-AA==", - "x-ms-quorum-acked-lsn", - "244", - "x-ms-documentdb-collection-index-transformation-progress", - "100", - "x-ms-current-write-quorum", - "1", - "x-ms-current-replica-set-size", - "1", - "x-ms-xp-role", - "0", - "x-ms-global-Committed-lsn", - "-1", - "x-ms-number-of-read-regions", - "0", - "x-ms-item-lsn", - "234", - "x-ms-transport-request-id", - "51", - "x-ms-cosmos-llsn", - "244", - "x-ms-cosmos-quorum-acked-llsn", - "244", - "x-ms-cosmos-item-llsn", - "234", - "x-ms-session-token", - "0:244", - "x-ms-request-charge", - "1", - "x-ms-serviceversion", - "version=2.0.0.0", - "x-ms-activity-id", - "3be440fe-ac52-415d-8d4a-948ab0fd52c0", - "x-ms-gatewayversion", - "version=2.0.0.0", - "Date", - "Thu, 25 Oct 2018 20:14:44 GMT" - ] - }, - { - "scope": "https://localhost:8081", - "method": "POST", - "path": "/dbs/test-db/colls/bot-storage/docs", - "body": { - "id": "batch2", - "realId": "batch2", - "document": { - "count": 20 - } - }, - "status": 201, - "response": { - "id": "batch2", - "realId": "batch2", - "document": { - "count": 20 - }, - "_rid": "A7V-AIqw5hcGAAAAAAAAAA==", - "_self": "dbs/A7V-AA==/colls/A7V-AIqw5hc=/docs/A7V-AIqw5hcGAAAAAAAAAA==/", - "_etag": "\"00000000-0000-0000-6c9f-5e8e52e001d4\"", - "_attachments": "attachments/", - "_ts": 1540498484 - }, - "rawHeaders": [ - "Cache-Control", - "no-store, no-cache", - "Pragma", - "no-cache", - "Transfer-Encoding", - "chunked", - "Content-Type", - "application/json", - "Server", - "Microsoft-HTTPAPI/2.0", - "x-ms-last-state-change-utc", - "Thu, 25 Oct 2018 20:14:08.836 GMT", - "etag", - "\"00000000-0000-0000-6c9f-5e8e52e001d4\"", - "x-ms-resource-quota", - "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", - "x-ms-resource-usage", - "documentSize=0;documentsSize=3;documentsCount=4;collectionSize=5;", - "lsn", - "245", - "x-ms-schemaversion", - "1.6", - "x-ms-alt-content-path", - "dbs/test-db/colls/bot-storage", - "x-ms-content-path", - "A7V-AIqw5hc=", - "x-ms-quorum-acked-lsn", - "244", - "x-ms-current-write-quorum", - "1", - "x-ms-current-replica-set-size", - "1", - "x-ms-xp-role", - "0", - "x-ms-global-Committed-lsn", - "-1", - "x-ms-number-of-read-regions", - "0", - "x-ms-transport-request-id", - "64", - "x-ms-cosmos-llsn", - "245", - "x-ms-cosmos-quorum-acked-llsn", - "244", - "x-ms-session-token", - "0:245", - "x-ms-request-charge", - "5.9", - "x-ms-serviceversion", - "version=2.0.0.0", - "x-ms-activity-id", - "496a2f2c-830b-4658-b3f1-e5bf7c48ab98", - "x-ms-gatewayversion", - "version=2.0.0.0", - "Date", - "Thu, 25 Oct 2018 20:14:44 GMT" - ] - }, - { - "scope": "https://localhost:8081", - "method": "POST", - "path": "/dbs/test-db/colls/bot-storage/docs", - "body": { - "id": "batch1", - "realId": "batch1", - "document": { - "count": 10 - } - }, - "status": 201, - "response": { - "id": "batch1", - "realId": "batch1", - "document": { - "count": 10 - }, - "_rid": "A7V-AIqw5hcHAAAAAAAAAA==", - "_self": "dbs/A7V-AA==/colls/A7V-AIqw5hc=/docs/A7V-AIqw5hcHAAAAAAAAAA==/", - "_etag": "\"00000000-0000-0000-6c9f-5e8ef41a01d4\"", - "_attachments": "attachments/", - "_ts": 1540498484 - }, - "rawHeaders": [ - "Cache-Control", - "no-store, no-cache", - "Pragma", - "no-cache", - "Transfer-Encoding", - "chunked", - "Content-Type", - "application/json", - "Server", - "Microsoft-HTTPAPI/2.0", - "x-ms-last-state-change-utc", - "Thu, 25 Oct 2018 20:14:08.836 GMT", - "etag", - "\"00000000-0000-0000-6c9f-5e8ef41a01d4\"", - "x-ms-resource-quota", - "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", - "x-ms-resource-usage", - "documentSize=0;documentsSize=4;documentsCount=5;collectionSize=6;", - "lsn", - "246", - "x-ms-schemaversion", - "1.6", - "x-ms-alt-content-path", - "dbs/test-db/colls/bot-storage", - "x-ms-content-path", - "A7V-AIqw5hc=", - "x-ms-quorum-acked-lsn", - "245", - "x-ms-current-write-quorum", - "1", - "x-ms-current-replica-set-size", - "1", - "x-ms-xp-role", - "0", - "x-ms-global-Committed-lsn", - "-1", - "x-ms-number-of-read-regions", - "0", - "x-ms-transport-request-id", - "65", - "x-ms-cosmos-llsn", - "246", - "x-ms-cosmos-quorum-acked-llsn", - "245", - "x-ms-session-token", - "0:246", - "x-ms-request-charge", - "5.9", - "x-ms-serviceversion", - "version=2.0.0.0", - "x-ms-activity-id", - "dc075ac6-d084-4fea-ab17-f8e4d87b5f31", - "x-ms-gatewayversion", - "version=2.0.0.0", - "Date", - "Thu, 25 Oct 2018 20:14:44 GMT" - ] - }, - { - "scope": "https://localhost:8081", - "method": "POST", - "path": "/dbs/test-db/colls/bot-storage/docs", - "body": { - "id": "batch3", - "realId": "batch3", - "document": { - "count": 30 - } - }, - "status": 201, - "response": { - "id": "batch3", - "realId": "batch3", - "document": { - "count": 30 - }, - "_rid": "A7V-AIqw5hcIAAAAAAAAAA==", - "_self": "dbs/A7V-AA==/colls/A7V-AIqw5hc=/docs/A7V-AIqw5hcIAAAAAAAAAA==/", - "_etag": "\"00000000-0000-0000-6c9f-5e8f857101d4\"", - "_attachments": "attachments/", - "_ts": 1540498484 - }, - "rawHeaders": [ - "Cache-Control", - "no-store, no-cache", - "Pragma", - "no-cache", - "Transfer-Encoding", - "chunked", - "Content-Type", - "application/json", - "Server", - "Microsoft-HTTPAPI/2.0", - "x-ms-last-state-change-utc", - "Thu, 25 Oct 2018 20:14:08.836 GMT", - "etag", - "\"00000000-0000-0000-6c9f-5e8f857101d4\"", - "x-ms-resource-quota", - "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", - "x-ms-resource-usage", - "documentSize=0;documentsSize=5;documentsCount=6;collectionSize=7;", - "lsn", - "247", - "x-ms-schemaversion", - "1.6", - "x-ms-alt-content-path", - "dbs/test-db/colls/bot-storage", - "x-ms-content-path", - "A7V-AIqw5hc=", - "x-ms-quorum-acked-lsn", - "246", - "x-ms-current-write-quorum", - "1", - "x-ms-current-replica-set-size", - "1", - "x-ms-xp-role", - "0", - "x-ms-global-Committed-lsn", - "-1", - "x-ms-number-of-read-regions", - "0", - "x-ms-transport-request-id", - "66", - "x-ms-cosmos-llsn", - "247", - "x-ms-cosmos-quorum-acked-llsn", - "246", - "x-ms-session-token", - "0:247", - "x-ms-request-charge", - "5.9", - "x-ms-serviceversion", - "version=2.0.0.0", - "x-ms-activity-id", - "f6ca9263-a86d-4d5d-8acc-3c82173b8130", - "x-ms-gatewayversion", - "version=2.0.0.0", - "Date", - "Thu, 25 Oct 2018 20:14:44 GMT" - ] - }, - { - "scope": "https://localhost:8081", - "method": "POST", - "path": "/dbs/A7V-AA==/colls/A7V-AIqw5hc=/docs/", - "body": { - "query": "SELECT c.id, c.realId, c.document, c._etag FROM c WHERE c.id in (@id0,@id1,@id2)", - "parameters": [ - { - "name": "@id0", - "value": "batch1" - }, - { - "name": "@id1", - "value": "batch2" - }, - { - "name": "@id2", - "value": "batch3" - } - ] - }, - "status": 200, - "response": { - "_rid": "A7V-AIqw5hc=", - "Documents": [ - { - "id": "batch2", - "realId": "batch2", - "document": { - "count": 20 - }, - "_etag": "\"00000000-0000-0000-6c9f-5e8e52e001d4\"" - }, - { - "id": "batch1", - "realId": "batch1", - "document": { - "count": 10 - }, - "_etag": "\"00000000-0000-0000-6c9f-5e8ef41a01d4\"" - }, - { - "id": "batch3", - "realId": "batch3", - "document": { - "count": 30 - }, - "_etag": "\"00000000-0000-0000-6c9f-5e8f857101d4\"" - } - ], - "_count": 3 - }, - "rawHeaders": [ - "Cache-Control", - "no-store, no-cache", - "Pragma", - "no-cache", - "Transfer-Encoding", - "chunked", - "Content-Type", - "application/json", - "Server", - "Microsoft-HTTPAPI/2.0", - "x-ms-last-state-change-utc", - "Thu, 25 Oct 2018 20:14:08.836 GMT", - "x-ms-resource-quota", - "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", - "x-ms-resource-usage", - "documentSize=0;documentsSize=5;documentsCount=7;collectionSize=7;", - "lsn", - "247", - "x-ms-item-count", - "3", - "x-ms-schemaversion", - "1.6", - "x-ms-alt-content-path", - "dbs/test-db/colls/bot-storage", - "x-ms-quorum-acked-lsn", - "247", - "x-ms-current-write-quorum", - "1", - "x-ms-current-replica-set-size", - "1", - "x-ms-xp-role", - "0", - "x-ms-global-Committed-lsn", - "-1", - "x-ms-number-of-read-regions", - "0", - "x-ms-transport-request-id", - "67", - "x-ms-cosmos-llsn", - "247", - "x-ms-cosmos-quorum-acked-llsn", - "247", - "x-ms-session-token", - "0:247", - "x-ms-request-charge", - "2.81", - "x-ms-serviceversion", - "version=2.0.0.0", - "x-ms-activity-id", - "68fffb35-f50b-47f9-afa0-e3c7aa0f2bc6", - "x-ms-gatewayversion", - "version=2.0.0.0", - "Date", - "Thu, 25 Oct 2018 20:14:44 GMT" - ] - }, - { - "scope": "https://localhost:8081", - "method": "DELETE", - "path": "/dbs/test-db/colls/bot-storage/docs/batch1", - "body": "", - "status": 204, - "response": "", - "rawHeaders": [ - "Cache-Control", - "no-store, no-cache", - "Pragma", - "no-cache", - "Content-Length", - "0", - "Content-Type", - "application/json", - "Content-Location", - "https://127.0.0.1:8081/dbs/test-db/colls/bot-storage/docs/batch1", - "Server", - "Microsoft-HTTPAPI/2.0", - "x-ms-last-state-change-utc", - "Thu, 25 Oct 2018 20:14:08.836 GMT", - "x-ms-resource-quota", - "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", - "x-ms-resource-usage", - "documentSize=0;documentsSize=4;documentsCount=7;collectionSize=6;", - "lsn", - "248", - "x-ms-schemaversion", - "1.6", - "x-ms-alt-content-path", - "dbs/test-db/colls/bot-storage", - "x-ms-content-path", - "A7V-AIqw5hc=", - "x-ms-quorum-acked-lsn", - "247", - "x-ms-current-write-quorum", - "1", - "x-ms-current-replica-set-size", - "1", - "x-ms-xp-role", - "0", - "x-ms-global-Committed-lsn", - "-1", - "x-ms-number-of-read-regions", - "0", - "x-ms-transport-request-id", - "68", - "x-ms-cosmos-llsn", - "248", - "x-ms-cosmos-quorum-acked-llsn", - "247", - "x-ms-session-token", - "0:248", - "x-ms-request-charge", - "5.9", - "x-ms-serviceversion", - "version=2.0.0.0", - "x-ms-activity-id", - "f226aa42-dea6-4396-9f6b-2edbb154d395", - "x-ms-gatewayversion", - "version=2.0.0.0", - "Date", - "Thu, 25 Oct 2018 20:14:44 GMT" - ] - }, - { - "scope": "https://localhost:8081", - "method": "DELETE", - "path": "/dbs/test-db/colls/bot-storage/docs/batch2", - "body": "", - "status": 204, - "response": "", - "rawHeaders": [ - "Cache-Control", - "no-store, no-cache", - "Pragma", - "no-cache", - "Content-Length", - "0", - "Content-Type", - "application/json", - "Content-Location", - "https://127.0.0.1:8081/dbs/test-db/colls/bot-storage/docs/batch2", - "Server", - "Microsoft-HTTPAPI/2.0", - "x-ms-last-state-change-utc", - "Thu, 25 Oct 2018 20:14:08.836 GMT", - "x-ms-resource-quota", - "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", - "x-ms-resource-usage", - "documentSize=0;documentsSize=3;documentsCount=6;collectionSize=5;", - "lsn", - "249", - "x-ms-schemaversion", - "1.6", - "x-ms-alt-content-path", - "dbs/test-db/colls/bot-storage", - "x-ms-content-path", - "A7V-AIqw5hc=", - "x-ms-quorum-acked-lsn", - "248", - "x-ms-current-write-quorum", - "1", - "x-ms-current-replica-set-size", - "1", - "x-ms-xp-role", - "0", - "x-ms-global-Committed-lsn", - "-1", - "x-ms-number-of-read-regions", - "0", - "x-ms-transport-request-id", - "69", - "x-ms-cosmos-llsn", - "249", - "x-ms-cosmos-quorum-acked-llsn", - "248", - "x-ms-session-token", - "0:249", - "x-ms-request-charge", - "5.9", - "x-ms-serviceversion", - "version=2.0.0.0", - "x-ms-activity-id", - "ec2cbcc5-8019-4cdd-a05d-a39b7daec44a", - "x-ms-gatewayversion", - "version=2.0.0.0", - "Date", - "Thu, 25 Oct 2018 20:14:44 GMT" - ] - }, - { - "scope": "https://localhost:8081", - "method": "DELETE", - "path": "/dbs/test-db/colls/bot-storage/docs/batch3", - "body": "", - "status": 204, - "response": "", - "rawHeaders": [ - "Cache-Control", - "no-store, no-cache", - "Pragma", - "no-cache", - "Content-Length", - "0", - "Content-Type", - "application/json", - "Content-Location", - "https://127.0.0.1:8081/dbs/test-db/colls/bot-storage/docs/batch3", - "Server", - "Microsoft-HTTPAPI/2.0", - "x-ms-last-state-change-utc", - "Thu, 25 Oct 2018 20:14:08.836 GMT", - "x-ms-resource-quota", - "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", - "x-ms-resource-usage", - "documentSize=0;documentsSize=2;documentsCount=5;collectionSize=4;", - "lsn", - "250", - "x-ms-schemaversion", - "1.6", - "x-ms-alt-content-path", - "dbs/test-db/colls/bot-storage", - "x-ms-content-path", - "A7V-AIqw5hc=", - "x-ms-quorum-acked-lsn", - "249", - "x-ms-current-write-quorum", - "1", - "x-ms-current-replica-set-size", - "1", - "x-ms-xp-role", - "0", - "x-ms-global-Committed-lsn", - "-1", - "x-ms-number-of-read-regions", - "0", - "x-ms-transport-request-id", - "70", - "x-ms-cosmos-llsn", - "250", - "x-ms-cosmos-quorum-acked-llsn", - "249", - "x-ms-session-token", - "0:250", - "x-ms-request-charge", - "5.9", - "x-ms-serviceversion", - "version=2.0.0.0", - "x-ms-activity-id", - "b94c52a0-008c-4870-8dbb-cbe832b34d39", - "x-ms-gatewayversion", - "version=2.0.0.0", - "Date", - "Thu, 25 Oct 2018 20:14:44 GMT" - ] - }, - { - "scope": "https://localhost:8081", - "method": "POST", - "path": "/dbs/A7V-AA==/colls/A7V-AIqw5hc=/docs/", - "body": { - "query": "SELECT c.id, c.realId, c.document, c._etag FROM c WHERE c.id in (@id0,@id1,@id2)", - "parameters": [ - { - "name": "@id0", - "value": "batch1" - }, - { - "name": "@id1", - "value": "batch2" - }, - { - "name": "@id2", - "value": "batch3" - } - ] - }, - "status": 200, - "response": { - "_rid": "A7V-AIqw5hc=", - "Documents": [], - "_count": 0 - }, - "rawHeaders": [ - "Cache-Control", - "no-store, no-cache", - "Pragma", - "no-cache", - "Transfer-Encoding", - "chunked", - "Content-Type", - "application/json", - "Server", - "Microsoft-HTTPAPI/2.0", - "x-ms-last-state-change-utc", - "Thu, 25 Oct 2018 20:14:08.836 GMT", - "x-ms-resource-quota", - "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", - "x-ms-resource-usage", - "documentSize=0;documentsSize=2;documentsCount=4;collectionSize=4;", - "lsn", - "250", - "x-ms-item-count", - "0", - "x-ms-schemaversion", - "1.6", - "x-ms-alt-content-path", - "dbs/test-db/colls/bot-storage", - "x-ms-quorum-acked-lsn", - "250", - "x-ms-current-write-quorum", - "1", - "x-ms-current-replica-set-size", - "1", - "x-ms-xp-role", - "0", - "x-ms-global-Committed-lsn", - "-1", - "x-ms-number-of-read-regions", - "0", - "x-ms-transport-request-id", - "71", - "x-ms-cosmos-llsn", - "250", - "x-ms-cosmos-quorum-acked-llsn", - "250", - "x-ms-session-token", - "0:250", - "x-ms-request-charge", - "1.97", - "x-ms-serviceversion", - "version=2.0.0.0", - "x-ms-activity-id", - "646caac8-7703-4f41-b4f1-9e3e8a8d2d87", - "x-ms-gatewayversion", - "version=2.0.0.0", - "Date", - "Thu, 25 Oct 2018 20:14:44 GMT" - ] - } -] \ No newline at end of file diff --git a/libraries/botbuilder-azure/tests/TestData/CosmosDbStorage/crazy_keys_work.json b/libraries/botbuilder-azure/tests/TestData/CosmosDbStorage/crazy_keys_work.json deleted file mode 100644 index bd5070a616..0000000000 --- a/libraries/botbuilder-azure/tests/TestData/CosmosDbStorage/crazy_keys_work.json +++ /dev/null @@ -1,515 +0,0 @@ -[ - { - "scope": "https://localhost:8081", - "method": "GET", - "path": "/", - "body": "", - "status": 200, - "response": { - "_self": "", - "id": "localhost", - "_rid": "localhost", - "media": "//media/", - "addresses": "//addresses/", - "_dbs": "//dbs/", - "writableLocations": [ - { - "name": "South Central US", - "databaseAccountEndpoint": "https://127.0.0.1:8081/" - } - ], - "readableLocations": [ - { - "name": "South Central US", - "databaseAccountEndpoint": "https://127.0.0.1:8081/" - } - ], - "userReplicationPolicy": { - "asyncReplication": false, - "minReplicaSetSize": 1, - "maxReplicasetSize": 4 - }, - "userConsistencyPolicy": { - "defaultConsistencyLevel": "Session" - }, - "systemReplicationPolicy": { - "minReplicaSetSize": 1, - "maxReplicasetSize": 4 - }, - "readPolicy": { - "primaryReadCoefficient": 1, - "secondaryReadCoefficient": 1 - }, - "queryEngineConfiguration": "{\"maxSqlQueryInputLength\":262144,\"maxJoinsPerSqlQuery\":5,\"maxLogicalAndPerSqlQuery\":500,\"maxLogicalOrPerSqlQuery\":500,\"maxUdfRefPerSqlQuery\":10,\"maxInExpressionItemsCount\":16000,\"queryMaxInMemorySortDocumentCount\":500,\"maxQueryRequestTimeoutFraction\":0.9,\"sqlAllowNonFiniteNumbers\":false,\"sqlAllowAggregateFunctions\":true,\"sqlAllowSubQuery\":true,\"sqlAllowScalarSubQuery\":true,\"allowNewKeywords\":true,\"sqlAllowLike\":false,\"maxSpatialQueryCells\":12,\"spatialMaxGeometryPointCount\":256,\"sqlAllowTop\":true,\"enableSpatialIndexing\":true}" - }, - "rawHeaders": [ - "Cache-Control", - "no-store, no-cache", - "Pragma", - "no-cache", - "Transfer-Encoding", - "chunked", - "Content-Type", - "application/json", - "Content-Location", - "https://localhost:8081/", - "Server", - "Microsoft-HTTPAPI/2.0", - "x-ms-max-media-storage-usage-mb", - "10240", - "x-ms-media-storage-usage-mb", - "0", - "x-ms-databaseaccount-consumed-mb", - "0", - "x-ms-databaseaccount-reserved-mb", - "0", - "x-ms-databaseaccount-provisioned-mb", - "0", - "x-ms-gatewayversion", - "version=2.0.0.0", - "Date", - "Thu, 25 Oct 2018 20:14:44 GMT" - ] - }, - { - "scope": "https://localhost:8081", - "method": "POST", - "path": "/dbs", - "body": { - "query": "SELECT r._self FROM root r WHERE r.id = @id", - "parameters": [ - { - "name": "@id", - "value": "test-db" - } - ] - }, - "status": 200, - "response": { - "_rid": "", - "Databases": [ - { - "_self": "dbs/A7V-AA==/" - } - ], - "_count": 1 - }, - "rawHeaders": [ - "Cache-Control", - "no-store, no-cache", - "Pragma", - "no-cache", - "Transfer-Encoding", - "chunked", - "Content-Type", - "application/json", - "Server", - "Microsoft-HTTPAPI/2.0", - "x-ms-last-state-change-utc", - "Thu, 25 Oct 2018 20:14:00.991 GMT", - "x-ms-resource-quota", - "databases=100;", - "x-ms-resource-usage", - "databases=1;", - "lsn", - "79", - "x-ms-item-count", - "1", - "x-ms-schemaversion", - "1.6", - "x-ms-quorum-acked-lsn", - "79", - "x-ms-current-write-quorum", - "1", - "x-ms-current-replica-set-size", - "1", - "x-ms-xp-role", - "0", - "x-ms-global-Committed-lsn", - "-1", - "x-ms-number-of-read-regions", - "0", - "x-ms-transport-request-id", - "75", - "x-ms-cosmos-llsn", - "79", - "x-ms-cosmos-quorum-acked-llsn", - "79", - "x-ms-session-token", - "0:79", - "x-ms-request-charge", - "4.48", - "x-ms-serviceversion", - "version=2.0.0.0", - "x-ms-activity-id", - "d3cb650c-1894-406c-b249-10a8aa38d38b", - "x-ms-gatewayversion", - "version=2.0.0.0", - "Date", - "Thu, 25 Oct 2018 20:14:44 GMT" - ] - }, - { - "scope": "https://localhost:8081", - "method": "POST", - "path": "/dbs/A7V-AA==/colls/", - "body": { - "query": "SELECT r._self FROM root r WHERE r.id=@id", - "parameters": [ - { - "name": "@id", - "value": "bot-storage" - } - ] - }, - "status": 200, - "response": { - "_rid": "A7V-AA==", - "DocumentCollections": [ - { - "_self": "dbs/A7V-AA==/colls/A7V-AIqw5hc=/" - } - ], - "_count": 1 - }, - "rawHeaders": [ - "Cache-Control", - "no-store, no-cache", - "Pragma", - "no-cache", - "Transfer-Encoding", - "chunked", - "Content-Type", - "application/json", - "Server", - "Microsoft-HTTPAPI/2.0", - "x-ms-last-state-change-utc", - "Thu, 25 Oct 2018 20:14:00.991 GMT", - "x-ms-resource-quota", - "collections=5000;", - "x-ms-resource-usage", - "collections=1;", - "collection-partition-index", - "0", - "collection-service-index", - "0", - "lsn", - "79", - "x-ms-item-count", - "1", - "x-ms-schemaversion", - "1.6", - "x-ms-alt-content-path", - "dbs/test-db", - "x-ms-quorum-acked-lsn", - "79", - "x-ms-current-write-quorum", - "1", - "x-ms-current-replica-set-size", - "1", - "x-ms-xp-role", - "0", - "x-ms-global-Committed-lsn", - "-1", - "x-ms-number-of-read-regions", - "0", - "x-ms-transport-request-id", - "77", - "x-ms-cosmos-llsn", - "79", - "x-ms-cosmos-quorum-acked-llsn", - "79", - "x-ms-session-token", - "0:79", - "x-ms-request-charge", - "4.5", - "x-ms-serviceversion", - "version=2.0.0.0", - "x-ms-activity-id", - "5b189f23-a7e4-40ac-a1d9-a49e3b935803", - "x-ms-gatewayversion", - "version=2.0.0.0", - "Date", - "Thu, 25 Oct 2018 20:14:44 GMT" - ] - }, - { - "scope": "https://localhost:8081", - "method": "GET", - "path": "/dbs/test-db/colls/bot-storage", - "body": "", - "status": 200, - "response": { - "id": "bot-storage", - "indexingPolicy": { - "indexingMode": "consistent", - "automatic": true, - "includedPaths": [ - { - "path": "/*", - "indexes": [ - { - "kind": "Range", - "dataType": "Number", - "precision": -1 - }, - { - "kind": "Hash", - "dataType": "String", - "precision": 3 - } - ] - } - ], - "excludedPaths": [] - }, - "_rid": "A7V-AIqw5hc=", - "_ts": 1540498482, - "_self": "dbs/A7V-AA==/colls/A7V-AIqw5hc=/", - "_etag": "\"00000000-0000-0000-6c9f-5d9f009a01d4\"", - "_docs": "docs/", - "_sprocs": "sprocs/", - "_triggers": "triggers/", - "_udfs": "udfs/", - "_conflicts": "conflicts/" - }, - "rawHeaders": [ - "Cache-Control", - "no-store, no-cache", - "Pragma", - "no-cache", - "Transfer-Encoding", - "chunked", - "Content-Type", - "application/json", - "Content-Location", - "https://127.0.0.1:8081/dbs/test-db/colls/bot-storage", - "Server", - "Microsoft-HTTPAPI/2.0", - "x-ms-last-state-change-utc", - "Thu, 25 Oct 2018 20:14:08.836 GMT", - "etag", - "\"00000000-0000-0000-6c9f-5d9f009a01d4\"", - "x-ms-resource-quota", - "functions=25;storedProcedures=100;triggers=25;documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", - "x-ms-resource-usage", - "functions=0;storedProcedures=0;triggers=0;documentSize=0;documentsSize=2;documentsCount=4;collectionSize=4;", - "collection-partition-index", - "0", - "collection-service-index", - "0", - "lsn", - "250", - "x-ms-schemaversion", - "1.6", - "x-ms-alt-content-path", - "dbs/test-db", - "x-ms-content-path", - "A7V-AA==", - "x-ms-quorum-acked-lsn", - "250", - "x-ms-documentdb-collection-index-transformation-progress", - "100", - "x-ms-current-write-quorum", - "1", - "x-ms-current-replica-set-size", - "1", - "x-ms-xp-role", - "0", - "x-ms-global-Committed-lsn", - "-1", - "x-ms-number-of-read-regions", - "0", - "x-ms-item-lsn", - "234", - "x-ms-transport-request-id", - "72", - "x-ms-cosmos-llsn", - "250", - "x-ms-cosmos-quorum-acked-llsn", - "250", - "x-ms-cosmos-item-llsn", - "234", - "x-ms-session-token", - "0:250", - "x-ms-request-charge", - "1", - "x-ms-serviceversion", - "version=2.0.0.0", - "x-ms-activity-id", - "55ae4ec5-01b0-4427-b8a1-300ab3e46332", - "x-ms-gatewayversion", - "version=2.0.0.0", - "Date", - "Thu, 25 Oct 2018 20:14:44 GMT" - ] - }, - { - "scope": "https://localhost:8081", - "method": "POST", - "path": "/dbs/test-db/colls/bot-storage/docs", - "body": { - "id": "!@*23$%^&*2a()_+*3f*3f><\":QASD~`", - "realId": "!@#$%^&*()_+??><\":QASD~`", - "document": { - "count": 1 - } - }, - "status": 201, - "response": { - "id": "!@*23$%^&*2a()_+*3f*3f><\":QASD~`", - "realId": "!@#$%^&*()_+??><\":QASD~`", - "document": { - "count": 1 - }, - "_rid": "A7V-AIqw5hcJAAAAAAAAAA==", - "_self": "dbs/A7V-AA==/colls/A7V-AIqw5hc=/docs/A7V-AIqw5hcJAAAAAAAAAA==/", - "_etag": "\"00000000-0000-0000-6c9f-5e9f8ae101d4\"", - "_attachments": "attachments/", - "_ts": 1540498484 - }, - "rawHeaders": [ - "Cache-Control", - "no-store, no-cache", - "Pragma", - "no-cache", - "Transfer-Encoding", - "chunked", - "Content-Type", - "application/json", - "Server", - "Microsoft-HTTPAPI/2.0", - "x-ms-last-state-change-utc", - "Thu, 25 Oct 2018 20:14:08.836 GMT", - "etag", - "\"00000000-0000-0000-6c9f-5e9f8ae101d4\"", - "x-ms-resource-quota", - "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", - "x-ms-resource-usage", - "documentSize=0;documentsSize=3;documentsCount=4;collectionSize=5;", - "lsn", - "251", - "x-ms-schemaversion", - "1.6", - "x-ms-alt-content-path", - "dbs/test-db/colls/bot-storage", - "x-ms-content-path", - "A7V-AIqw5hc=", - "x-ms-quorum-acked-lsn", - "250", - "x-ms-current-write-quorum", - "1", - "x-ms-current-replica-set-size", - "1", - "x-ms-xp-role", - "0", - "x-ms-global-Committed-lsn", - "-1", - "x-ms-number-of-read-regions", - "0", - "x-ms-transport-request-id", - "77", - "x-ms-cosmos-llsn", - "251", - "x-ms-cosmos-quorum-acked-llsn", - "250", - "x-ms-session-token", - "0:251", - "x-ms-request-charge", - "5.9", - "x-ms-serviceversion", - "version=2.0.0.0", - "x-ms-activity-id", - "3fd1cd51-721e-43c1-8b49-46df27f20940", - "x-ms-gatewayversion", - "version=2.0.0.0", - "Date", - "Thu, 25 Oct 2018 20:14:44 GMT" - ] - }, - { - "scope": "https://localhost:8081", - "method": "POST", - "path": "/dbs/A7V-AA==/colls/A7V-AIqw5hc=/docs/", - "body": { - "query": "SELECT c.id, c.realId, c.document, c._etag FROM c WHERE c.id in (@id0)", - "parameters": [ - { - "name": "@id0", - "value": "!@*23$%^&*2a()_+*3f*3f><\":QASD~`" - } - ] - }, - "status": 200, - "response": { - "_rid": "A7V-AIqw5hc=", - "Documents": [ - { - "id": "!@*23$%^&*2a()_+*3f*3f><\":QASD~`", - "realId": "!@#$%^&*()_+??><\":QASD~`", - "document": { - "count": 1 - }, - "_etag": "\"00000000-0000-0000-6c9f-5e9f8ae101d4\"" - } - ], - "_count": 1 - }, - "rawHeaders": [ - "Cache-Control", - "no-store, no-cache", - "Pragma", - "no-cache", - "Transfer-Encoding", - "chunked", - "Content-Type", - "application/json", - "Server", - "Microsoft-HTTPAPI/2.0", - "x-ms-last-state-change-utc", - "Thu, 25 Oct 2018 20:14:08.836 GMT", - "x-ms-resource-quota", - "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", - "x-ms-resource-usage", - "documentSize=0;documentsSize=3;documentsCount=5;collectionSize=5;", - "lsn", - "251", - "x-ms-item-count", - "1", - "x-ms-schemaversion", - "1.6", - "x-ms-alt-content-path", - "dbs/test-db/colls/bot-storage", - "x-ms-quorum-acked-lsn", - "251", - "x-ms-current-write-quorum", - "1", - "x-ms-current-replica-set-size", - "1", - "x-ms-xp-role", - "0", - "x-ms-global-Committed-lsn", - "-1", - "x-ms-number-of-read-regions", - "0", - "x-ms-transport-request-id", - "78", - "x-ms-cosmos-llsn", - "251", - "x-ms-cosmos-quorum-acked-llsn", - "251", - "x-ms-session-token", - "0:251", - "x-ms-request-charge", - "2.26", - "x-ms-serviceversion", - "version=2.0.0.0", - "x-ms-activity-id", - "950c1efd-f8b1-4385-95a0-4c7920c74a04", - "x-ms-gatewayversion", - "version=2.0.0.0", - "Date", - "Thu, 25 Oct 2018 20:14:44 GMT" - ] - } -] \ No newline at end of file diff --git a/libraries/botbuilder-azure/tests/TestData/CosmosDbStorage/delete_known.json b/libraries/botbuilder-azure/tests/TestData/CosmosDbStorage/delete_known.json deleted file mode 100644 index a50d46e3a4..0000000000 --- a/libraries/botbuilder-azure/tests/TestData/CosmosDbStorage/delete_known.json +++ /dev/null @@ -1,572 +0,0 @@ -[ - { - "scope": "https://localhost:8081", - "method": "GET", - "path": "/", - "body": "", - "status": 200, - "response": { - "_self": "", - "id": "localhost", - "_rid": "localhost", - "media": "//media/", - "addresses": "//addresses/", - "_dbs": "//dbs/", - "writableLocations": [ - { - "name": "South Central US", - "databaseAccountEndpoint": "https://127.0.0.1:8081/" - } - ], - "readableLocations": [ - { - "name": "South Central US", - "databaseAccountEndpoint": "https://127.0.0.1:8081/" - } - ], - "userReplicationPolicy": { - "asyncReplication": false, - "minReplicaSetSize": 1, - "maxReplicasetSize": 4 - }, - "userConsistencyPolicy": { - "defaultConsistencyLevel": "Session" - }, - "systemReplicationPolicy": { - "minReplicaSetSize": 1, - "maxReplicasetSize": 4 - }, - "readPolicy": { - "primaryReadCoefficient": 1, - "secondaryReadCoefficient": 1 - }, - "queryEngineConfiguration": "{\"maxSqlQueryInputLength\":262144,\"maxJoinsPerSqlQuery\":5,\"maxLogicalAndPerSqlQuery\":500,\"maxLogicalOrPerSqlQuery\":500,\"maxUdfRefPerSqlQuery\":10,\"maxInExpressionItemsCount\":16000,\"queryMaxInMemorySortDocumentCount\":500,\"maxQueryRequestTimeoutFraction\":0.9,\"sqlAllowNonFiniteNumbers\":false,\"sqlAllowAggregateFunctions\":true,\"sqlAllowSubQuery\":true,\"sqlAllowScalarSubQuery\":true,\"allowNewKeywords\":true,\"sqlAllowLike\":false,\"maxSpatialQueryCells\":12,\"spatialMaxGeometryPointCount\":256,\"sqlAllowTop\":true,\"enableSpatialIndexing\":true}" - }, - "rawHeaders": [ - "Cache-Control", - "no-store, no-cache", - "Pragma", - "no-cache", - "Transfer-Encoding", - "chunked", - "Content-Type", - "application/json", - "Content-Location", - "https://localhost:8081/", - "Server", - "Microsoft-HTTPAPI/2.0", - "x-ms-max-media-storage-usage-mb", - "10240", - "x-ms-media-storage-usage-mb", - "0", - "x-ms-databaseaccount-consumed-mb", - "0", - "x-ms-databaseaccount-reserved-mb", - "0", - "x-ms-databaseaccount-provisioned-mb", - "0", - "x-ms-gatewayversion", - "version=2.0.0.0", - "Date", - "Thu, 25 Oct 2018 20:14:43 GMT" - ] - }, - { - "scope": "https://localhost:8081", - "method": "POST", - "path": "/dbs", - "body": { - "query": "SELECT r._self FROM root r WHERE r.id = @id", - "parameters": [ - { - "name": "@id", - "value": "test-db" - } - ] - }, - "status": 200, - "response": { - "_rid": "", - "Databases": [ - { - "_self": "dbs/A7V-AA==/" - } - ], - "_count": 1 - }, - "rawHeaders": [ - "Cache-Control", - "no-store, no-cache", - "Pragma", - "no-cache", - "Transfer-Encoding", - "chunked", - "Content-Type", - "application/json", - "Server", - "Microsoft-HTTPAPI/2.0", - "x-ms-last-state-change-utc", - "Thu, 25 Oct 2018 20:14:00.991 GMT", - "x-ms-resource-quota", - "databases=100;", - "x-ms-resource-usage", - "databases=1;", - "lsn", - "79", - "x-ms-item-count", - "1", - "x-ms-schemaversion", - "1.6", - "x-ms-quorum-acked-lsn", - "79", - "x-ms-current-write-quorum", - "1", - "x-ms-current-replica-set-size", - "1", - "x-ms-xp-role", - "0", - "x-ms-global-Committed-lsn", - "-1", - "x-ms-number-of-read-regions", - "0", - "x-ms-transport-request-id", - "67", - "x-ms-cosmos-llsn", - "79", - "x-ms-cosmos-quorum-acked-llsn", - "79", - "x-ms-session-token", - "0:79", - "x-ms-request-charge", - "4.48", - "x-ms-serviceversion", - "version=2.0.0.0", - "x-ms-activity-id", - "ab427b0f-dd17-42f6-8f31-463e8cc36dca", - "x-ms-gatewayversion", - "version=2.0.0.0", - "Date", - "Thu, 25 Oct 2018 20:14:44 GMT" - ] - }, - { - "scope": "https://localhost:8081", - "method": "POST", - "path": "/dbs/A7V-AA==/colls/", - "body": { - "query": "SELECT r._self FROM root r WHERE r.id=@id", - "parameters": [ - { - "name": "@id", - "value": "bot-storage" - } - ] - }, - "status": 200, - "response": { - "_rid": "A7V-AA==", - "DocumentCollections": [ - { - "_self": "dbs/A7V-AA==/colls/A7V-AIqw5hc=/" - } - ], - "_count": 1 - }, - "rawHeaders": [ - "Cache-Control", - "no-store, no-cache", - "Pragma", - "no-cache", - "Transfer-Encoding", - "chunked", - "Content-Type", - "application/json", - "Server", - "Microsoft-HTTPAPI/2.0", - "x-ms-last-state-change-utc", - "Thu, 25 Oct 2018 20:14:00.991 GMT", - "x-ms-resource-quota", - "collections=5000;", - "x-ms-resource-usage", - "collections=1;", - "collection-partition-index", - "0", - "collection-service-index", - "0", - "lsn", - "79", - "x-ms-item-count", - "1", - "x-ms-schemaversion", - "1.6", - "x-ms-alt-content-path", - "dbs/test-db", - "x-ms-quorum-acked-lsn", - "79", - "x-ms-current-write-quorum", - "1", - "x-ms-current-replica-set-size", - "1", - "x-ms-xp-role", - "0", - "x-ms-global-Committed-lsn", - "-1", - "x-ms-number-of-read-regions", - "0", - "x-ms-transport-request-id", - "69", - "x-ms-cosmos-llsn", - "79", - "x-ms-cosmos-quorum-acked-llsn", - "79", - "x-ms-session-token", - "0:79", - "x-ms-request-charge", - "4.5", - "x-ms-serviceversion", - "version=2.0.0.0", - "x-ms-activity-id", - "407be691-8bbe-48a6-b107-cd45ce5f54a2", - "x-ms-gatewayversion", - "version=2.0.0.0", - "Date", - "Thu, 25 Oct 2018 20:14:44 GMT" - ] - }, - { - "scope": "https://localhost:8081", - "method": "GET", - "path": "/dbs/test-db/colls/bot-storage", - "body": "", - "status": 200, - "response": { - "id": "bot-storage", - "indexingPolicy": { - "indexingMode": "consistent", - "automatic": true, - "includedPaths": [ - { - "path": "/*", - "indexes": [ - { - "kind": "Range", - "dataType": "Number", - "precision": -1 - }, - { - "kind": "Hash", - "dataType": "String", - "precision": 3 - } - ] - } - ], - "excludedPaths": [] - }, - "_rid": "A7V-AIqw5hc=", - "_ts": 1540498482, - "_self": "dbs/A7V-AA==/colls/A7V-AIqw5hc=/", - "_etag": "\"00000000-0000-0000-6c9f-5d9f009a01d4\"", - "_docs": "docs/", - "_sprocs": "sprocs/", - "_triggers": "triggers/", - "_udfs": "udfs/", - "_conflicts": "conflicts/" - }, - "rawHeaders": [ - "Cache-Control", - "no-store, no-cache", - "Pragma", - "no-cache", - "Transfer-Encoding", - "chunked", - "Content-Type", - "application/json", - "Content-Location", - "https://127.0.0.1:8081/dbs/test-db/colls/bot-storage", - "Server", - "Microsoft-HTTPAPI/2.0", - "x-ms-last-state-change-utc", - "Thu, 25 Oct 2018 20:14:08.836 GMT", - "etag", - "\"00000000-0000-0000-6c9f-5d9f009a01d4\"", - "x-ms-resource-quota", - "functions=25;storedProcedures=100;triggers=25;documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", - "x-ms-resource-usage", - "functions=0;storedProcedures=0;triggers=0;documentSize=0;documentsSize=2;documentsCount=4;collectionSize=4;", - "collection-partition-index", - "0", - "collection-service-index", - "0", - "lsn", - "242", - "x-ms-schemaversion", - "1.6", - "x-ms-alt-content-path", - "dbs/test-db", - "x-ms-content-path", - "A7V-AA==", - "x-ms-quorum-acked-lsn", - "242", - "x-ms-documentdb-collection-index-transformation-progress", - "100", - "x-ms-current-write-quorum", - "1", - "x-ms-current-replica-set-size", - "1", - "x-ms-xp-role", - "0", - "x-ms-global-Committed-lsn", - "-1", - "x-ms-number-of-read-regions", - "0", - "x-ms-item-lsn", - "234", - "x-ms-transport-request-id", - "41", - "x-ms-cosmos-llsn", - "242", - "x-ms-cosmos-quorum-acked-llsn", - "242", - "x-ms-cosmos-item-llsn", - "234", - "x-ms-session-token", - "0:242", - "x-ms-request-charge", - "1", - "x-ms-serviceversion", - "version=2.0.0.0", - "x-ms-activity-id", - "77dacc2b-be1a-4bac-a667-bbf8ab16fe69", - "x-ms-gatewayversion", - "version=2.0.0.0", - "Date", - "Thu, 25 Oct 2018 20:14:44 GMT" - ] - }, - { - "scope": "https://localhost:8081", - "method": "POST", - "path": "/dbs/test-db/colls/bot-storage/docs", - "body": { - "id": "delete1", - "realId": "delete1", - "document": { - "count": 1 - } - }, - "status": 201, - "response": { - "id": "delete1", - "realId": "delete1", - "document": { - "count": 1 - }, - "_rid": "A7V-AIqw5hcFAAAAAAAAAA==", - "_self": "dbs/A7V-AA==/colls/A7V-AIqw5hc=/docs/A7V-AIqw5hcFAAAAAAAAAA==/", - "_etag": "\"00000000-0000-0000-6c9f-5e7e327001d4\"", - "_attachments": "attachments/", - "_ts": 1540498484 - }, - "rawHeaders": [ - "Cache-Control", - "no-store, no-cache", - "Pragma", - "no-cache", - "Transfer-Encoding", - "chunked", - "Content-Type", - "application/json", - "Server", - "Microsoft-HTTPAPI/2.0", - "x-ms-last-state-change-utc", - "Thu, 25 Oct 2018 20:14:08.836 GMT", - "etag", - "\"00000000-0000-0000-6c9f-5e7e327001d4\"", - "x-ms-resource-quota", - "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", - "x-ms-resource-usage", - "documentSize=0;documentsSize=3;documentsCount=4;collectionSize=5;", - "lsn", - "243", - "x-ms-schemaversion", - "1.6", - "x-ms-alt-content-path", - "dbs/test-db/colls/bot-storage", - "x-ms-content-path", - "A7V-AIqw5hc=", - "x-ms-quorum-acked-lsn", - "242", - "x-ms-current-write-quorum", - "1", - "x-ms-current-replica-set-size", - "1", - "x-ms-xp-role", - "0", - "x-ms-global-Committed-lsn", - "-1", - "x-ms-number-of-read-regions", - "0", - "x-ms-transport-request-id", - "46", - "x-ms-cosmos-llsn", - "243", - "x-ms-cosmos-quorum-acked-llsn", - "242", - "x-ms-session-token", - "0:243", - "x-ms-request-charge", - "5.9", - "x-ms-serviceversion", - "version=2.0.0.0", - "x-ms-activity-id", - "9b27e6ed-a372-4fae-97bb-c5470d62869d", - "x-ms-gatewayversion", - "version=2.0.0.0", - "Date", - "Thu, 25 Oct 2018 20:14:44 GMT" - ] - }, - { - "scope": "https://localhost:8081", - "method": "DELETE", - "path": "/dbs/test-db/colls/bot-storage/docs/delete1", - "body": "", - "status": 204, - "response": "", - "rawHeaders": [ - "Cache-Control", - "no-store, no-cache", - "Pragma", - "no-cache", - "Content-Length", - "0", - "Content-Type", - "application/json", - "Content-Location", - "https://127.0.0.1:8081/dbs/test-db/colls/bot-storage/docs/delete1", - "Server", - "Microsoft-HTTPAPI/2.0", - "x-ms-last-state-change-utc", - "Thu, 25 Oct 2018 20:14:08.836 GMT", - "x-ms-resource-quota", - "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", - "x-ms-resource-usage", - "documentSize=0;documentsSize=2;documentsCount=5;collectionSize=4;", - "lsn", - "244", - "x-ms-schemaversion", - "1.6", - "x-ms-alt-content-path", - "dbs/test-db/colls/bot-storage", - "x-ms-content-path", - "A7V-AIqw5hc=", - "x-ms-quorum-acked-lsn", - "243", - "x-ms-current-write-quorum", - "1", - "x-ms-current-replica-set-size", - "1", - "x-ms-xp-role", - "0", - "x-ms-global-Committed-lsn", - "-1", - "x-ms-number-of-read-regions", - "0", - "x-ms-transport-request-id", - "47", - "x-ms-cosmos-llsn", - "244", - "x-ms-cosmos-quorum-acked-llsn", - "243", - "x-ms-session-token", - "0:244", - "x-ms-request-charge", - "5.9", - "x-ms-serviceversion", - "version=2.0.0.0", - "x-ms-activity-id", - "649dbc54-16f0-4eed-9e9c-3db1c8e0fef1", - "x-ms-gatewayversion", - "version=2.0.0.0", - "Date", - "Thu, 25 Oct 2018 20:14:44 GMT" - ] - }, - { - "scope": "https://localhost:8081", - "method": "POST", - "path": "/dbs/A7V-AA==/colls/A7V-AIqw5hc=/docs/", - "body": { - "query": "SELECT c.id, c.realId, c.document, c._etag FROM c WHERE c.id in (@id0)", - "parameters": [ - { - "name": "@id0", - "value": "delete1" - } - ] - }, - "status": 200, - "response": { - "_rid": "A7V-AIqw5hc=", - "Documents": [], - "_count": 0 - }, - "rawHeaders": [ - "Cache-Control", - "no-store, no-cache", - "Pragma", - "no-cache", - "Transfer-Encoding", - "chunked", - "Content-Type", - "application/json", - "Server", - "Microsoft-HTTPAPI/2.0", - "x-ms-last-state-change-utc", - "Thu, 25 Oct 2018 20:14:08.836 GMT", - "x-ms-resource-quota", - "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", - "x-ms-resource-usage", - "documentSize=0;documentsSize=2;documentsCount=4;collectionSize=4;", - "lsn", - "244", - "x-ms-item-count", - "0", - "x-ms-schemaversion", - "1.6", - "x-ms-alt-content-path", - "dbs/test-db/colls/bot-storage", - "x-ms-quorum-acked-lsn", - "244", - "x-ms-current-write-quorum", - "1", - "x-ms-current-replica-set-size", - "1", - "x-ms-xp-role", - "0", - "x-ms-global-Committed-lsn", - "-1", - "x-ms-number-of-read-regions", - "0", - "x-ms-transport-request-id", - "48", - "x-ms-cosmos-llsn", - "244", - "x-ms-cosmos-quorum-acked-llsn", - "244", - "x-ms-session-token", - "0:244", - "x-ms-request-charge", - "1.97", - "x-ms-serviceversion", - "version=2.0.0.0", - "x-ms-activity-id", - "302d86da-7a4e-44ab-b085-387e4e269688", - "x-ms-gatewayversion", - "version=2.0.0.0", - "Date", - "Thu, 25 Oct 2018 20:14:44 GMT" - ] - } -] \ No newline at end of file diff --git a/libraries/botbuilder-azure/tests/TestData/CosmosDbStorage/delete_unknown.json b/libraries/botbuilder-azure/tests/TestData/CosmosDbStorage/delete_unknown.json deleted file mode 100644 index a3a68f1722..0000000000 --- a/libraries/botbuilder-azure/tests/TestData/CosmosDbStorage/delete_unknown.json +++ /dev/null @@ -1,293 +0,0 @@ -[ - { - "scope": "https://localhost:8081", - "method": "GET", - "path": "/", - "body": "", - "status": 200, - "response": { - "_self": "", - "id": "localhost", - "_rid": "localhost", - "media": "//media/", - "addresses": "//addresses/", - "_dbs": "//dbs/", - "writableLocations": [ - { - "name": "South Central US", - "databaseAccountEndpoint": "https://127.0.0.1:8081/" - } - ], - "readableLocations": [ - { - "name": "South Central US", - "databaseAccountEndpoint": "https://127.0.0.1:8081/" - } - ], - "userReplicationPolicy": { - "asyncReplication": false, - "minReplicaSetSize": 1, - "maxReplicasetSize": 4 - }, - "userConsistencyPolicy": { - "defaultConsistencyLevel": "Session" - }, - "systemReplicationPolicy": { - "minReplicaSetSize": 1, - "maxReplicasetSize": 4 - }, - "readPolicy": { - "primaryReadCoefficient": 1, - "secondaryReadCoefficient": 1 - }, - "queryEngineConfiguration": "{\"maxSqlQueryInputLength\":262144,\"maxJoinsPerSqlQuery\":5,\"maxLogicalAndPerSqlQuery\":500,\"maxLogicalOrPerSqlQuery\":500,\"maxUdfRefPerSqlQuery\":10,\"maxInExpressionItemsCount\":16000,\"queryMaxInMemorySortDocumentCount\":500,\"maxQueryRequestTimeoutFraction\":0.9,\"sqlAllowNonFiniteNumbers\":false,\"sqlAllowAggregateFunctions\":true,\"sqlAllowSubQuery\":true,\"sqlAllowScalarSubQuery\":true,\"allowNewKeywords\":true,\"sqlAllowLike\":false,\"maxSpatialQueryCells\":12,\"spatialMaxGeometryPointCount\":256,\"sqlAllowTop\":true,\"enableSpatialIndexing\":true}" - }, - "rawHeaders": [ - "Cache-Control", - "no-store, no-cache", - "Pragma", - "no-cache", - "Transfer-Encoding", - "chunked", - "Content-Type", - "application/json", - "Content-Location", - "https://localhost:8081/", - "Server", - "Microsoft-HTTPAPI/2.0", - "x-ms-max-media-storage-usage-mb", - "10240", - "x-ms-media-storage-usage-mb", - "0", - "x-ms-databaseaccount-consumed-mb", - "0", - "x-ms-databaseaccount-reserved-mb", - "0", - "x-ms-databaseaccount-provisioned-mb", - "0", - "x-ms-gatewayversion", - "version=2.0.0.0", - "Date", - "Thu, 25 Oct 2018 20:14:43 GMT" - ] - }, - { - "scope": "https://localhost:8081", - "method": "POST", - "path": "/dbs", - "body": { - "query": "SELECT r._self FROM root r WHERE r.id = @id", - "parameters": [ - { - "name": "@id", - "value": "test-db" - } - ] - }, - "status": 200, - "response": { - "_rid": "", - "Databases": [ - { - "_self": "dbs/A7V-AA==/" - } - ], - "_count": 1 - }, - "rawHeaders": [ - "Cache-Control", - "no-store, no-cache", - "Pragma", - "no-cache", - "Transfer-Encoding", - "chunked", - "Content-Type", - "application/json", - "Server", - "Microsoft-HTTPAPI/2.0", - "x-ms-last-state-change-utc", - "Thu, 25 Oct 2018 20:14:00.991 GMT", - "x-ms-resource-quota", - "databases=100;", - "x-ms-resource-usage", - "databases=1;", - "lsn", - "79", - "x-ms-item-count", - "1", - "x-ms-schemaversion", - "1.6", - "x-ms-quorum-acked-lsn", - "79", - "x-ms-current-write-quorum", - "1", - "x-ms-current-replica-set-size", - "1", - "x-ms-xp-role", - "0", - "x-ms-global-Committed-lsn", - "-1", - "x-ms-number-of-read-regions", - "0", - "x-ms-transport-request-id", - "63", - "x-ms-cosmos-llsn", - "79", - "x-ms-cosmos-quorum-acked-llsn", - "79", - "x-ms-session-token", - "0:79", - "x-ms-request-charge", - "4.48", - "x-ms-serviceversion", - "version=2.0.0.0", - "x-ms-activity-id", - "4dacf567-a8c2-4837-8eef-e85c4be01fd8", - "x-ms-gatewayversion", - "version=2.0.0.0", - "Date", - "Thu, 25 Oct 2018 20:14:43 GMT" - ] - }, - { - "scope": "https://localhost:8081", - "method": "POST", - "path": "/dbs/A7V-AA==/colls/", - "body": { - "query": "SELECT r._self FROM root r WHERE r.id=@id", - "parameters": [ - { - "name": "@id", - "value": "bot-storage" - } - ] - }, - "status": 200, - "response": { - "_rid": "A7V-AA==", - "DocumentCollections": [ - { - "_self": "dbs/A7V-AA==/colls/A7V-AIqw5hc=/" - } - ], - "_count": 1 - }, - "rawHeaders": [ - "Cache-Control", - "no-store, no-cache", - "Pragma", - "no-cache", - "Transfer-Encoding", - "chunked", - "Content-Type", - "application/json", - "Server", - "Microsoft-HTTPAPI/2.0", - "x-ms-last-state-change-utc", - "Thu, 25 Oct 2018 20:14:00.991 GMT", - "x-ms-resource-quota", - "collections=5000;", - "x-ms-resource-usage", - "collections=1;", - "collection-partition-index", - "0", - "collection-service-index", - "0", - "lsn", - "79", - "x-ms-item-count", - "1", - "x-ms-schemaversion", - "1.6", - "x-ms-alt-content-path", - "dbs/test-db", - "x-ms-quorum-acked-lsn", - "79", - "x-ms-current-write-quorum", - "1", - "x-ms-current-replica-set-size", - "1", - "x-ms-xp-role", - "0", - "x-ms-global-Committed-lsn", - "-1", - "x-ms-number-of-read-regions", - "0", - "x-ms-transport-request-id", - "65", - "x-ms-cosmos-llsn", - "79", - "x-ms-cosmos-quorum-acked-llsn", - "79", - "x-ms-session-token", - "0:79", - "x-ms-request-charge", - "4.5", - "x-ms-serviceversion", - "version=2.0.0.0", - "x-ms-activity-id", - "80f999aa-d147-4ef1-89b1-d3c38bdb9d3c", - "x-ms-gatewayversion", - "version=2.0.0.0", - "Date", - "Thu, 25 Oct 2018 20:14:43 GMT" - ] - }, - { - "scope": "https://localhost:8081", - "method": "DELETE", - "path": "/dbs/test-db/colls/bot-storage/docs/unknown", - "body": "", - "status": 404, - "response": { - "code": "NotFound", - "message": "Message: {\"Errors\":[\"Resource Not Found\"]}\r\nActivityId: c0a6bcc1-0636-4934-9463-91f9fc2d8746, Request URI: /apps/DocDbApp/services/DocDbServer12/partitions/a4cb4958-38c8-11e6-8106-8cdcd42c33be/replicas/1p/, RequestStats: \r\nRequestStartTime: 2018-10-25T20:14:44.0714148Z, Number of regions attempted: 1\r\n, SDK: Microsoft.Azure.Documents.Common/2.0.0.0" - }, - "rawHeaders": [ - "Transfer-Encoding", - "chunked", - "Content-Type", - "application/json", - "Content-Location", - "https://127.0.0.1:8081/dbs/test-db/colls/bot-storage/docs/unknown", - "Server", - "Microsoft-HTTPAPI/2.0", - "x-ms-last-state-change-utc", - "Thu, 25 Oct 2018 20:14:08.836 GMT", - "lsn", - "242", - "x-ms-schemaversion", - "1.6", - "x-ms-quorum-acked-lsn", - "242", - "x-ms-current-write-quorum", - "1", - "x-ms-current-replica-set-size", - "1", - "x-ms-xp-role", - "0", - "x-ms-global-Committed-lsn", - "-1", - "x-ms-number-of-read-regions", - "0", - "x-ms-transport-request-id", - "40", - "x-ms-cosmos-llsn", - "242", - "x-ms-cosmos-quorum-acked-llsn", - "242", - "x-ms-session-token", - "0:242", - "x-ms-request-charge", - "1.24", - "x-ms-serviceversion", - "version=2.0.0.0", - "x-ms-activity-id", - "c0a6bcc1-0636-4934-9463-91f9fc2d8746", - "x-ms-gatewayversion", - "version=2.0.0.0", - "Date", - "Thu, 25 Oct 2018 20:14:43 GMT" - ] - } -] \ No newline at end of file diff --git a/libraries/botbuilder-azure/tests/TestData/CosmosDbStorage/delete_with_partition_key.json b/libraries/botbuilder-azure/tests/TestData/CosmosDbStorage/delete_with_partition_key.json deleted file mode 100644 index a116d069ab..0000000000 --- a/libraries/botbuilder-azure/tests/TestData/CosmosDbStorage/delete_with_partition_key.json +++ /dev/null @@ -1,616 +0,0 @@ -[ - { - "scope": "https://localhost:8081", - "method": "GET", - "path": "/", - "body": "", - "status": 200, - "response": { - "_self": "", - "id": "localhost", - "_rid": "localhost", - "media": "//media/", - "addresses": "//addresses/", - "_dbs": "//dbs/", - "writableLocations": [ - { - "name": "South Central US", - "databaseAccountEndpoint": "https://127.0.0.1:8081/" - } - ], - "readableLocations": [ - { - "name": "South Central US", - "databaseAccountEndpoint": "https://127.0.0.1:8081/" - } - ], - "userReplicationPolicy": { - "asyncReplication": false, - "minReplicaSetSize": 1, - "maxReplicasetSize": 4 - }, - "userConsistencyPolicy": { - "defaultConsistencyLevel": "Session" - }, - "systemReplicationPolicy": { - "minReplicaSetSize": 1, - "maxReplicasetSize": 4 - }, - "readPolicy": { - "primaryReadCoefficient": 1, - "secondaryReadCoefficient": 1 - }, - "queryEngineConfiguration": "{\"maxSqlQueryInputLength\":262144,\"maxJoinsPerSqlQuery\":5,\"maxLogicalAndPerSqlQuery\":500,\"maxLogicalOrPerSqlQuery\":500,\"maxUdfRefPerSqlQuery\":10,\"maxInExpressionItemsCount\":16000,\"queryMaxInMemorySortDocumentCount\":500,\"maxQueryRequestTimeoutFraction\":0.9,\"sqlAllowNonFiniteNumbers\":false,\"sqlAllowAggregateFunctions\":true,\"sqlAllowSubQuery\":true,\"sqlAllowScalarSubQuery\":true,\"allowNewKeywords\":true,\"sqlAllowLike\":false,\"sqlAllowGroupByClause\":false,\"maxSpatialQueryCells\":12,\"spatialMaxGeometryPointCount\":256,\"sqlAllowTop\":true,\"enableSpatialIndexing\":true}" - }, - "rawHeaders": [ - "Cache-Control", - "no-store, no-cache", - "Pragma", - "no-cache", - "Transfer-Encoding", - "chunked", - "Content-Type", - "application/json", - "Content-Location", - "https://localhost:8081/", - "Server", - "Microsoft-HTTPAPI/2.0", - "Access-Control-Allow-Origin", - "", - "Access-Control-Allow-Credentials", - "true", - "x-ms-max-media-storage-usage-mb", - "10240", - "x-ms-media-storage-usage-mb", - "0", - "x-ms-databaseaccount-consumed-mb", - "0", - "x-ms-databaseaccount-reserved-mb", - "0", - "x-ms-databaseaccount-provisioned-mb", - "0", - "x-ms-gatewayversion", - "version=2.2.0.0", - "Date", - "Fri, 05 Apr 2019 16:48:27 GMT" - ] - }, - { - "scope": "https://localhost:8081", - "method": "POST", - "path": "/dbs", - "body": { - "query": "SELECT r._self FROM root r WHERE r.id = @id", - "parameters": [ - { - "name": "@id", - "value": "test-db" - } - ] - }, - "status": 200, - "response": { - "_rid": "", - "Databases": [ - { - "_self": "dbs/eLtDAA==/" - } - ], - "_count": 1 - }, - "rawHeaders": [ - "Cache-Control", - "no-store, no-cache", - "Pragma", - "no-cache", - "Transfer-Encoding", - "chunked", - "Content-Type", - "application/json", - "Server", - "Microsoft-HTTPAPI/2.0", - "Access-Control-Allow-Origin", - "", - "Access-Control-Allow-Credentials", - "true", - "x-ms-last-state-change-utc", - "Fri, 29 Mar 2019 04:36:17.258 GMT", - "x-ms-resource-quota", - "databases=100;", - "x-ms-resource-usage", - "databases=2;", - "lsn", - "533", - "x-ms-item-count", - "1", - "x-ms-schemaversion", - "1.7", - "x-ms-quorum-acked-lsn", - "533", - "x-ms-current-write-quorum", - "1", - "x-ms-current-replica-set-size", - "1", - "x-ms-xp-role", - "0", - "x-ms-global-Committed-lsn", - "-1", - "x-ms-number-of-read-regions", - "0", - "x-ms-transport-request-id", - "2742", - "x-ms-cosmos-llsn", - "533", - "x-ms-cosmos-quorum-acked-llsn", - "533", - "x-ms-session-token", - "0:533", - "x-ms-request-charge", - "5.66", - "x-ms-serviceversion", - "version=2.2.0.0", - "x-ms-activity-id", - "43e368b3-8d12-4392-a6ca-1fe8de0496cc", - "x-ms-gatewayversion", - "version=2.2.0.0", - "Date", - "Fri, 05 Apr 2019 16:48:27 GMT" - ] - }, - { - "scope": "https://localhost:8081", - "method": "POST", - "path": "/dbs/eLtDAA==/colls/", - "body": { - "query": "SELECT r._self FROM root r WHERE r.id=@id", - "parameters": [ - { - "name": "@id", - "value": "bot-storage" - } - ] - }, - "status": 200, - "response": { - "_rid": "eLtDAA==", - "DocumentCollections": [ - { - "_self": "dbs/eLtDAA==/colls/eLtDAL-3CAk=/" - } - ], - "_count": 1 - }, - "rawHeaders": [ - "Cache-Control", - "no-store, no-cache", - "Pragma", - "no-cache", - "Transfer-Encoding", - "chunked", - "Content-Type", - "application/json", - "Server", - "Microsoft-HTTPAPI/2.0", - "Access-Control-Allow-Origin", - "", - "Access-Control-Allow-Credentials", - "true", - "x-ms-last-state-change-utc", - "Fri, 29 Mar 2019 04:36:17.258 GMT", - "x-ms-resource-quota", - "collections=5000;", - "x-ms-resource-usage", - "collections=2;", - "collection-partition-index", - "0", - "collection-service-index", - "0", - "lsn", - "533", - "x-ms-item-count", - "1", - "x-ms-schemaversion", - "1.7", - "x-ms-alt-content-path", - "dbs/test-db", - "x-ms-quorum-acked-lsn", - "533", - "x-ms-current-write-quorum", - "1", - "x-ms-current-replica-set-size", - "1", - "x-ms-xp-role", - "0", - "x-ms-global-Committed-lsn", - "-1", - "x-ms-number-of-read-regions", - "0", - "x-ms-transport-request-id", - "2744", - "x-ms-cosmos-llsn", - "533", - "x-ms-cosmos-quorum-acked-llsn", - "533", - "x-ms-session-token", - "0:533", - "x-ms-request-charge", - "5.66", - "x-ms-serviceversion", - "version=2.2.0.0", - "x-ms-activity-id", - "73108fad-a434-42c9-9bcb-b03ec9dc6e9f", - "x-ms-gatewayversion", - "version=2.2.0.0", - "Date", - "Fri, 05 Apr 2019 16:48:27 GMT" - ] - }, - { - "scope": "https://localhost:8081", - "method": "GET", - "path": "/dbs/test-db/colls/bot-storage", - "body": "", - "status": 200, - "response": { - "id": "bot-storage", - "indexingPolicy": { - "indexingMode": "consistent", - "automatic": true, - "includedPaths": [ - { - "path": "/*", - "indexes": [ - { - "kind": "Range", - "dataType": "Number", - "precision": -1 - }, - { - "kind": "Range", - "dataType": "String", - "precision": -1 - }, - { - "kind": "Spatial", - "dataType": "Point" - } - ] - } - ], - "excludedPaths": [ - { - "path": "/\"_etag\"/?" - } - ] - }, - "partitionKey": { - "paths": [ - "/document/Location" - ], - "kind": "Hash" - }, - "_rid": "eLtDAL-3CAk=", - "_ts": 1554475922, - "_self": "dbs/eLtDAA==/colls/eLtDAL-3CAk=/", - "_etag": "\"00000000-0000-0000-ebbf-21301dee01d4\"", - "_docs": "docs/", - "_sprocs": "sprocs/", - "_triggers": "triggers/", - "_udfs": "udfs/", - "_conflicts": "conflicts/" - }, - "rawHeaders": [ - "Cache-Control", - "no-store, no-cache", - "Pragma", - "no-cache", - "Transfer-Encoding", - "chunked", - "Content-Type", - "application/json", - "Content-Location", - "https://127.0.0.1:8081/dbs/test-db/colls/bot-storage", - "Server", - "Microsoft-HTTPAPI/2.0", - "Access-Control-Allow-Origin", - "", - "Access-Control-Allow-Credentials", - "true", - "x-ms-last-state-change-utc", - "Fri, 29 Mar 2019 04:36:23.731 GMT", - "etag", - "\"00000000-0000-0000-ebbf-21301dee01d4\"", - "collection-partition-index", - "0", - "collection-service-index", - "0", - "lsn", - "1", - "x-ms-schemaversion", - "1.7", - "x-ms-alt-content-path", - "dbs/test-db", - "x-ms-content-path", - "eLtDAA==", - "x-ms-quorum-acked-lsn", - "1", - "x-ms-current-write-quorum", - "1", - "x-ms-current-replica-set-size", - "1", - "x-ms-xp-role", - "0", - "x-ms-global-Committed-lsn", - "-1", - "x-ms-number-of-read-regions", - "0", - "x-ms-item-lsn", - "1", - "x-ms-transport-request-id", - "763", - "x-ms-cosmos-llsn", - "1", - "x-ms-cosmos-quorum-acked-llsn", - "1", - "x-ms-cosmos-item-llsn", - "1", - "x-ms-session-token", - "1:1", - "x-ms-request-charge", - "1", - "x-ms-serviceversion", - "version=2.2.0.0", - "x-ms-activity-id", - "9bfb9c45-2031-4242-90a2-0ea299d872d1", - "x-ms-gatewayversion", - "version=2.2.0.0", - "Date", - "Fri, 05 Apr 2019 16:48:27 GMT" - ] - }, - { - "scope": "https://localhost:8081", - "method": "POST", - "path": "/dbs/test-db/colls/bot-storage/docs", - "body": { - "id": "001", - "realId": "001", - "document": { - "Location": "ARG", - "MessageList": [ - "Hi", - "how are u" - ] - } - }, - "status": 200, - "response": { - "id": "001", - "realId": "001", - "document": { - "Location": "ARG", - "MessageList": [ - "Hi", - "how are u" - ] - }, - "_rid": "eLtDAL-3CAkpAAAAAAAAAA==", - "_self": "dbs/eLtDAA==/colls/eLtDAL-3CAk=/docs/eLtDAL-3CAkpAAAAAAAAAA==/", - "_etag": "\"00000000-0000-0000-ebcf-6492109601d4\"", - "_attachments": "attachments/", - "_ts": 1554482907 - }, - "rawHeaders": [ - "Cache-Control", - "no-store, no-cache", - "Pragma", - "no-cache", - "Transfer-Encoding", - "chunked", - "Content-Type", - "application/json", - "Server", - "Microsoft-HTTPAPI/2.0", - "Access-Control-Allow-Origin", - "", - "Access-Control-Allow-Credentials", - "true", - "x-ms-last-state-change-utc", - "Fri, 29 Mar 2019 04:36:22.337 GMT", - "etag", - "\"00000000-0000-0000-ebcf-6492109601d4\"", - "x-ms-resource-quota", - "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", - "x-ms-resource-usage", - "documentSize=0;documentsSize=0;documentsCount=1;collectionSize=0;", - "lsn", - "507", - "x-ms-schemaversion", - "1.7", - "x-ms-alt-content-path", - "dbs/test-db/colls/bot-storage", - "x-ms-content-path", - "eLtDAL-3CAk=", - "x-ms-quorum-acked-lsn", - "506", - "x-ms-current-write-quorum", - "1", - "x-ms-current-replica-set-size", - "1", - "x-ms-xp-role", - "0", - "x-ms-global-Committed-lsn", - "-1", - "x-ms-number-of-read-regions", - "0", - "x-ms-transport-request-id", - "764", - "x-ms-cosmos-llsn", - "507", - "x-ms-cosmos-quorum-acked-llsn", - "506", - "x-ms-session-token", - "0:507", - "x-ms-request-charge", - "10.29", - "x-ms-serviceversion", - "version=2.2.0.0", - "x-ms-activity-id", - "86d7806d-a5d1-44b8-a796-fd33f316c267", - "x-ms-gatewayversion", - "version=2.2.0.0", - "Date", - "Fri, 05 Apr 2019 16:48:27 GMT" - ] - }, - { - "scope": "https://localhost:8081", - "method": "DELETE", - "path": "/dbs/test-db/colls/bot-storage/docs/001", - "body": "", - "status": 204, - "response": "", - "rawHeaders": [ - "Cache-Control", - "no-store, no-cache", - "Pragma", - "no-cache", - "Content-Length", - "0", - "Content-Type", - "application/json", - "Content-Location", - "https://127.0.0.1:8081/dbs/test-db/colls/bot-storage/docs/001", - "Server", - "Microsoft-HTTPAPI/2.0", - "Access-Control-Allow-Origin", - "", - "Access-Control-Allow-Credentials", - "true", - "x-ms-last-state-change-utc", - "Fri, 29 Mar 2019 04:36:22.337 GMT", - "x-ms-resource-quota", - "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", - "x-ms-resource-usage", - "documentSize=0;documentsSize=0;documentsCount=1;collectionSize=0;", - "lsn", - "508", - "x-ms-schemaversion", - "1.7", - "x-ms-alt-content-path", - "dbs/test-db/colls/bot-storage", - "x-ms-content-path", - "eLtDAL-3CAk=", - "x-ms-quorum-acked-lsn", - "507", - "x-ms-current-write-quorum", - "1", - "x-ms-current-replica-set-size", - "1", - "x-ms-xp-role", - "0", - "x-ms-global-Committed-lsn", - "-1", - "x-ms-number-of-read-regions", - "0", - "x-ms-transport-request-id", - "765", - "x-ms-cosmos-llsn", - "508", - "x-ms-cosmos-quorum-acked-llsn", - "507", - "x-ms-session-token", - "0:508", - "x-ms-request-charge", - "7.24", - "x-ms-serviceversion", - "version=2.2.0.0", - "x-ms-activity-id", - "651cc522-92e0-4105-ab66-4ec5a3820b73", - "x-ms-gatewayversion", - "version=2.2.0.0", - "Date", - "Fri, 05 Apr 2019 16:48:27 GMT" - ] - }, - { - "scope": "https://localhost:8081", - "method": "POST", - "path": "/dbs/eLtDAA==/colls/eLtDAL-3CAk=/docs/", - "body": { - "query": "SELECT c.id, c.realId, c.document, c._etag FROM c WHERE c.id in (@id0)", - "parameters": [ - { - "name": "@id0", - "value": "001" - } - ] - }, - "status": 200, - "response": { - "_rid": "eLtDAL-3CAk=", - "Documents": [], - "_count": 0 - }, - "rawHeaders": [ - "Cache-Control", - "no-store, no-cache", - "Pragma", - "no-cache", - "Transfer-Encoding", - "chunked", - "Content-Type", - "application/json", - "Server", - "Microsoft-HTTPAPI/2.0", - "Access-Control-Allow-Origin", - "", - "Access-Control-Allow-Credentials", - "true", - "x-ms-last-state-change-utc", - "Fri, 29 Mar 2019 04:36:22.337 GMT", - "x-ms-resource-quota", - "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", - "x-ms-resource-usage", - "documentSize=0;documentsSize=0;documentsCount=0;collectionSize=0;", - "lsn", - "508", - "x-ms-item-count", - "0", - "x-ms-schemaversion", - "1.7", - "x-ms-alt-content-path", - "dbs/test-db/colls/bot-storage", - "x-ms-quorum-acked-lsn", - "508", - "x-ms-current-write-quorum", - "1", - "x-ms-current-replica-set-size", - "1", - "x-ms-xp-role", - "0", - "x-ms-global-Committed-lsn", - "-1", - "x-ms-number-of-read-regions", - "0", - "x-ms-transport-request-id", - "766", - "x-ms-cosmos-llsn", - "508", - "x-ms-cosmos-quorum-acked-llsn", - "508", - "x-ms-session-token", - "0:508", - "x-ms-request-charge", - "2.86", - "x-ms-serviceversion", - "version=2.2.0.0", - "x-ms-activity-id", - "4d5dec05-98b3-4f48-9c22-9383ff177ead", - "x-ms-gatewayversion", - "version=2.2.0.0", - "Date", - "Fri, 05 Apr 2019 16:48:27 GMT" - ] - } -] \ No newline at end of file diff --git a/libraries/botbuilder-azure/tests/TestData/CosmosDbStorage/delete_without_partition_key.json b/libraries/botbuilder-azure/tests/TestData/CosmosDbStorage/delete_without_partition_key.json deleted file mode 100644 index 3c7d28a880..0000000000 --- a/libraries/botbuilder-azure/tests/TestData/CosmosDbStorage/delete_without_partition_key.json +++ /dev/null @@ -1,497 +0,0 @@ -[ - { - "scope": "https://localhost:8081", - "method": "GET", - "path": "/", - "body": "", - "status": 200, - "response": { - "_self": "", - "id": "localhost", - "_rid": "localhost", - "media": "//media/", - "addresses": "//addresses/", - "_dbs": "//dbs/", - "writableLocations": [ - { - "name": "South Central US", - "databaseAccountEndpoint": "https://127.0.0.1:8081/" - } - ], - "readableLocations": [ - { - "name": "South Central US", - "databaseAccountEndpoint": "https://127.0.0.1:8081/" - } - ], - "userReplicationPolicy": { - "asyncReplication": false, - "minReplicaSetSize": 1, - "maxReplicasetSize": 4 - }, - "userConsistencyPolicy": { - "defaultConsistencyLevel": "Session" - }, - "systemReplicationPolicy": { - "minReplicaSetSize": 1, - "maxReplicasetSize": 4 - }, - "readPolicy": { - "primaryReadCoefficient": 1, - "secondaryReadCoefficient": 1 - }, - "queryEngineConfiguration": "{\"maxSqlQueryInputLength\":262144,\"maxJoinsPerSqlQuery\":5,\"maxLogicalAndPerSqlQuery\":500,\"maxLogicalOrPerSqlQuery\":500,\"maxUdfRefPerSqlQuery\":10,\"maxInExpressionItemsCount\":16000,\"queryMaxInMemorySortDocumentCount\":500,\"maxQueryRequestTimeoutFraction\":0.9,\"sqlAllowNonFiniteNumbers\":false,\"sqlAllowAggregateFunctions\":true,\"sqlAllowSubQuery\":true,\"sqlAllowScalarSubQuery\":true,\"allowNewKeywords\":true,\"sqlAllowLike\":false,\"sqlAllowGroupByClause\":false,\"maxSpatialQueryCells\":12,\"spatialMaxGeometryPointCount\":256,\"sqlAllowTop\":true,\"enableSpatialIndexing\":true}" - }, - "rawHeaders": [ - "Cache-Control", - "no-store, no-cache", - "Pragma", - "no-cache", - "Transfer-Encoding", - "chunked", - "Content-Type", - "application/json", - "Content-Location", - "https://localhost:8081/", - "Server", - "Microsoft-HTTPAPI/2.0", - "Access-Control-Allow-Origin", - "", - "Access-Control-Allow-Credentials", - "true", - "x-ms-max-media-storage-usage-mb", - "10240", - "x-ms-media-storage-usage-mb", - "0", - "x-ms-databaseaccount-consumed-mb", - "0", - "x-ms-databaseaccount-reserved-mb", - "0", - "x-ms-databaseaccount-provisioned-mb", - "0", - "x-ms-gatewayversion", - "version=2.2.0.0", - "Date", - "Fri, 05 Apr 2019 16:48:27 GMT" - ] - }, - { - "scope": "https://localhost:8081", - "method": "POST", - "path": "/dbs", - "body": { - "query": "SELECT r._self FROM root r WHERE r.id = @id", - "parameters": [ - { - "name": "@id", - "value": "test-db" - } - ] - }, - "status": 200, - "response": { - "_rid": "", - "Databases": [ - { - "_self": "dbs/eLtDAA==/" - } - ], - "_count": 1 - }, - "rawHeaders": [ - "Cache-Control", - "no-store, no-cache", - "Pragma", - "no-cache", - "Transfer-Encoding", - "chunked", - "Content-Type", - "application/json", - "Server", - "Microsoft-HTTPAPI/2.0", - "Access-Control-Allow-Origin", - "", - "Access-Control-Allow-Credentials", - "true", - "x-ms-last-state-change-utc", - "Fri, 29 Mar 2019 04:36:17.258 GMT", - "x-ms-resource-quota", - "databases=100;", - "x-ms-resource-usage", - "databases=2;", - "lsn", - "533", - "x-ms-item-count", - "1", - "x-ms-schemaversion", - "1.7", - "x-ms-quorum-acked-lsn", - "533", - "x-ms-current-write-quorum", - "1", - "x-ms-current-replica-set-size", - "1", - "x-ms-xp-role", - "0", - "x-ms-global-Committed-lsn", - "-1", - "x-ms-number-of-read-regions", - "0", - "x-ms-transport-request-id", - "2746", - "x-ms-cosmos-llsn", - "533", - "x-ms-cosmos-quorum-acked-llsn", - "533", - "x-ms-session-token", - "0:533", - "x-ms-request-charge", - "5.66", - "x-ms-serviceversion", - "version=2.2.0.0", - "x-ms-activity-id", - "d75da1bc-7956-45c1-ad01-ca8114710192", - "x-ms-gatewayversion", - "version=2.2.0.0", - "Date", - "Fri, 05 Apr 2019 16:48:27 GMT" - ] - }, - { - "scope": "https://localhost:8081", - "method": "POST", - "path": "/dbs/eLtDAA==/colls/", - "body": { - "query": "SELECT r._self FROM root r WHERE r.id=@id", - "parameters": [ - { - "name": "@id", - "value": "bot-storage" - } - ] - }, - "status": 200, - "response": { - "_rid": "eLtDAA==", - "DocumentCollections": [ - { - "_self": "dbs/eLtDAA==/colls/eLtDAL-3CAk=/" - } - ], - "_count": 1 - }, - "rawHeaders": [ - "Cache-Control", - "no-store, no-cache", - "Pragma", - "no-cache", - "Transfer-Encoding", - "chunked", - "Content-Type", - "application/json", - "Server", - "Microsoft-HTTPAPI/2.0", - "Access-Control-Allow-Origin", - "", - "Access-Control-Allow-Credentials", - "true", - "x-ms-last-state-change-utc", - "Fri, 29 Mar 2019 04:36:17.258 GMT", - "x-ms-resource-quota", - "collections=5000;", - "x-ms-resource-usage", - "collections=2;", - "collection-partition-index", - "0", - "collection-service-index", - "0", - "lsn", - "533", - "x-ms-item-count", - "1", - "x-ms-schemaversion", - "1.7", - "x-ms-alt-content-path", - "dbs/test-db", - "x-ms-quorum-acked-lsn", - "533", - "x-ms-current-write-quorum", - "1", - "x-ms-current-replica-set-size", - "1", - "x-ms-xp-role", - "0", - "x-ms-global-Committed-lsn", - "-1", - "x-ms-number-of-read-regions", - "0", - "x-ms-transport-request-id", - "2748", - "x-ms-cosmos-llsn", - "533", - "x-ms-cosmos-quorum-acked-llsn", - "533", - "x-ms-session-token", - "0:533", - "x-ms-request-charge", - "5.66", - "x-ms-serviceversion", - "version=2.2.0.0", - "x-ms-activity-id", - "5a2d750a-3751-4516-a672-f97fedb4f7a5", - "x-ms-gatewayversion", - "version=2.2.0.0", - "Date", - "Fri, 05 Apr 2019 16:48:27 GMT" - ] - }, - { - "scope": "https://localhost:8081", - "method": "GET", - "path": "/dbs/test-db/colls/bot-storage", - "body": "", - "status": 200, - "response": { - "id": "bot-storage", - "indexingPolicy": { - "indexingMode": "consistent", - "automatic": true, - "includedPaths": [ - { - "path": "/*", - "indexes": [ - { - "kind": "Range", - "dataType": "Number", - "precision": -1 - }, - { - "kind": "Range", - "dataType": "String", - "precision": -1 - }, - { - "kind": "Spatial", - "dataType": "Point" - } - ] - } - ], - "excludedPaths": [ - { - "path": "/\"_etag\"/?" - } - ] - }, - "partitionKey": { - "paths": [ - "/document/Location" - ], - "kind": "Hash" - }, - "_rid": "eLtDAL-3CAk=", - "_ts": 1554475922, - "_self": "dbs/eLtDAA==/colls/eLtDAL-3CAk=/", - "_etag": "\"00000000-0000-0000-ebbf-21301dee01d4\"", - "_docs": "docs/", - "_sprocs": "sprocs/", - "_triggers": "triggers/", - "_udfs": "udfs/", - "_conflicts": "conflicts/" - }, - "rawHeaders": [ - "Cache-Control", - "no-store, no-cache", - "Pragma", - "no-cache", - "Transfer-Encoding", - "chunked", - "Content-Type", - "application/json", - "Content-Location", - "https://127.0.0.1:8081/dbs/test-db/colls/bot-storage", - "Server", - "Microsoft-HTTPAPI/2.0", - "Access-Control-Allow-Origin", - "", - "Access-Control-Allow-Credentials", - "true", - "x-ms-last-state-change-utc", - "Fri, 29 Mar 2019 04:36:23.731 GMT", - "etag", - "\"00000000-0000-0000-ebbf-21301dee01d4\"", - "collection-partition-index", - "0", - "collection-service-index", - "0", - "lsn", - "1", - "x-ms-schemaversion", - "1.7", - "x-ms-alt-content-path", - "dbs/test-db", - "x-ms-content-path", - "eLtDAA==", - "x-ms-quorum-acked-lsn", - "1", - "x-ms-current-write-quorum", - "1", - "x-ms-current-replica-set-size", - "1", - "x-ms-xp-role", - "0", - "x-ms-global-Committed-lsn", - "-1", - "x-ms-number-of-read-regions", - "0", - "x-ms-item-lsn", - "1", - "x-ms-transport-request-id", - "767", - "x-ms-cosmos-llsn", - "1", - "x-ms-cosmos-quorum-acked-llsn", - "1", - "x-ms-cosmos-item-llsn", - "1", - "x-ms-session-token", - "1:1", - "x-ms-request-charge", - "1", - "x-ms-serviceversion", - "version=2.2.0.0", - "x-ms-activity-id", - "c17857b4-3988-4863-8ee9-b76d21a0b725", - "x-ms-gatewayversion", - "version=2.2.0.0", - "Date", - "Fri, 05 Apr 2019 16:48:27 GMT" - ] - }, - { - "scope": "https://localhost:8081", - "method": "POST", - "path": "/dbs/test-db/colls/bot-storage/docs", - "body": { - "id": "001", - "realId": "001", - "document": { - "Location": "ARG", - "MessageList": [ - "Hi", - "how are u" - ] - } - }, - "status": 201, - "response": { - "id": "001", - "realId": "001", - "document": { - "Location": "ARG", - "MessageList": [ - "Hi", - "how are u" - ] - }, - "_rid": "eLtDAL-3CAkqAAAAAAAAAA==", - "_self": "dbs/eLtDAA==/colls/eLtDAL-3CAk=/docs/eLtDAL-3CAkqAAAAAAAAAA==/", - "_etag": "\"00000000-0000-0000-ebcf-649ab89001d4\"", - "_attachments": "attachments/", - "_ts": 1554482907 - }, - "rawHeaders": [ - "Cache-Control", - "no-store, no-cache", - "Pragma", - "no-cache", - "Transfer-Encoding", - "chunked", - "Content-Type", - "application/json", - "Server", - "Microsoft-HTTPAPI/2.0", - "Access-Control-Allow-Origin", - "", - "Access-Control-Allow-Credentials", - "true", - "x-ms-last-state-change-utc", - "Fri, 29 Mar 2019 04:36:22.337 GMT", - "etag", - "\"00000000-0000-0000-ebcf-649ab89001d4\"", - "x-ms-resource-quota", - "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", - "x-ms-resource-usage", - "documentSize=0;documentsSize=1;documentsCount=0;collectionSize=1;", - "lsn", - "509", - "x-ms-schemaversion", - "1.7", - "x-ms-alt-content-path", - "dbs/test-db/colls/bot-storage", - "x-ms-content-path", - "eLtDAL-3CAk=", - "x-ms-quorum-acked-lsn", - "508", - "x-ms-current-write-quorum", - "1", - "x-ms-current-replica-set-size", - "1", - "x-ms-xp-role", - "0", - "x-ms-global-Committed-lsn", - "-1", - "x-ms-number-of-read-regions", - "0", - "x-ms-transport-request-id", - "768", - "x-ms-cosmos-llsn", - "509", - "x-ms-cosmos-quorum-acked-llsn", - "508", - "x-ms-session-token", - "0:509", - "x-ms-request-charge", - "7.24", - "x-ms-serviceversion", - "version=2.2.0.0", - "x-ms-activity-id", - "680199f9-83e7-405c-984c-ccde27ad993b", - "x-ms-gatewayversion", - "version=2.2.0.0", - "Date", - "Fri, 05 Apr 2019 16:48:27 GMT" - ] - }, - { - "scope": "https://localhost:8081", - "method": "DELETE", - "path": "/dbs/test-db/colls/bot-storage/docs/001", - "body": "", - "status": 400, - "response": { - "code": "BadRequest", - "message": "PartitionKey value must be supplied for this operation.\r\nActivityId: 547c6bcc-56cb-4c8c-9566-5ce656f4d517, \r\nRequestStartTime: 2019-04-05T16:48:27.9245303Z, RequestEndTime: 2019-04-05T16:48:27.9245303Z, Number of regions attempted: 1\r\n, Microsoft.Azure.Documents.Common/2.2.0.0" - }, - "rawHeaders": [ - "Transfer-Encoding", - "chunked", - "Content-Type", - "application/json", - "Content-Location", - "https://127.0.0.1:8081/dbs/test-db/colls/bot-storage/docs/001", - "Server", - "Microsoft-HTTPAPI/2.0", - "Access-Control-Allow-Origin", - "", - "Access-Control-Allow-Credentials", - "true", - "x-ms-activity-id", - "547c6bcc-56cb-4c8c-9566-5ce656f4d517", - "x-ms-gatewayversion", - "version=2.2.0.0", - "Date", - "Fri, 05 Apr 2019 16:48:27 GMT" - ] - } -] \ No newline at end of file diff --git a/libraries/botbuilder-azure/tests/TestData/CosmosDbStorage/invalid_eTag.json b/libraries/botbuilder-azure/tests/TestData/CosmosDbStorage/invalid_eTag.json deleted file mode 100644 index 8f1724b6eb..0000000000 --- a/libraries/botbuilder-azure/tests/TestData/CosmosDbStorage/invalid_eTag.json +++ /dev/null @@ -1,663 +0,0 @@ -[ - { - "scope": "https://localhost:8081", - "method": "GET", - "path": "/", - "body": "", - "status": 200, - "response": { - "_self": "", - "id": "localhost", - "_rid": "localhost", - "media": "//media/", - "addresses": "//addresses/", - "_dbs": "//dbs/", - "writableLocations": [ - { - "name": "South Central US", - "databaseAccountEndpoint": "https://127.0.0.1:8081/" - } - ], - "readableLocations": [ - { - "name": "South Central US", - "databaseAccountEndpoint": "https://127.0.0.1:8081/" - } - ], - "userReplicationPolicy": { - "asyncReplication": false, - "minReplicaSetSize": 1, - "maxReplicasetSize": 4 - }, - "userConsistencyPolicy": { - "defaultConsistencyLevel": "Session" - }, - "systemReplicationPolicy": { - "minReplicaSetSize": 1, - "maxReplicasetSize": 4 - }, - "readPolicy": { - "primaryReadCoefficient": 1, - "secondaryReadCoefficient": 1 - }, - "queryEngineConfiguration": "{\"maxSqlQueryInputLength\":262144,\"maxJoinsPerSqlQuery\":5,\"maxLogicalAndPerSqlQuery\":500,\"maxLogicalOrPerSqlQuery\":500,\"maxUdfRefPerSqlQuery\":10,\"maxInExpressionItemsCount\":16000,\"queryMaxInMemorySortDocumentCount\":500,\"maxQueryRequestTimeoutFraction\":0.9,\"sqlAllowNonFiniteNumbers\":false,\"sqlAllowAggregateFunctions\":true,\"sqlAllowSubQuery\":true,\"sqlAllowScalarSubQuery\":true,\"allowNewKeywords\":true,\"sqlAllowLike\":false,\"maxSpatialQueryCells\":12,\"spatialMaxGeometryPointCount\":256,\"sqlAllowTop\":true,\"enableSpatialIndexing\":true}" - }, - "rawHeaders": [ - "Cache-Control", - "no-store, no-cache", - "Pragma", - "no-cache", - "Transfer-Encoding", - "chunked", - "Content-Type", - "application/json", - "Content-Location", - "https://localhost:8081/", - "Server", - "Microsoft-HTTPAPI/2.0", - "x-ms-max-media-storage-usage-mb", - "10240", - "x-ms-media-storage-usage-mb", - "0", - "x-ms-databaseaccount-consumed-mb", - "0", - "x-ms-databaseaccount-reserved-mb", - "0", - "x-ms-databaseaccount-provisioned-mb", - "0", - "x-ms-gatewayversion", - "version=2.0.0.0", - "Date", - "Thu, 25 Oct 2018 20:14:43 GMT" - ] - }, - { - "scope": "https://localhost:8081", - "method": "POST", - "path": "/dbs", - "body": { - "query": "SELECT r._self FROM root r WHERE r.id = @id", - "parameters": [ - { - "name": "@id", - "value": "test-db" - } - ] - }, - "status": 200, - "response": { - "_rid": "", - "Databases": [ - { - "_self": "dbs/A7V-AA==/" - } - ], - "_count": 1 - }, - "rawHeaders": [ - "Cache-Control", - "no-store, no-cache", - "Pragma", - "no-cache", - "Transfer-Encoding", - "chunked", - "Content-Type", - "application/json", - "Server", - "Microsoft-HTTPAPI/2.0", - "x-ms-last-state-change-utc", - "Thu, 25 Oct 2018 20:14:00.991 GMT", - "x-ms-resource-quota", - "databases=100;", - "x-ms-resource-usage", - "databases=1;", - "lsn", - "79", - "x-ms-item-count", - "1", - "x-ms-schemaversion", - "1.6", - "x-ms-quorum-acked-lsn", - "79", - "x-ms-current-write-quorum", - "1", - "x-ms-current-replica-set-size", - "1", - "x-ms-xp-role", - "0", - "x-ms-global-Committed-lsn", - "-1", - "x-ms-number-of-read-regions", - "0", - "x-ms-transport-request-id", - "55", - "x-ms-cosmos-llsn", - "79", - "x-ms-cosmos-quorum-acked-llsn", - "79", - "x-ms-session-token", - "0:79", - "x-ms-request-charge", - "4.48", - "x-ms-serviceversion", - "version=2.0.0.0", - "x-ms-activity-id", - "a2b3807e-f28b-4301-a79a-b088883e8f56", - "x-ms-gatewayversion", - "version=2.0.0.0", - "Date", - "Thu, 25 Oct 2018 20:14:43 GMT" - ] - }, - { - "scope": "https://localhost:8081", - "method": "POST", - "path": "/dbs/A7V-AA==/colls/", - "body": { - "query": "SELECT r._self FROM root r WHERE r.id=@id", - "parameters": [ - { - "name": "@id", - "value": "bot-storage" - } - ] - }, - "status": 200, - "response": { - "_rid": "A7V-AA==", - "DocumentCollections": [ - { - "_self": "dbs/A7V-AA==/colls/A7V-AIqw5hc=/" - } - ], - "_count": 1 - }, - "rawHeaders": [ - "Cache-Control", - "no-store, no-cache", - "Pragma", - "no-cache", - "Transfer-Encoding", - "chunked", - "Content-Type", - "application/json", - "Server", - "Microsoft-HTTPAPI/2.0", - "x-ms-last-state-change-utc", - "Thu, 25 Oct 2018 20:14:00.991 GMT", - "x-ms-resource-quota", - "collections=5000;", - "x-ms-resource-usage", - "collections=1;", - "collection-partition-index", - "0", - "collection-service-index", - "0", - "lsn", - "79", - "x-ms-item-count", - "1", - "x-ms-schemaversion", - "1.6", - "x-ms-alt-content-path", - "dbs/test-db", - "x-ms-quorum-acked-lsn", - "79", - "x-ms-current-write-quorum", - "1", - "x-ms-current-replica-set-size", - "1", - "x-ms-xp-role", - "0", - "x-ms-global-Committed-lsn", - "-1", - "x-ms-number-of-read-regions", - "0", - "x-ms-transport-request-id", - "57", - "x-ms-cosmos-llsn", - "79", - "x-ms-cosmos-quorum-acked-llsn", - "79", - "x-ms-session-token", - "0:79", - "x-ms-request-charge", - "4.5", - "x-ms-serviceversion", - "version=2.0.0.0", - "x-ms-activity-id", - "3ecb3cee-4e74-4154-a9b0-ab7c1c348074", - "x-ms-gatewayversion", - "version=2.0.0.0", - "Date", - "Thu, 25 Oct 2018 20:14:43 GMT" - ] - }, - { - "scope": "https://localhost:8081", - "method": "GET", - "path": "/dbs/test-db/colls/bot-storage", - "body": "", - "status": 200, - "response": { - "id": "bot-storage", - "indexingPolicy": { - "indexingMode": "consistent", - "automatic": true, - "includedPaths": [ - { - "path": "/*", - "indexes": [ - { - "kind": "Range", - "dataType": "Number", - "precision": -1 - }, - { - "kind": "Hash", - "dataType": "String", - "precision": 3 - } - ] - } - ], - "excludedPaths": [] - }, - "_rid": "A7V-AIqw5hc=", - "_ts": 1540498482, - "_self": "dbs/A7V-AA==/colls/A7V-AIqw5hc=/", - "_etag": "\"00000000-0000-0000-6c9f-5d9f009a01d4\"", - "_docs": "docs/", - "_sprocs": "sprocs/", - "_triggers": "triggers/", - "_udfs": "udfs/", - "_conflicts": "conflicts/" - }, - "rawHeaders": [ - "Cache-Control", - "no-store, no-cache", - "Pragma", - "no-cache", - "Transfer-Encoding", - "chunked", - "Content-Type", - "application/json", - "Content-Location", - "https://127.0.0.1:8081/dbs/test-db/colls/bot-storage", - "Server", - "Microsoft-HTTPAPI/2.0", - "x-ms-last-state-change-utc", - "Thu, 25 Oct 2018 20:14:08.836 GMT", - "etag", - "\"00000000-0000-0000-6c9f-5d9f009a01d4\"", - "x-ms-resource-quota", - "functions=25;storedProcedures=100;triggers=25;documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", - "x-ms-resource-usage", - "functions=0;storedProcedures=0;triggers=0;documentSize=0;documentsSize=2;documentsCount=2;collectionSize=2;", - "collection-partition-index", - "0", - "collection-service-index", - "0", - "lsn", - "237", - "x-ms-schemaversion", - "1.6", - "x-ms-alt-content-path", - "dbs/test-db", - "x-ms-content-path", - "A7V-AA==", - "x-ms-quorum-acked-lsn", - "237", - "x-ms-documentdb-collection-index-transformation-progress", - "100", - "x-ms-current-write-quorum", - "1", - "x-ms-current-replica-set-size", - "1", - "x-ms-xp-role", - "0", - "x-ms-global-Committed-lsn", - "-1", - "x-ms-number-of-read-regions", - "0", - "x-ms-item-lsn", - "234", - "x-ms-transport-request-id", - "22", - "x-ms-cosmos-llsn", - "237", - "x-ms-cosmos-quorum-acked-llsn", - "237", - "x-ms-cosmos-item-llsn", - "234", - "x-ms-session-token", - "0:237", - "x-ms-request-charge", - "1", - "x-ms-serviceversion", - "version=2.0.0.0", - "x-ms-activity-id", - "63265783-d923-48d2-9029-8fbfe665dbf7", - "x-ms-gatewayversion", - "version=2.0.0.0", - "Date", - "Thu, 25 Oct 2018 20:14:43 GMT" - ] - }, - { - "scope": "https://localhost:8081", - "method": "POST", - "path": "/dbs/test-db/colls/bot-storage/docs", - "body": { - "id": "keyUpdate2", - "realId": "keyUpdate2", - "document": { - "count": 1 - } - }, - "status": 201, - "response": { - "id": "keyUpdate2", - "realId": "keyUpdate2", - "document": { - "count": 1 - }, - "_rid": "A7V-AIqw5hcDAAAAAAAAAA==", - "_self": "dbs/A7V-AA==/colls/A7V-AIqw5hc=/docs/A7V-AIqw5hcDAAAAAAAAAA==/", - "_etag": "\"00000000-0000-0000-6c9f-5e44fa5201d4\"", - "_attachments": "attachments/", - "_ts": 1540498483 - }, - "rawHeaders": [ - "Cache-Control", - "no-store, no-cache", - "Pragma", - "no-cache", - "Transfer-Encoding", - "chunked", - "Content-Type", - "application/json", - "Server", - "Microsoft-HTTPAPI/2.0", - "x-ms-last-state-change-utc", - "Thu, 25 Oct 2018 20:14:08.836 GMT", - "etag", - "\"00000000-0000-0000-6c9f-5e44fa5201d4\"", - "x-ms-resource-quota", - "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", - "x-ms-resource-usage", - "documentSize=0;documentsSize=2;documentsCount=2;collectionSize=3;", - "lsn", - "238", - "x-ms-schemaversion", - "1.6", - "x-ms-alt-content-path", - "dbs/test-db/colls/bot-storage", - "x-ms-content-path", - "A7V-AIqw5hc=", - "x-ms-quorum-acked-lsn", - "237", - "x-ms-current-write-quorum", - "1", - "x-ms-current-replica-set-size", - "1", - "x-ms-xp-role", - "0", - "x-ms-global-Committed-lsn", - "-1", - "x-ms-number-of-read-regions", - "0", - "x-ms-transport-request-id", - "27", - "x-ms-cosmos-llsn", - "238", - "x-ms-cosmos-quorum-acked-llsn", - "237", - "x-ms-session-token", - "0:238", - "x-ms-request-charge", - "5.9", - "x-ms-serviceversion", - "version=2.0.0.0", - "x-ms-activity-id", - "dc1255ec-fc9d-4fa0-8503-aa2cbd5381ae", - "x-ms-gatewayversion", - "version=2.0.0.0", - "Date", - "Thu, 25 Oct 2018 20:14:43 GMT" - ] - }, - { - "scope": "https://localhost:8081", - "method": "POST", - "path": "/dbs/A7V-AA==/colls/A7V-AIqw5hc=/docs/", - "body": { - "query": "SELECT c.id, c.realId, c.document, c._etag FROM c WHERE c.id in (@id0)", - "parameters": [ - { - "name": "@id0", - "value": "keyUpdate2" - } - ] - }, - "status": 200, - "response": { - "_rid": "A7V-AIqw5hc=", - "Documents": [ - { - "id": "keyUpdate2", - "realId": "keyUpdate2", - "document": { - "count": 1 - }, - "_etag": "\"00000000-0000-0000-6c9f-5e44fa5201d4\"" - } - ], - "_count": 1 - }, - "rawHeaders": [ - "Cache-Control", - "no-store, no-cache", - "Pragma", - "no-cache", - "Transfer-Encoding", - "chunked", - "Content-Type", - "application/json", - "Server", - "Microsoft-HTTPAPI/2.0", - "x-ms-last-state-change-utc", - "Thu, 25 Oct 2018 20:14:08.836 GMT", - "x-ms-resource-quota", - "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", - "x-ms-resource-usage", - "documentSize=0;documentsSize=2;documentsCount=3;collectionSize=3;", - "lsn", - "238", - "x-ms-item-count", - "1", - "x-ms-schemaversion", - "1.6", - "x-ms-alt-content-path", - "dbs/test-db/colls/bot-storage", - "x-ms-quorum-acked-lsn", - "238", - "x-ms-current-write-quorum", - "1", - "x-ms-current-replica-set-size", - "1", - "x-ms-xp-role", - "0", - "x-ms-global-Committed-lsn", - "-1", - "x-ms-number-of-read-regions", - "0", - "x-ms-transport-request-id", - "28", - "x-ms-cosmos-llsn", - "238", - "x-ms-cosmos-quorum-acked-llsn", - "238", - "x-ms-session-token", - "0:238", - "x-ms-request-charge", - "2.25", - "x-ms-serviceversion", - "version=2.0.0.0", - "x-ms-activity-id", - "357b2ca8-b7d1-4ed4-a3f4-7e2a21cf96a4", - "x-ms-gatewayversion", - "version=2.0.0.0", - "Date", - "Thu, 25 Oct 2018 20:14:43 GMT" - ] - }, - { - "scope": "https://localhost:8081", - "method": "PUT", - "path": "/dbs/test-db/colls/bot-storage/docs/keyUpdate2", - "body": { - "id": "keyUpdate2", - "realId": "keyUpdate2", - "document": { - "count": 2 - } - }, - "status": 200, - "response": { - "id": "keyUpdate2", - "realId": "keyUpdate2", - "document": { - "count": 2 - }, - "_rid": "A7V-AIqw5hcDAAAAAAAAAA==", - "_self": "dbs/A7V-AA==/colls/A7V-AIqw5hc=/docs/A7V-AIqw5hcDAAAAAAAAAA==/", - "_etag": "\"00000000-0000-0000-6c9f-5e47e47a01d4\"", - "_attachments": "attachments/", - "_ts": 1540498483 - }, - "rawHeaders": [ - "Cache-Control", - "no-store, no-cache", - "Pragma", - "no-cache", - "Transfer-Encoding", - "chunked", - "Content-Type", - "application/json", - "Content-Location", - "https://127.0.0.1:8081/dbs/test-db/colls/bot-storage/docs/keyUpdate2", - "Server", - "Microsoft-HTTPAPI/2.0", - "x-ms-last-state-change-utc", - "Thu, 25 Oct 2018 20:14:08.836 GMT", - "etag", - "\"00000000-0000-0000-6c9f-5e47e47a01d4\"", - "x-ms-resource-quota", - "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", - "x-ms-resource-usage", - "documentSize=0;documentsSize=2;documentsCount=3;collectionSize=3;", - "lsn", - "239", - "x-ms-schemaversion", - "1.6", - "x-ms-alt-content-path", - "dbs/test-db/colls/bot-storage", - "x-ms-content-path", - "A7V-AIqw5hc=", - "x-ms-quorum-acked-lsn", - "238", - "x-ms-current-write-quorum", - "1", - "x-ms-current-replica-set-size", - "1", - "x-ms-xp-role", - "0", - "x-ms-global-Committed-lsn", - "-1", - "x-ms-number-of-read-regions", - "0", - "x-ms-transport-request-id", - "29", - "x-ms-cosmos-llsn", - "239", - "x-ms-cosmos-quorum-acked-llsn", - "238", - "x-ms-session-token", - "0:239", - "x-ms-request-charge", - "11.05", - "x-ms-serviceversion", - "version=2.0.0.0", - "x-ms-activity-id", - "4c6a9b49-5f8b-418a-ab58-62f9ae3d4501", - "x-ms-gatewayversion", - "version=2.0.0.0", - "Date", - "Thu, 25 Oct 2018 20:14:43 GMT" - ] - }, - { - "scope": "https://localhost:8081", - "method": "PUT", - "path": "/dbs/test-db/colls/bot-storage/docs/keyUpdate2", - "body": { - "id": "keyUpdate2", - "realId": "keyUpdate2", - "document": { - "count": 3 - } - }, - "status": 412, - "response": { - "code": "PreconditionFailed", - "message": "Message: {\"Errors\":[\"One of the specified pre-condition is not met\"]}\r\nActivityId: 9f2148fa-086c-460f-a52a-bfbeee01bf36, Request URI: /apps/DocDbApp/services/DocDbServer12/partitions/a4cb4958-38c8-11e6-8106-8cdcd42c33be/replicas/1p/, RequestStats: \r\nRequestStartTime: 2018-10-25T20:14:43.8043115Z, Number of regions attempted: 1\r\n, SDK: Microsoft.Azure.Documents.Common/2.0.0.0" - }, - "rawHeaders": [ - "Transfer-Encoding", - "chunked", - "Content-Type", - "application/json", - "Content-Location", - "https://127.0.0.1:8081/dbs/test-db/colls/bot-storage/docs/keyUpdate2", - "Server", - "Microsoft-HTTPAPI/2.0", - "x-ms-last-state-change-utc", - "Thu, 25 Oct 2018 20:14:08.836 GMT", - "lsn", - "239", - "x-ms-schemaversion", - "1.6", - "x-ms-quorum-acked-lsn", - "239", - "x-ms-current-write-quorum", - "1", - "x-ms-current-replica-set-size", - "1", - "x-ms-xp-role", - "0", - "x-ms-global-Committed-lsn", - "-1", - "x-ms-number-of-read-regions", - "0", - "x-ms-transport-request-id", - "30", - "x-ms-cosmos-llsn", - "239", - "x-ms-cosmos-quorum-acked-llsn", - "239", - "x-ms-session-token", - "0:239", - "x-ms-request-charge", - "1.24", - "x-ms-serviceversion", - "version=2.0.0.0", - "x-ms-activity-id", - "9f2148fa-086c-460f-a52a-bfbeee01bf36", - "x-ms-gatewayversion", - "version=2.0.0.0", - "Date", - "Thu, 25 Oct 2018 20:14:43 GMT" - ] - } -] \ No newline at end of file diff --git a/libraries/botbuilder-azure/tests/TestData/CosmosDbStorage/key_creation.json b/libraries/botbuilder-azure/tests/TestData/CosmosDbStorage/key_creation.json deleted file mode 100644 index 8f1e5c22a2..0000000000 --- a/libraries/botbuilder-azure/tests/TestData/CosmosDbStorage/key_creation.json +++ /dev/null @@ -1,515 +0,0 @@ -[ - { - "scope": "https://localhost:8081", - "method": "GET", - "path": "/", - "body": "", - "status": 200, - "response": { - "_self": "", - "id": "localhost", - "_rid": "localhost", - "media": "//media/", - "addresses": "//addresses/", - "_dbs": "//dbs/", - "writableLocations": [ - { - "name": "South Central US", - "databaseAccountEndpoint": "https://127.0.0.1:8081/" - } - ], - "readableLocations": [ - { - "name": "South Central US", - "databaseAccountEndpoint": "https://127.0.0.1:8081/" - } - ], - "userReplicationPolicy": { - "asyncReplication": false, - "minReplicaSetSize": 1, - "maxReplicasetSize": 4 - }, - "userConsistencyPolicy": { - "defaultConsistencyLevel": "Session" - }, - "systemReplicationPolicy": { - "minReplicaSetSize": 1, - "maxReplicasetSize": 4 - }, - "readPolicy": { - "primaryReadCoefficient": 1, - "secondaryReadCoefficient": 1 - }, - "queryEngineConfiguration": "{\"maxSqlQueryInputLength\":262144,\"maxJoinsPerSqlQuery\":5,\"maxLogicalAndPerSqlQuery\":500,\"maxLogicalOrPerSqlQuery\":500,\"maxUdfRefPerSqlQuery\":10,\"maxInExpressionItemsCount\":16000,\"queryMaxInMemorySortDocumentCount\":500,\"maxQueryRequestTimeoutFraction\":0.9,\"sqlAllowNonFiniteNumbers\":false,\"sqlAllowAggregateFunctions\":true,\"sqlAllowSubQuery\":true,\"sqlAllowScalarSubQuery\":true,\"allowNewKeywords\":true,\"sqlAllowLike\":false,\"maxSpatialQueryCells\":12,\"spatialMaxGeometryPointCount\":256,\"sqlAllowTop\":true,\"enableSpatialIndexing\":true}" - }, - "rawHeaders": [ - "Cache-Control", - "no-store, no-cache", - "Pragma", - "no-cache", - "Transfer-Encoding", - "chunked", - "Content-Type", - "application/json", - "Content-Location", - "https://localhost:8081/", - "Server", - "Microsoft-HTTPAPI/2.0", - "x-ms-max-media-storage-usage-mb", - "10240", - "x-ms-media-storage-usage-mb", - "0", - "x-ms-databaseaccount-consumed-mb", - "0", - "x-ms-databaseaccount-reserved-mb", - "0", - "x-ms-databaseaccount-provisioned-mb", - "0", - "x-ms-gatewayversion", - "version=2.0.0.0", - "Date", - "Thu, 25 Oct 2018 20:14:43 GMT" - ] - }, - { - "scope": "https://localhost:8081", - "method": "POST", - "path": "/dbs", - "body": { - "query": "SELECT r._self FROM root r WHERE r.id = @id", - "parameters": [ - { - "name": "@id", - "value": "test-db" - } - ] - }, - "status": 200, - "response": { - "_rid": "", - "Databases": [ - { - "_self": "dbs/A7V-AA==/" - } - ], - "_count": 1 - }, - "rawHeaders": [ - "Cache-Control", - "no-store, no-cache", - "Pragma", - "no-cache", - "Transfer-Encoding", - "chunked", - "Content-Type", - "application/json", - "Server", - "Microsoft-HTTPAPI/2.0", - "x-ms-last-state-change-utc", - "Thu, 25 Oct 2018 20:14:00.991 GMT", - "x-ms-resource-quota", - "databases=100;", - "x-ms-resource-usage", - "databases=1;", - "lsn", - "79", - "x-ms-item-count", - "1", - "x-ms-schemaversion", - "1.6", - "x-ms-quorum-acked-lsn", - "79", - "x-ms-current-write-quorum", - "1", - "x-ms-current-replica-set-size", - "1", - "x-ms-xp-role", - "0", - "x-ms-global-Committed-lsn", - "-1", - "x-ms-number-of-read-regions", - "0", - "x-ms-transport-request-id", - "45", - "x-ms-cosmos-llsn", - "79", - "x-ms-cosmos-quorum-acked-llsn", - "79", - "x-ms-session-token", - "0:79", - "x-ms-request-charge", - "4.48", - "x-ms-serviceversion", - "version=2.0.0.0", - "x-ms-activity-id", - "f66b1139-47fd-40e4-b2fb-a1ffaecc0e55", - "x-ms-gatewayversion", - "version=2.0.0.0", - "Date", - "Thu, 25 Oct 2018 20:14:43 GMT" - ] - }, - { - "scope": "https://localhost:8081", - "method": "POST", - "path": "/dbs/A7V-AA==/colls/", - "body": { - "query": "SELECT r._self FROM root r WHERE r.id=@id", - "parameters": [ - { - "name": "@id", - "value": "bot-storage" - } - ] - }, - "status": 200, - "response": { - "_rid": "A7V-AA==", - "DocumentCollections": [ - { - "_self": "dbs/A7V-AA==/colls/A7V-AIqw5hc=/" - } - ], - "_count": 1 - }, - "rawHeaders": [ - "Cache-Control", - "no-store, no-cache", - "Pragma", - "no-cache", - "Transfer-Encoding", - "chunked", - "Content-Type", - "application/json", - "Server", - "Microsoft-HTTPAPI/2.0", - "x-ms-last-state-change-utc", - "Thu, 25 Oct 2018 20:14:00.991 GMT", - "x-ms-resource-quota", - "collections=5000;", - "x-ms-resource-usage", - "collections=1;", - "collection-partition-index", - "0", - "collection-service-index", - "0", - "lsn", - "79", - "x-ms-item-count", - "1", - "x-ms-schemaversion", - "1.6", - "x-ms-alt-content-path", - "dbs/test-db", - "x-ms-quorum-acked-lsn", - "79", - "x-ms-current-write-quorum", - "1", - "x-ms-current-replica-set-size", - "1", - "x-ms-xp-role", - "0", - "x-ms-global-Committed-lsn", - "-1", - "x-ms-number-of-read-regions", - "0", - "x-ms-transport-request-id", - "47", - "x-ms-cosmos-llsn", - "79", - "x-ms-cosmos-quorum-acked-llsn", - "79", - "x-ms-session-token", - "0:79", - "x-ms-request-charge", - "4.5", - "x-ms-serviceversion", - "version=2.0.0.0", - "x-ms-activity-id", - "1ab5e6c0-e703-45c2-b48f-efa7590e44d3", - "x-ms-gatewayversion", - "version=2.0.0.0", - "Date", - "Thu, 25 Oct 2018 20:14:43 GMT" - ] - }, - { - "scope": "https://localhost:8081", - "method": "GET", - "path": "/dbs/test-db/colls/bot-storage", - "body": "", - "status": 200, - "response": { - "id": "bot-storage", - "indexingPolicy": { - "indexingMode": "consistent", - "automatic": true, - "includedPaths": [ - { - "path": "/*", - "indexes": [ - { - "kind": "Range", - "dataType": "Number", - "precision": -1 - }, - { - "kind": "Hash", - "dataType": "String", - "precision": 3 - } - ] - } - ], - "excludedPaths": [] - }, - "_rid": "A7V-AIqw5hc=", - "_ts": 1540498482, - "_self": "dbs/A7V-AA==/colls/A7V-AIqw5hc=/", - "_etag": "\"00000000-0000-0000-6c9f-5d9f009a01d4\"", - "_docs": "docs/", - "_sprocs": "sprocs/", - "_triggers": "triggers/", - "_udfs": "udfs/", - "_conflicts": "conflicts/" - }, - "rawHeaders": [ - "Cache-Control", - "no-store, no-cache", - "Pragma", - "no-cache", - "Transfer-Encoding", - "chunked", - "Content-Type", - "application/json", - "Content-Location", - "https://127.0.0.1:8081/dbs/test-db/colls/bot-storage", - "Server", - "Microsoft-HTTPAPI/2.0", - "x-ms-last-state-change-utc", - "Thu, 25 Oct 2018 20:14:08.836 GMT", - "etag", - "\"00000000-0000-0000-6c9f-5d9f009a01d4\"", - "x-ms-resource-quota", - "functions=25;storedProcedures=100;triggers=25;documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", - "x-ms-resource-usage", - "functions=0;storedProcedures=0;triggers=0;documentSize=0;documentsSize=0;documentsCount=0;collectionSize=0;", - "collection-partition-index", - "0", - "collection-service-index", - "0", - "lsn", - "234", - "x-ms-schemaversion", - "1.6", - "x-ms-alt-content-path", - "dbs/test-db", - "x-ms-content-path", - "A7V-AA==", - "x-ms-quorum-acked-lsn", - "234", - "x-ms-documentdb-collection-index-transformation-progress", - "100", - "x-ms-current-write-quorum", - "1", - "x-ms-current-replica-set-size", - "1", - "x-ms-xp-role", - "0", - "x-ms-global-Committed-lsn", - "-1", - "x-ms-number-of-read-regions", - "0", - "x-ms-item-lsn", - "234", - "x-ms-transport-request-id", - "6", - "x-ms-cosmos-llsn", - "234", - "x-ms-cosmos-quorum-acked-llsn", - "234", - "x-ms-cosmos-item-llsn", - "234", - "x-ms-session-token", - "0:234", - "x-ms-request-charge", - "1", - "x-ms-serviceversion", - "version=2.0.0.0", - "x-ms-activity-id", - "8e90b91b-4124-4734-a215-3253873c363d", - "x-ms-gatewayversion", - "version=2.0.0.0", - "Date", - "Thu, 25 Oct 2018 20:14:43 GMT" - ] - }, - { - "scope": "https://localhost:8081", - "method": "POST", - "path": "/dbs/test-db/colls/bot-storage/docs", - "body": { - "id": "keyCreate", - "realId": "keyCreate", - "document": { - "count": 1 - } - }, - "status": 201, - "response": { - "id": "keyCreate", - "realId": "keyCreate", - "document": { - "count": 1 - }, - "_rid": "A7V-AIqw5hcBAAAAAAAAAA==", - "_self": "dbs/A7V-AA==/colls/A7V-AIqw5hc=/docs/A7V-AIqw5hcBAAAAAAAAAA==/", - "_etag": "\"00000000-0000-0000-6c9f-5e29d60401d4\"", - "_attachments": "attachments/", - "_ts": 1540498483 - }, - "rawHeaders": [ - "Cache-Control", - "no-store, no-cache", - "Pragma", - "no-cache", - "Transfer-Encoding", - "chunked", - "Content-Type", - "application/json", - "Server", - "Microsoft-HTTPAPI/2.0", - "x-ms-last-state-change-utc", - "Thu, 25 Oct 2018 20:14:08.836 GMT", - "etag", - "\"00000000-0000-0000-6c9f-5e29d60401d4\"", - "x-ms-resource-quota", - "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", - "x-ms-resource-usage", - "documentSize=0;documentsSize=1;documentsCount=0;collectionSize=1;", - "lsn", - "235", - "x-ms-schemaversion", - "1.6", - "x-ms-alt-content-path", - "dbs/test-db/colls/bot-storage", - "x-ms-content-path", - "A7V-AIqw5hc=", - "x-ms-quorum-acked-lsn", - "234", - "x-ms-current-write-quorum", - "1", - "x-ms-current-replica-set-size", - "1", - "x-ms-xp-role", - "0", - "x-ms-global-Committed-lsn", - "-1", - "x-ms-number-of-read-regions", - "0", - "x-ms-transport-request-id", - "11", - "x-ms-cosmos-llsn", - "235", - "x-ms-cosmos-quorum-acked-llsn", - "234", - "x-ms-session-token", - "0:235", - "x-ms-request-charge", - "5.9", - "x-ms-serviceversion", - "version=2.0.0.0", - "x-ms-activity-id", - "db7ab2cd-5d6f-4136-aa64-6252d88d401e", - "x-ms-gatewayversion", - "version=2.0.0.0", - "Date", - "Thu, 25 Oct 2018 20:14:43 GMT" - ] - }, - { - "scope": "https://localhost:8081", - "method": "POST", - "path": "/dbs/A7V-AA==/colls/A7V-AIqw5hc=/docs/", - "body": { - "query": "SELECT c.id, c.realId, c.document, c._etag FROM c WHERE c.id in (@id0)", - "parameters": [ - { - "name": "@id0", - "value": "keyCreate" - } - ] - }, - "status": 200, - "response": { - "_rid": "A7V-AIqw5hc=", - "Documents": [ - { - "id": "keyCreate", - "realId": "keyCreate", - "document": { - "count": 1 - }, - "_etag": "\"00000000-0000-0000-6c9f-5e29d60401d4\"" - } - ], - "_count": 1 - }, - "rawHeaders": [ - "Cache-Control", - "no-store, no-cache", - "Pragma", - "no-cache", - "Transfer-Encoding", - "chunked", - "Content-Type", - "application/json", - "Server", - "Microsoft-HTTPAPI/2.0", - "x-ms-last-state-change-utc", - "Thu, 25 Oct 2018 20:14:08.836 GMT", - "x-ms-resource-quota", - "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", - "x-ms-resource-usage", - "documentSize=0;documentsSize=1;documentsCount=1;collectionSize=1;", - "lsn", - "235", - "x-ms-item-count", - "1", - "x-ms-schemaversion", - "1.6", - "x-ms-alt-content-path", - "dbs/test-db/colls/bot-storage", - "x-ms-quorum-acked-lsn", - "235", - "x-ms-current-write-quorum", - "1", - "x-ms-current-replica-set-size", - "1", - "x-ms-xp-role", - "0", - "x-ms-global-Committed-lsn", - "-1", - "x-ms-number-of-read-regions", - "0", - "x-ms-transport-request-id", - "12", - "x-ms-cosmos-llsn", - "235", - "x-ms-cosmos-quorum-acked-llsn", - "235", - "x-ms-session-token", - "0:235", - "x-ms-request-charge", - "2.25", - "x-ms-serviceversion", - "version=2.0.0.0", - "x-ms-activity-id", - "8a488fd2-77a2-4aa9-9627-453647d86ba7", - "x-ms-gatewayversion", - "version=2.0.0.0", - "Date", - "Thu, 25 Oct 2018 20:14:43 GMT" - ] - } -] \ No newline at end of file diff --git a/libraries/botbuilder-azure/tests/TestData/CosmosDbStorage/key_update.json b/libraries/botbuilder-azure/tests/TestData/CosmosDbStorage/key_update.json deleted file mode 100644 index 95117dbe74..0000000000 --- a/libraries/botbuilder-azure/tests/TestData/CosmosDbStorage/key_update.json +++ /dev/null @@ -1,685 +0,0 @@ -[ - { - "scope": "https://localhost:8081", - "method": "GET", - "path": "/", - "body": "", - "status": 200, - "response": { - "_self": "", - "id": "localhost", - "_rid": "localhost", - "media": "//media/", - "addresses": "//addresses/", - "_dbs": "//dbs/", - "writableLocations": [ - { - "name": "South Central US", - "databaseAccountEndpoint": "https://127.0.0.1:8081/" - } - ], - "readableLocations": [ - { - "name": "South Central US", - "databaseAccountEndpoint": "https://127.0.0.1:8081/" - } - ], - "userReplicationPolicy": { - "asyncReplication": false, - "minReplicaSetSize": 1, - "maxReplicasetSize": 4 - }, - "userConsistencyPolicy": { - "defaultConsistencyLevel": "Session" - }, - "systemReplicationPolicy": { - "minReplicaSetSize": 1, - "maxReplicasetSize": 4 - }, - "readPolicy": { - "primaryReadCoefficient": 1, - "secondaryReadCoefficient": 1 - }, - "queryEngineConfiguration": "{\"maxSqlQueryInputLength\":262144,\"maxJoinsPerSqlQuery\":5,\"maxLogicalAndPerSqlQuery\":500,\"maxLogicalOrPerSqlQuery\":500,\"maxUdfRefPerSqlQuery\":10,\"maxInExpressionItemsCount\":16000,\"queryMaxInMemorySortDocumentCount\":500,\"maxQueryRequestTimeoutFraction\":0.9,\"sqlAllowNonFiniteNumbers\":false,\"sqlAllowAggregateFunctions\":true,\"sqlAllowSubQuery\":true,\"sqlAllowScalarSubQuery\":true,\"allowNewKeywords\":true,\"sqlAllowLike\":false,\"maxSpatialQueryCells\":12,\"spatialMaxGeometryPointCount\":256,\"sqlAllowTop\":true,\"enableSpatialIndexing\":true}" - }, - "rawHeaders": [ - "Cache-Control", - "no-store, no-cache", - "Pragma", - "no-cache", - "Transfer-Encoding", - "chunked", - "Content-Type", - "application/json", - "Content-Location", - "https://localhost:8081/", - "Server", - "Microsoft-HTTPAPI/2.0", - "x-ms-max-media-storage-usage-mb", - "10240", - "x-ms-media-storage-usage-mb", - "0", - "x-ms-databaseaccount-consumed-mb", - "0", - "x-ms-databaseaccount-reserved-mb", - "0", - "x-ms-databaseaccount-provisioned-mb", - "0", - "x-ms-gatewayversion", - "version=2.0.0.0", - "Date", - "Thu, 25 Oct 2018 20:14:43 GMT" - ] - }, - { - "scope": "https://localhost:8081", - "method": "POST", - "path": "/dbs", - "body": { - "query": "SELECT r._self FROM root r WHERE r.id = @id", - "parameters": [ - { - "name": "@id", - "value": "test-db" - } - ] - }, - "status": 200, - "response": { - "_rid": "", - "Databases": [ - { - "_self": "dbs/A7V-AA==/" - } - ], - "_count": 1 - }, - "rawHeaders": [ - "Cache-Control", - "no-store, no-cache", - "Pragma", - "no-cache", - "Transfer-Encoding", - "chunked", - "Content-Type", - "application/json", - "Server", - "Microsoft-HTTPAPI/2.0", - "x-ms-last-state-change-utc", - "Thu, 25 Oct 2018 20:14:00.991 GMT", - "x-ms-resource-quota", - "databases=100;", - "x-ms-resource-usage", - "databases=1;", - "lsn", - "79", - "x-ms-item-count", - "1", - "x-ms-schemaversion", - "1.6", - "x-ms-quorum-acked-lsn", - "79", - "x-ms-current-write-quorum", - "1", - "x-ms-current-replica-set-size", - "1", - "x-ms-xp-role", - "0", - "x-ms-global-Committed-lsn", - "-1", - "x-ms-number-of-read-regions", - "0", - "x-ms-transport-request-id", - "51", - "x-ms-cosmos-llsn", - "79", - "x-ms-cosmos-quorum-acked-llsn", - "79", - "x-ms-session-token", - "0:79", - "x-ms-request-charge", - "4.48", - "x-ms-serviceversion", - "version=2.0.0.0", - "x-ms-activity-id", - "a941bde1-ff9b-4f51-a4c9-662f2e872466", - "x-ms-gatewayversion", - "version=2.0.0.0", - "Date", - "Thu, 25 Oct 2018 20:14:43 GMT" - ] - }, - { - "scope": "https://localhost:8081", - "method": "POST", - "path": "/dbs/A7V-AA==/colls/", - "body": { - "query": "SELECT r._self FROM root r WHERE r.id=@id", - "parameters": [ - { - "name": "@id", - "value": "bot-storage" - } - ] - }, - "status": 200, - "response": { - "_rid": "A7V-AA==", - "DocumentCollections": [ - { - "_self": "dbs/A7V-AA==/colls/A7V-AIqw5hc=/" - } - ], - "_count": 1 - }, - "rawHeaders": [ - "Cache-Control", - "no-store, no-cache", - "Pragma", - "no-cache", - "Transfer-Encoding", - "chunked", - "Content-Type", - "application/json", - "Server", - "Microsoft-HTTPAPI/2.0", - "x-ms-last-state-change-utc", - "Thu, 25 Oct 2018 20:14:00.991 GMT", - "x-ms-resource-quota", - "collections=5000;", - "x-ms-resource-usage", - "collections=1;", - "collection-partition-index", - "0", - "collection-service-index", - "0", - "lsn", - "79", - "x-ms-item-count", - "1", - "x-ms-schemaversion", - "1.6", - "x-ms-alt-content-path", - "dbs/test-db", - "x-ms-quorum-acked-lsn", - "79", - "x-ms-current-write-quorum", - "1", - "x-ms-current-replica-set-size", - "1", - "x-ms-xp-role", - "0", - "x-ms-global-Committed-lsn", - "-1", - "x-ms-number-of-read-regions", - "0", - "x-ms-transport-request-id", - "53", - "x-ms-cosmos-llsn", - "79", - "x-ms-cosmos-quorum-acked-llsn", - "79", - "x-ms-session-token", - "0:79", - "x-ms-request-charge", - "4.5", - "x-ms-serviceversion", - "version=2.0.0.0", - "x-ms-activity-id", - "d751811d-a77e-4f31-aa5a-32303e39e961", - "x-ms-gatewayversion", - "version=2.0.0.0", - "Date", - "Thu, 25 Oct 2018 20:14:43 GMT" - ] - }, - { - "scope": "https://localhost:8081", - "method": "GET", - "path": "/dbs/test-db/colls/bot-storage", - "body": "", - "status": 200, - "response": { - "id": "bot-storage", - "indexingPolicy": { - "indexingMode": "consistent", - "automatic": true, - "includedPaths": [ - { - "path": "/*", - "indexes": [ - { - "kind": "Range", - "dataType": "Number", - "precision": -1 - }, - { - "kind": "Hash", - "dataType": "String", - "precision": 3 - } - ] - } - ], - "excludedPaths": [] - }, - "_rid": "A7V-AIqw5hc=", - "_ts": 1540498482, - "_self": "dbs/A7V-AA==/colls/A7V-AIqw5hc=/", - "_etag": "\"00000000-0000-0000-6c9f-5d9f009a01d4\"", - "_docs": "docs/", - "_sprocs": "sprocs/", - "_triggers": "triggers/", - "_udfs": "udfs/", - "_conflicts": "conflicts/" - }, - "rawHeaders": [ - "Cache-Control", - "no-store, no-cache", - "Pragma", - "no-cache", - "Transfer-Encoding", - "chunked", - "Content-Type", - "application/json", - "Content-Location", - "https://127.0.0.1:8081/dbs/test-db/colls/bot-storage", - "Server", - "Microsoft-HTTPAPI/2.0", - "x-ms-last-state-change-utc", - "Thu, 25 Oct 2018 20:14:08.836 GMT", - "etag", - "\"00000000-0000-0000-6c9f-5d9f009a01d4\"", - "x-ms-resource-quota", - "functions=25;storedProcedures=100;triggers=25;documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", - "x-ms-resource-usage", - "functions=0;storedProcedures=0;triggers=0;documentSize=0;documentsSize=1;documentsCount=1;collectionSize=1;", - "collection-partition-index", - "0", - "collection-service-index", - "0", - "lsn", - "235", - "x-ms-schemaversion", - "1.6", - "x-ms-alt-content-path", - "dbs/test-db", - "x-ms-content-path", - "A7V-AA==", - "x-ms-quorum-acked-lsn", - "235", - "x-ms-documentdb-collection-index-transformation-progress", - "100", - "x-ms-current-write-quorum", - "1", - "x-ms-current-replica-set-size", - "1", - "x-ms-xp-role", - "0", - "x-ms-global-Committed-lsn", - "-1", - "x-ms-number-of-read-regions", - "0", - "x-ms-item-lsn", - "234", - "x-ms-transport-request-id", - "13", - "x-ms-cosmos-llsn", - "235", - "x-ms-cosmos-quorum-acked-llsn", - "235", - "x-ms-cosmos-item-llsn", - "234", - "x-ms-session-token", - "0:235", - "x-ms-request-charge", - "1", - "x-ms-serviceversion", - "version=2.0.0.0", - "x-ms-activity-id", - "8dd9bcc2-94b1-48f3-b6e2-3f86f1d25410", - "x-ms-gatewayversion", - "version=2.0.0.0", - "Date", - "Thu, 25 Oct 2018 20:14:43 GMT" - ] - }, - { - "scope": "https://localhost:8081", - "method": "POST", - "path": "/dbs/test-db/colls/bot-storage/docs", - "body": { - "id": "keyUpdate", - "realId": "keyUpdate", - "document": { - "count": 1 - } - }, - "status": 201, - "response": { - "id": "keyUpdate", - "realId": "keyUpdate", - "document": { - "count": 1 - }, - "_rid": "A7V-AIqw5hcCAAAAAAAAAA==", - "_self": "dbs/A7V-AA==/colls/A7V-AIqw5hc=/docs/A7V-AIqw5hcCAAAAAAAAAA==/", - "_etag": "\"00000000-0000-0000-6c9f-5e349dda01d4\"", - "_attachments": "attachments/", - "_ts": 1540498483 - }, - "rawHeaders": [ - "Cache-Control", - "no-store, no-cache", - "Pragma", - "no-cache", - "Transfer-Encoding", - "chunked", - "Content-Type", - "application/json", - "Server", - "Microsoft-HTTPAPI/2.0", - "x-ms-last-state-change-utc", - "Thu, 25 Oct 2018 20:14:08.836 GMT", - "etag", - "\"00000000-0000-0000-6c9f-5e349dda01d4\"", - "x-ms-resource-quota", - "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", - "x-ms-resource-usage", - "documentSize=0;documentsSize=2;documentsCount=1;collectionSize=2;", - "lsn", - "236", - "x-ms-schemaversion", - "1.6", - "x-ms-alt-content-path", - "dbs/test-db/colls/bot-storage", - "x-ms-content-path", - "A7V-AIqw5hc=", - "x-ms-quorum-acked-lsn", - "235", - "x-ms-current-write-quorum", - "1", - "x-ms-current-replica-set-size", - "1", - "x-ms-xp-role", - "0", - "x-ms-global-Committed-lsn", - "-1", - "x-ms-number-of-read-regions", - "0", - "x-ms-transport-request-id", - "18", - "x-ms-cosmos-llsn", - "236", - "x-ms-cosmos-quorum-acked-llsn", - "235", - "x-ms-session-token", - "0:236", - "x-ms-request-charge", - "5.9", - "x-ms-serviceversion", - "version=2.0.0.0", - "x-ms-activity-id", - "6cde8fec-c892-436c-9c78-8f5a7e7223b1", - "x-ms-gatewayversion", - "version=2.0.0.0", - "Date", - "Thu, 25 Oct 2018 20:14:43 GMT" - ] - }, - { - "scope": "https://localhost:8081", - "method": "POST", - "path": "/dbs/A7V-AA==/colls/A7V-AIqw5hc=/docs/", - "body": { - "query": "SELECT c.id, c.realId, c.document, c._etag FROM c WHERE c.id in (@id0)", - "parameters": [ - { - "name": "@id0", - "value": "keyUpdate" - } - ] - }, - "status": 200, - "response": { - "_rid": "A7V-AIqw5hc=", - "Documents": [ - { - "id": "keyUpdate", - "realId": "keyUpdate", - "document": { - "count": 1 - }, - "_etag": "\"00000000-0000-0000-6c9f-5e349dda01d4\"" - } - ], - "_count": 1 - }, - "rawHeaders": [ - "Cache-Control", - "no-store, no-cache", - "Pragma", - "no-cache", - "Transfer-Encoding", - "chunked", - "Content-Type", - "application/json", - "Server", - "Microsoft-HTTPAPI/2.0", - "x-ms-last-state-change-utc", - "Thu, 25 Oct 2018 20:14:08.836 GMT", - "x-ms-resource-quota", - "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", - "x-ms-resource-usage", - "documentSize=0;documentsSize=2;documentsCount=2;collectionSize=2;", - "lsn", - "236", - "x-ms-item-count", - "1", - "x-ms-schemaversion", - "1.6", - "x-ms-alt-content-path", - "dbs/test-db/colls/bot-storage", - "x-ms-quorum-acked-lsn", - "236", - "x-ms-current-write-quorum", - "1", - "x-ms-current-replica-set-size", - "1", - "x-ms-xp-role", - "0", - "x-ms-global-Committed-lsn", - "-1", - "x-ms-number-of-read-regions", - "0", - "x-ms-transport-request-id", - "19", - "x-ms-cosmos-llsn", - "236", - "x-ms-cosmos-quorum-acked-llsn", - "236", - "x-ms-session-token", - "0:236", - "x-ms-request-charge", - "2.25", - "x-ms-serviceversion", - "version=2.0.0.0", - "x-ms-activity-id", - "80bd2cd2-324a-42ac-a739-43e5da5f053b", - "x-ms-gatewayversion", - "version=2.0.0.0", - "Date", - "Thu, 25 Oct 2018 20:14:43 GMT" - ] - }, - { - "scope": "https://localhost:8081", - "method": "PUT", - "path": "/dbs/test-db/colls/bot-storage/docs/keyUpdate", - "body": { - "id": "keyUpdate", - "realId": "keyUpdate", - "document": { - "count": 2 - } - }, - "status": 200, - "response": { - "id": "keyUpdate", - "realId": "keyUpdate", - "document": { - "count": 2 - }, - "_rid": "A7V-AIqw5hcCAAAAAAAAAA==", - "_self": "dbs/A7V-AA==/colls/A7V-AIqw5hc=/docs/A7V-AIqw5hcCAAAAAAAAAA==/", - "_etag": "\"00000000-0000-0000-6c9f-5e378b0d01d4\"", - "_attachments": "attachments/", - "_ts": 1540498483 - }, - "rawHeaders": [ - "Cache-Control", - "no-store, no-cache", - "Pragma", - "no-cache", - "Transfer-Encoding", - "chunked", - "Content-Type", - "application/json", - "Content-Location", - "https://127.0.0.1:8081/dbs/test-db/colls/bot-storage/docs/keyUpdate", - "Server", - "Microsoft-HTTPAPI/2.0", - "x-ms-last-state-change-utc", - "Thu, 25 Oct 2018 20:14:08.836 GMT", - "etag", - "\"00000000-0000-0000-6c9f-5e378b0d01d4\"", - "x-ms-resource-quota", - "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", - "x-ms-resource-usage", - "documentSize=0;documentsSize=2;documentsCount=2;collectionSize=2;", - "lsn", - "237", - "x-ms-schemaversion", - "1.6", - "x-ms-alt-content-path", - "dbs/test-db/colls/bot-storage", - "x-ms-content-path", - "A7V-AIqw5hc=", - "x-ms-quorum-acked-lsn", - "236", - "x-ms-current-write-quorum", - "1", - "x-ms-current-replica-set-size", - "1", - "x-ms-xp-role", - "0", - "x-ms-global-Committed-lsn", - "-1", - "x-ms-number-of-read-regions", - "0", - "x-ms-transport-request-id", - "20", - "x-ms-cosmos-llsn", - "237", - "x-ms-cosmos-quorum-acked-llsn", - "236", - "x-ms-session-token", - "0:237", - "x-ms-request-charge", - "11.05", - "x-ms-serviceversion", - "version=2.0.0.0", - "x-ms-activity-id", - "fa8cda49-cc48-4a01-ae4f-4fe88098319c", - "x-ms-gatewayversion", - "version=2.0.0.0", - "Date", - "Thu, 25 Oct 2018 20:14:43 GMT" - ] - }, - { - "scope": "https://localhost:8081", - "method": "POST", - "path": "/dbs/A7V-AA==/colls/A7V-AIqw5hc=/docs/", - "body": { - "query": "SELECT c.id, c.realId, c.document, c._etag FROM c WHERE c.id in (@id0)", - "parameters": [ - { - "name": "@id0", - "value": "keyUpdate" - } - ] - }, - "status": 200, - "response": { - "_rid": "A7V-AIqw5hc=", - "Documents": [ - { - "id": "keyUpdate", - "realId": "keyUpdate", - "document": { - "count": 2 - }, - "_etag": "\"00000000-0000-0000-6c9f-5e378b0d01d4\"" - } - ], - "_count": 1 - }, - "rawHeaders": [ - "Cache-Control", - "no-store, no-cache", - "Pragma", - "no-cache", - "Transfer-Encoding", - "chunked", - "Content-Type", - "application/json", - "Server", - "Microsoft-HTTPAPI/2.0", - "x-ms-last-state-change-utc", - "Thu, 25 Oct 2018 20:14:08.836 GMT", - "x-ms-resource-quota", - "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", - "x-ms-resource-usage", - "documentSize=0;documentsSize=2;documentsCount=2;collectionSize=2;", - "lsn", - "237", - "x-ms-item-count", - "1", - "x-ms-schemaversion", - "1.6", - "x-ms-alt-content-path", - "dbs/test-db/colls/bot-storage", - "x-ms-quorum-acked-lsn", - "237", - "x-ms-current-write-quorum", - "1", - "x-ms-current-replica-set-size", - "1", - "x-ms-xp-role", - "0", - "x-ms-global-Committed-lsn", - "-1", - "x-ms-number-of-read-regions", - "0", - "x-ms-transport-request-id", - "21", - "x-ms-cosmos-llsn", - "237", - "x-ms-cosmos-quorum-acked-llsn", - "237", - "x-ms-session-token", - "0:237", - "x-ms-request-charge", - "2.25", - "x-ms-serviceversion", - "version=2.0.0.0", - "x-ms-activity-id", - "6d279bdd-221d-436b-8270-bb95188cd630", - "x-ms-gatewayversion", - "version=2.0.0.0", - "Date", - "Thu, 25 Oct 2018 20:14:43 GMT" - ] - } -] \ No newline at end of file diff --git a/libraries/botbuilder-azure/tests/TestData/CosmosDbStorage/read_without_partition_key.json b/libraries/botbuilder-azure/tests/TestData/CosmosDbStorage/read_without_partition_key.json deleted file mode 100644 index ba50562d77..0000000000 --- a/libraries/botbuilder-azure/tests/TestData/CosmosDbStorage/read_without_partition_key.json +++ /dev/null @@ -1,503 +0,0 @@ -[ - { - "scope": "https://localhost:8081", - "method": "GET", - "path": "/", - "body": "", - "status": 200, - "response": { - "_self": "", - "id": "localhost", - "_rid": "localhost", - "media": "//media/", - "addresses": "//addresses/", - "_dbs": "//dbs/", - "writableLocations": [ - { - "name": "South Central US", - "databaseAccountEndpoint": "https://127.0.0.1:8081/" - } - ], - "readableLocations": [ - { - "name": "South Central US", - "databaseAccountEndpoint": "https://127.0.0.1:8081/" - } - ], - "userReplicationPolicy": { - "asyncReplication": false, - "minReplicaSetSize": 1, - "maxReplicasetSize": 4 - }, - "userConsistencyPolicy": { - "defaultConsistencyLevel": "Session" - }, - "systemReplicationPolicy": { - "minReplicaSetSize": 1, - "maxReplicasetSize": 4 - }, - "readPolicy": { - "primaryReadCoefficient": 1, - "secondaryReadCoefficient": 1 - }, - "queryEngineConfiguration": "{\"maxSqlQueryInputLength\":262144,\"maxJoinsPerSqlQuery\":5,\"maxLogicalAndPerSqlQuery\":500,\"maxLogicalOrPerSqlQuery\":500,\"maxUdfRefPerSqlQuery\":10,\"maxInExpressionItemsCount\":16000,\"queryMaxInMemorySortDocumentCount\":500,\"maxQueryRequestTimeoutFraction\":0.9,\"sqlAllowNonFiniteNumbers\":false,\"sqlAllowAggregateFunctions\":true,\"sqlAllowSubQuery\":true,\"sqlAllowScalarSubQuery\":true,\"allowNewKeywords\":true,\"sqlAllowLike\":false,\"sqlAllowGroupByClause\":false,\"maxSpatialQueryCells\":12,\"spatialMaxGeometryPointCount\":256,\"sqlAllowTop\":true,\"enableSpatialIndexing\":true}" - }, - "rawHeaders": [ - "Cache-Control", - "no-store, no-cache", - "Pragma", - "no-cache", - "Transfer-Encoding", - "chunked", - "Content-Type", - "application/json", - "Content-Location", - "https://localhost:8081/", - "Server", - "Microsoft-HTTPAPI/2.0", - "Access-Control-Allow-Origin", - "", - "Access-Control-Allow-Credentials", - "true", - "x-ms-max-media-storage-usage-mb", - "10240", - "x-ms-media-storage-usage-mb", - "0", - "x-ms-databaseaccount-consumed-mb", - "0", - "x-ms-databaseaccount-reserved-mb", - "0", - "x-ms-databaseaccount-provisioned-mb", - "0", - "x-ms-gatewayversion", - "version=2.2.0.0", - "Date", - "Fri, 05 Apr 2019 16:48:27 GMT" - ] - }, - { - "scope": "https://localhost:8081", - "method": "POST", - "path": "/dbs", - "body": { - "query": "SELECT r._self FROM root r WHERE r.id = @id", - "parameters": [ - { - "name": "@id", - "value": "test-db" - } - ] - }, - "status": 200, - "response": { - "_rid": "", - "Databases": [ - { - "_self": "dbs/eLtDAA==/" - } - ], - "_count": 1 - }, - "rawHeaders": [ - "Cache-Control", - "no-store, no-cache", - "Pragma", - "no-cache", - "Transfer-Encoding", - "chunked", - "Content-Type", - "application/json", - "Server", - "Microsoft-HTTPAPI/2.0", - "Access-Control-Allow-Origin", - "", - "Access-Control-Allow-Credentials", - "true", - "x-ms-last-state-change-utc", - "Fri, 29 Mar 2019 04:36:17.258 GMT", - "x-ms-resource-quota", - "databases=100;", - "x-ms-resource-usage", - "databases=2;", - "lsn", - "533", - "x-ms-item-count", - "1", - "x-ms-schemaversion", - "1.7", - "x-ms-quorum-acked-lsn", - "533", - "x-ms-current-write-quorum", - "1", - "x-ms-current-replica-set-size", - "1", - "x-ms-xp-role", - "0", - "x-ms-global-Committed-lsn", - "-1", - "x-ms-number-of-read-regions", - "0", - "x-ms-transport-request-id", - "2758", - "x-ms-cosmos-llsn", - "533", - "x-ms-cosmos-quorum-acked-llsn", - "533", - "x-ms-session-token", - "0:533", - "x-ms-request-charge", - "5.66", - "x-ms-serviceversion", - "version=2.2.0.0", - "x-ms-activity-id", - "248544c9-4690-45cf-99f4-2578b2350543", - "x-ms-gatewayversion", - "version=2.2.0.0", - "Date", - "Fri, 05 Apr 2019 16:48:27 GMT" - ] - }, - { - "scope": "https://localhost:8081", - "method": "POST", - "path": "/dbs/eLtDAA==/colls/", - "body": { - "query": "SELECT r._self FROM root r WHERE r.id=@id", - "parameters": [ - { - "name": "@id", - "value": "bot-storage" - } - ] - }, - "status": 200, - "response": { - "_rid": "eLtDAA==", - "DocumentCollections": [ - { - "_self": "dbs/eLtDAA==/colls/eLtDAL-3CAk=/" - } - ], - "_count": 1 - }, - "rawHeaders": [ - "Cache-Control", - "no-store, no-cache", - "Pragma", - "no-cache", - "Transfer-Encoding", - "chunked", - "Content-Type", - "application/json", - "Server", - "Microsoft-HTTPAPI/2.0", - "Access-Control-Allow-Origin", - "", - "Access-Control-Allow-Credentials", - "true", - "x-ms-last-state-change-utc", - "Fri, 29 Mar 2019 04:36:17.258 GMT", - "x-ms-resource-quota", - "collections=5000;", - "x-ms-resource-usage", - "collections=2;", - "collection-partition-index", - "0", - "collection-service-index", - "0", - "lsn", - "533", - "x-ms-item-count", - "1", - "x-ms-schemaversion", - "1.7", - "x-ms-alt-content-path", - "dbs/test-db", - "x-ms-quorum-acked-lsn", - "533", - "x-ms-current-write-quorum", - "1", - "x-ms-current-replica-set-size", - "1", - "x-ms-xp-role", - "0", - "x-ms-global-Committed-lsn", - "-1", - "x-ms-number-of-read-regions", - "0", - "x-ms-transport-request-id", - "2760", - "x-ms-cosmos-llsn", - "533", - "x-ms-cosmos-quorum-acked-llsn", - "533", - "x-ms-session-token", - "0:533", - "x-ms-request-charge", - "5.66", - "x-ms-serviceversion", - "version=2.2.0.0", - "x-ms-activity-id", - "2e638f54-6caa-4c5c-8522-c7f6899afd22", - "x-ms-gatewayversion", - "version=2.2.0.0", - "Date", - "Fri, 05 Apr 2019 16:48:27 GMT" - ] - }, - { - "scope": "https://localhost:8081", - "method": "GET", - "path": "/dbs/test-db/colls/bot-storage", - "body": "", - "status": 200, - "response": { - "id": "bot-storage", - "indexingPolicy": { - "indexingMode": "consistent", - "automatic": true, - "includedPaths": [ - { - "path": "/*", - "indexes": [ - { - "kind": "Range", - "dataType": "Number", - "precision": -1 - }, - { - "kind": "Range", - "dataType": "String", - "precision": -1 - }, - { - "kind": "Spatial", - "dataType": "Point" - } - ] - } - ], - "excludedPaths": [ - { - "path": "/\"_etag\"/?" - } - ] - }, - "partitionKey": { - "paths": [ - "/document/Location" - ], - "kind": "Hash" - }, - "_rid": "eLtDAL-3CAk=", - "_ts": 1554475922, - "_self": "dbs/eLtDAA==/colls/eLtDAL-3CAk=/", - "_etag": "\"00000000-0000-0000-ebbf-21301dee01d4\"", - "_docs": "docs/", - "_sprocs": "sprocs/", - "_triggers": "triggers/", - "_udfs": "udfs/", - "_conflicts": "conflicts/" - }, - "rawHeaders": [ - "Cache-Control", - "no-store, no-cache", - "Pragma", - "no-cache", - "Transfer-Encoding", - "chunked", - "Content-Type", - "application/json", - "Content-Location", - "https://127.0.0.1:8081/dbs/test-db/colls/bot-storage", - "Server", - "Microsoft-HTTPAPI/2.0", - "Access-Control-Allow-Origin", - "", - "Access-Control-Allow-Credentials", - "true", - "x-ms-last-state-change-utc", - "Fri, 29 Mar 2019 04:36:23.731 GMT", - "etag", - "\"00000000-0000-0000-ebbf-21301dee01d4\"", - "collection-partition-index", - "0", - "collection-service-index", - "0", - "lsn", - "1", - "x-ms-schemaversion", - "1.7", - "x-ms-alt-content-path", - "dbs/test-db", - "x-ms-content-path", - "eLtDAA==", - "x-ms-quorum-acked-lsn", - "1", - "x-ms-current-write-quorum", - "1", - "x-ms-current-replica-set-size", - "1", - "x-ms-xp-role", - "0", - "x-ms-global-Committed-lsn", - "-1", - "x-ms-number-of-read-regions", - "0", - "x-ms-item-lsn", - "1", - "x-ms-transport-request-id", - "772", - "x-ms-cosmos-llsn", - "1", - "x-ms-cosmos-quorum-acked-llsn", - "1", - "x-ms-cosmos-item-llsn", - "1", - "x-ms-session-token", - "1:1", - "x-ms-request-charge", - "1", - "x-ms-serviceversion", - "version=2.2.0.0", - "x-ms-activity-id", - "573897eb-4891-416b-8580-2614d49e194c", - "x-ms-gatewayversion", - "version=2.2.0.0", - "Date", - "Fri, 05 Apr 2019 16:48:27 GMT" - ] - }, - { - "scope": "https://localhost:8081", - "method": "POST", - "path": "/dbs/test-db/colls/bot-storage/docs", - "body": { - "id": "001", - "realId": "001", - "document": { - "Location": "ARG", - "MessageList": [ - "Hi", - "how are u" - ] - } - }, - "status": 200, - "response": { - "id": "001", - "realId": "001", - "document": { - "Location": "ARG", - "MessageList": [ - "Hi", - "how are u" - ] - }, - "_rid": "eLtDAL-3CAkqAAAAAAAAAA==", - "_self": "dbs/eLtDAA==/colls/eLtDAL-3CAk=/docs/eLtDAL-3CAkqAAAAAAAAAA==/", - "_etag": "\"00000000-0000-0000-ebcf-64a7813901d4\"", - "_attachments": "attachments/", - "_ts": 1554482908 - }, - "rawHeaders": [ - "Cache-Control", - "no-store, no-cache", - "Pragma", - "no-cache", - "Transfer-Encoding", - "chunked", - "Content-Type", - "application/json", - "Server", - "Microsoft-HTTPAPI/2.0", - "Access-Control-Allow-Origin", - "", - "Access-Control-Allow-Credentials", - "true", - "x-ms-last-state-change-utc", - "Fri, 29 Mar 2019 04:36:22.337 GMT", - "etag", - "\"00000000-0000-0000-ebcf-64a7813901d4\"", - "x-ms-resource-quota", - "documentSize=10240;documentsSize=10485760;documentsCount=-1;collectionSize=10485760;", - "x-ms-resource-usage", - "documentSize=0;documentsSize=0;documentsCount=1;collectionSize=1;", - "lsn", - "511", - "x-ms-schemaversion", - "1.7", - "x-ms-alt-content-path", - "dbs/test-db/colls/bot-storage", - "x-ms-content-path", - "eLtDAL-3CAk=", - "x-ms-quorum-acked-lsn", - "510", - "x-ms-current-write-quorum", - "1", - "x-ms-current-replica-set-size", - "1", - "x-ms-xp-role", - "0", - "x-ms-global-Committed-lsn", - "-1", - "x-ms-number-of-read-regions", - "0", - "x-ms-transport-request-id", - "773", - "x-ms-cosmos-llsn", - "511", - "x-ms-cosmos-quorum-acked-llsn", - "510", - "x-ms-session-token", - "0:511", - "x-ms-request-charge", - "10.29", - "x-ms-serviceversion", - "version=2.2.0.0", - "x-ms-activity-id", - "f5b8089d-c25a-4a8b-a971-4c08c392919e", - "x-ms-gatewayversion", - "version=2.2.0.0", - "Date", - "Fri, 05 Apr 2019 16:48:27 GMT" - ] - }, - { - "scope": "https://localhost:8081", - "method": "POST", - "path": "/dbs/eLtDAA==/colls/eLtDAL-3CAk=/docs/", - "body": { - "query": "SELECT c.id, c.realId, c.document, c._etag FROM c WHERE c.id in (@id0)", - "parameters": [ - { - "name": "@id0", - "value": "001" - } - ] - }, - "status": 400, - "response": { - "code": "BadRequest", - "message": "Cross partition query is required but disabled. Please set x-ms-documentdb-query-enablecrosspartition to true, specify x-ms-documentdb-partitionkey, or revise your query to avoid this exception.\r\nActivityId: 8cd48c26-e376-4ea3-b2ef-dadb087e9b24, Microsoft.Azure.Documents.Common/2.2.0.0" - }, - "rawHeaders": [ - "Transfer-Encoding", - "chunked", - "Content-Type", - "application/json", - "Server", - "Microsoft-HTTPAPI/2.0", - "Access-Control-Allow-Origin", - "", - "Access-Control-Allow-Credentials", - "true", - "x-ms-activity-id", - "8cd48c26-e376-4ea3-b2ef-dadb087e9b24", - "x-ms-gatewayversion", - "version=2.2.0.0", - "Date", - "Fri, 05 Apr 2019 16:48:27 GMT" - ] - } -] \ No newline at end of file diff --git a/libraries/botbuilder-azure/tests/blobStorage.test.js b/libraries/botbuilder-azure/tests/blobStorage.test.js index 3b0bc5dc2d..1a1d24ecc5 100644 --- a/libraries/botbuilder-azure/tests/blobStorage.test.js +++ b/libraries/botbuilder-azure/tests/blobStorage.test.js @@ -1,11 +1,18 @@ const assert = require('assert'); const { BlobStorage } = require('../'); +const { StorageBaseTests } = require('../../botbuilder-core/tests/storageBaseTests'); const azure = require('azure-storage'); -const { MockMode, usingNock } = require('./mockHelper.js') +const { MockMode, usingNock } = require('./mockHelper.js'); const nock = require('nock'); +const fs = require('fs'); +/** + * @param mode controls the nock mode used for the tests. Available options found in ./mockHelper.js. + */ const mode = process.env.MOCK_MODE || MockMode.lockdown; +const emulatorPath = 'C:/Program Files (x86)/Microsoft Azure Storage Explorer/StorageExplorer.exe'; + const getSettings = (container = null) => ({ storageAccountOrConnectionString: 'UseDevelopmentStorage=true;', containerName: container || 'test' @@ -21,254 +28,143 @@ const reset = (done) => { } else { done(); } -} - -const print = (o) => { - return JSON.stringify(o, null, ' '); -} - -testStorage = function () { - - const noEmulatorMessage = 'skipping test because azure storage emulator is not running'; - - it('read of unknown key', function () { - return usingNock(this.test, mode) - .then(({nockDone, context}) => { - let storage = new BlobStorage(getSettings()); - return storage.read(['unk']) - .then((result) => { - assert(result != null, 'result should be object'); - assert(!result.unk, 'key should be undefined'); - }) - .catch(reason => { - if (reason.code == 'ECONNREFUSED') { - console.log(noEmulatorMessage); - } else { - assert(false, `should not throw: ${print(reason.message)}`); - } - }) - .then(nockDone); - }); +}; + +const checkEmulator = () => { + if (!fs.existsSync(emulatorPath)) { + console.warn('This test requires Azure Storage Emulator! go to https://docs.microsoft.com/en-us/azure/storage/common/storage-use-emulator#get-the-storage-emulator to download and install.'); + } + return true; +}; + +const storage = new BlobStorage(getSettings()); + +describe('BlobStorage - Constructor', function() { + before('cleanup', reset); + after('cleanup', reset); + + it('missing settings should throw error', function() { + assert.throws(() => new BlobStorage(), Error, 'constructor should have thrown error about missing settings.'); }); - it('key creation', function () { - return usingNock(this.test, mode) - .then(({nockDone, context}) => { - let storage = new BlobStorage(getSettings()); - return storage.write({ keyCreate: { count: 1 } }) - .then(() => storage.read(['keyCreate'])) - .then((result) => { - assert(result != null, 'result should be object'); - assert(result.keyCreate != null, 'keyCreate should be defined'); - assert(result.keyCreate.count == 1, 'object should have count of 1'); - assert(!result.eTag, 'ETag should be defined'); - }) - .catch(reason => { - if (reason.code == 'ECONNREFUSED') { - console.log(noEmulatorMessage); - } else { - assert(false, `should not throw: ${print(reason.message)}`); - } - }) - .then(nockDone); - }); + it('Invalid container name should throw error', function() { + assert.throws(() => new BlobStorage(getSettings('invalid--name')), Error, 'constructor should have thrown error about invalid container name.'); }); +}); + +describe('BlobStorage - Base Storage Tests', function() { + before('cleanup', reset); + after('cleanup', reset); + + it('return empty object when reading unknown key', async function() { + checkEmulator(); + const { nockDone } = await usingNock(this.test, mode); + + const testRan = await StorageBaseTests.returnEmptyObjectWhenReadingUnknownKey(storage); + + assert.strictEqual(testRan, true); - it('key update', function () { - return usingNock(this.test, mode) - .then(({nockDone, context}) => { - let storage = new BlobStorage(getSettings()); - return storage.write({ keyUpdate: { count: 1 } }) - .then(() => storage.read(['keyUpdate'])) - .then((result) => { - result.keyUpdate.count = 2; - return storage.write(result) - .then(() => storage.read(['keyUpdate'])) - .then((updated) => { - assert(updated.keyUpdate.count == 2, 'object should be updated'); - assert(updated.keyUpdate.eTag != result.keyUpdate.eTag, 'Etag should be updated on write'); - }); - }) - .catch(reason => { - if (reason.code == 'ECONNREFUSED') { - console.log(noEmulatorMessage); - } else { - assert(false, `should not throw: ${print(reason.message)}`); - } - }) - .then(nockDone); - }); + return nockDone(); }); - it('invalid eTag', function () { - return usingNock(this.test, mode) - .then(({nockDone, context}) => { - let storage = new BlobStorage(getSettings()); - return storage.write({ keyUpdate2: { count: 1 } }) - .then(() => storage.read(['keyUpdate2'])) - .then((result) => { - result.keyUpdate2.count = 2; - return storage.write(result).then(() => { - result.keyUpdate2.count = 3; - return storage.write(result) - .then(() => assert(false, `should throw an exception on second write with same etag: ${print(reason)}`)) - .catch((reason) => { }); - }); - }) - .catch(reason => { - if (reason.code == 'ECONNREFUSED') { - console.log(noEmulatorMessage); - } else { - assert(false, `should not throw: ${print(reason.message)}`); - } - }) - .then(nockDone); - }); + it('throws when reading null keys', async function() { + checkEmulator(); + const { nockDone } = await usingNock(this.test, mode); + + const testRan = await StorageBaseTests.handleNullKeysWhenReading(storage); + + assert.strictEqual(testRan, true); + return nockDone(); }); - it('wildcard eTag', function () { - return usingNock(this.test, mode) - .then(({nockDone, context}) => { - let storage = new BlobStorage(getSettings()); - return storage.write({ keyUpdate3: { count: 1 } }) - .then(() => storage.read(['keyUpdate3'])) - .then((result) => { - result.keyUpdate3.eTag = '*'; - result.keyUpdate3.count = 2; - return storage.write(result).then(() => { - result.keyUpdate3.count = 3; - return storage.write(result) - .catch((reason) => assert(false, `should NOT fail on etag writes with wildcard: ${print(reason.message)}`)); - }); - }) - .catch(reason => { - if (reason.code == 'ECONNREFUSED') { - console.log(noEmulatorMessage); - } else { - assert(false, `should not throw: ${print(reason.message)}`); - } - }) - .then(nockDone); - }); + it('throws when writing null keys', async function() { + checkEmulator(); + const { nockDone } = await usingNock(this.test, mode); + + const testRan = await StorageBaseTests.handleNullKeysWhenWriting(storage); + + assert.strictEqual(testRan, true); + return nockDone(); }); - it('delete unknown', function () { - return usingNock(this.test, mode) - .then(({nockDone, context}) => { - let storage = new BlobStorage(getSettings()); - return storage.delete(['unknown']) - .catch(reason => { - if (reason.code == 'ECONNREFUSED') { - console.log(noEmulatorMessage); - } else { - assert(false, `should not throw: ${print(reason.message)}`); - } - }) - .then(nockDone); - }); + it('does not throw when writing no items', async function() { + checkEmulator(); + const { nockDone } = await usingNock(this.test, mode); + + const testRan = await StorageBaseTests.doesNotThrowWhenWritingNoItems(storage); + + assert.strictEqual(testRan, true); + return nockDone(); }); - it('delete known', function () { - return usingNock(this.test, mode) - .then(({nockDone, context}) => { - let storage = new BlobStorage(getSettings()); - return storage.write({ delete1: { count: 1 } }) - .then(() => storage.delete(['delete1'])) - .then(() => storage.read(['delete1'])) - .then(result => { - if (result.delete1) - console.log(JSON.stringify(result.delete1)); - assert(!result.delete1, 'delete1 should not be found'); - }) - .catch(reason => { - if (reason.code == 'ECONNREFUSED') { - console.log(noEmulatorMessage); - } else { - assert(false, `should not throw: ${print(reason.message)}`); - } - }) - .then(nockDone); - }); + it('create an object', async function() { + checkEmulator(); + const { nockDone } = await usingNock(this.test, mode); + + const testRan = await StorageBaseTests.createObject(storage); + + assert.strictEqual(testRan, true); + return nockDone(); }); - it('batch operations', function () { - return usingNock(this.test, mode) - .then(({nockDone, context}) => { - let storage = new BlobStorage(getSettings()); - return storage.write({ - batch1: { count: 10 }, - batch2: { count: 20 }, - batch3: { count: 30 }, - }) - .then(() => storage.read(['batch1', 'batch2', 'batch3'])) - .then((result) => { - assert(result.batch1 != null, 'batch1 should exist and doesnt'); - assert(result.batch2 != null, 'batch2 should exist and doesnt'); - assert(result.batch3 != null, 'batch3 should exist and doesnt'); - assert(result.batch1.count > 0, 'batch1 should have count and doesnt'); - assert(result.batch2.count > 0, 'batch2 should have count and doesnt'); - assert(result.batch3.count > 0, 'batch3 should have count and doesnt'); - assert(result.batch1.eTag != null, 'batch1 should have etag and doesnt'); - assert(result.batch2.eTag != null, 'batch2 should have etag and doesnt'); - assert(result.batch3.eTag != null, 'batch3 should have etag and doesnt'); - }) - .then(() => storage.delete(['batch1', 'batch2', 'batch3'])) - .then(() => storage.read(['batch1', 'batch2', 'batch3'])) - .then((result) => { - assert(!result.batch1, 'batch1 should not exist and does'); - assert(!result.batch2, 'batch2 should not exist and does'); - assert(!result.batch3, 'batch3 should not exist and does'); - }) - .catch(reason => { - if (reason.code == 'ECONNREFUSED') { - console.log(noEmulatorMessage); - } else { - assert(false, `should not throw: ${print(reason.message)}`); - } - }) - .then(nockDone); - }); + it('handle crazy keys', async function() { + checkEmulator(); + const { nockDone } = await usingNock(this.test, mode); + + const testRan = await StorageBaseTests.handleCrazyKeys(storage); + + assert.strictEqual(testRan, true); + return nockDone(); }); - it('crazy keys work', function () { - return usingNock(this.test, mode) - .then(({nockDone, context}) => { - let storage = new BlobStorage(getSettings()); - let obj = {}; - let crazyKey = '!@#$%^&*()_+??><":QASD~`'; - obj[crazyKey] = { count: 1 }; - return storage.write(obj) - .then(() => storage.read([crazyKey])) - .then((result) => { - assert(result != null, 'result should be object'); - assert(result[crazyKey], 'keyCreate should be defined'); - assert(result[crazyKey].count == 1, 'object should have count of 1'); - assert(result[crazyKey].eTag, 'ETag should be defined'); - }) - .catch(reason => { - if (reason.code == 'ECONNREFUSED') { - console.log(noEmulatorMessage); - } else { - assert(false, `should not throw: ${print(reason.message)}`); - } - }) - .then(nockDone); - }); + it('update an object', async function() { + checkEmulator(); + const { nockDone } = await usingNock(this.test, mode); + + const testRan = await StorageBaseTests.updateObject(storage); + + assert.strictEqual(testRan, true); + return nockDone(); }); - it('missing settings should throw error', function() { - assert.throws(() => new BlobStorage(), Error, 'constructor should have thrown error about missing settings.'); - }) + it('delete an object', async function() { + checkEmulator(); + const { nockDone } = await usingNock(this.test, mode); - it('Invalid container name should throw error', function() { - assert.throws(() => new BlobStorage(getSettings('invalid--name')), Error, 'constructor should have thrown error about invalid container name.'); - }) -} + const testRan = await StorageBaseTests.deleteObject(storage); -describe('BlobStorage', function () { - this.timeout(20000); - before('cleanup', reset); - testStorage(); - after('cleanup', reset); + assert.strictEqual(testRan, true); + return nockDone(); + }); + + it('does not throw when deleting an unknown object', async function() { + checkEmulator(); + const { nockDone } = await usingNock(this.test, mode); + + const testRan = await StorageBaseTests.deleteUnknownObject(storage); + + assert.strictEqual(testRan, true); + return nockDone(); + }); + + it('performs batch operations', async function() { + checkEmulator(); + const { nockDone } = await usingNock(this.test, mode); + + const testRan = await StorageBaseTests.performBatchOperations(storage); + + assert.strictEqual(testRan, true); + return nockDone(); + }); + + it('proceeds through a waterfall dialog', async function() { + checkEmulator(); + const { nockDone } = await usingNock(this.test, mode); + + const testRan = await StorageBaseTests.proceedsThroughWaterfall(storage); + + assert.strictEqual(testRan, true); + return nockDone(); + }); }); diff --git a/libraries/botbuilder-azure/tests/cosmosDbPartitionedStorage.test.js b/libraries/botbuilder-azure/tests/cosmosDbPartitionedStorage.test.js index 12b4bea661..2acc50d56c 100644 --- a/libraries/botbuilder-azure/tests/cosmosDbPartitionedStorage.test.js +++ b/libraries/botbuilder-azure/tests/cosmosDbPartitionedStorage.test.js @@ -1,69 +1,53 @@ const assert = require('assert'); const { CosmosDbPartitionedStorage } = require('../lib'); -const { AutoSaveStateMiddleware, ConversationState, MessageFactory, TestAdapter } = require('../../botbuilder-core'); -const { Dialog, DialogSet, TextPrompt, WaterfallDialog } = require('../../botbuilder-dialogs'); +const { StorageBaseTests } = require('../../botbuilder-core/tests/storageBaseTests'); const { CosmosClient } = require('@azure/cosmos'); const { MockMode, usingNock } = require('./mockHelper'); const nock = require('nock'); const fs = require('fs'); const https = require('https'); +/** + * @param mode controls the nock mode used for the tests. Available options found in ./mockHelper.js. + */ const mode = process.env.MOCK_MODE ? process.env.MOCK_MODE : MockMode.lockdown; -// Endpoint and Authkey for the CosmosDB Emulator running locally -const cosmosDbEndpoint = 'https://localhost:8081'; -const authKey = 'C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw=='; -const databaseId = 'test-db'; -const containerId = 'bot-storage'; +const emulatorPath = 'C:/Program Files/Azure Cosmos DB Emulator/CosmosDB.Emulator.exe'; +// Endpoint and authKey for the CosmosDB Emulator running locally const getSettings = () => { return { - cosmosDbEndpoint, - authKey, - databaseId, - containerId + cosmosDbEndpoint: 'https://localhost:8081', + authKey: 'C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw==', + databaseId: 'test-db', + containerId: 'bot-storage', + cosmosClientOptions: { + agent: new https.Agent({ rejectUnauthorized: false }) // rejectUnauthorized disables the SSL verification for the locally-hosted Emulator + } }; }; -const storage = new CosmosDbPartitionedStorage(getSettings()); - -const noEmulatorMessage = 'This test requires CosmosDB Emulator! go to https://aka.ms/documentdb-emulator-docs to download and install.'; -const emulatorPath = `C:/Program Files/Azure Cosmos DB Emulator/CosmosDB.Emulator.exe`; - -// Disable certificate checking when running tests locally -if (cosmosDbEndpoint.includes('localhost:8081')) { - process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0'; - console.warn('WARNING: Disabling SSL Verification because we detected the emulator was being used'); -} - -const hasEmulator = fs.existsSync(emulatorPath); - const checkEmulator = () => { - if (!hasEmulator) { - console.warn(noEmulatorMessage); + if (!fs.existsSync(emulatorPath)) { + console.warn('This test requires CosmosDB Emulator! go to https://aka.ms/documentdb-emulator-docs to download and install.'); } return true; }; -// item to test the read and delete operations with partitionkey -let changes = {}; -changes['001'] = { - Location: 'ARG', - MessageList: ['Hi', 'how are u'] -}; +var storage = new CosmosDbPartitionedStorage(getSettings()); -// called before each test +// called before and after each test const reset = async () => { nock.cleanAll(); nock.enableNetConnect(); if (mode !== MockMode.lockdown) { let settings = getSettings(); - let client = new CosmosClient({ endpoint: settings.cosmosDbEndpoint, key: settings.authKey}); + let client = new CosmosClient({ endpoint: settings.cosmosDbEndpoint, key: settings.authKey, agent: new https.Agent({ rejectUnauthorized: false }) }); try { await client.database(settings.databaseId).delete(); } catch (err) { } - await client.databases.create({ id: databaseId }); + await client.databases.create({ id: settings.databaseId }); } }; @@ -71,35 +55,38 @@ const options = { scope: getSettings().cosmosDbEndpoint }; -const testStorage = () => { - - it('should throw on invalid options', async function() { - const { nockDone } = await usingNock(this.test, mode, options); - - // No options. Should throw. +describe('CosmosDbPartitionedStorage - Constructor Tests', function() { + it('throws when provided with null options', () => { assert.throws(() => new CosmosDbPartitionedStorage(null), ReferenceError('CosmosDbPartitionedStorageOptions is required.')); - - // No endpoint. Should throw. + }); + + it('throws when no endpoint provided', () => { const noEndpoint = getSettings(); noEndpoint.cosmosDbEndpoint = null; assert.throws(() => new CosmosDbPartitionedStorage(noEndpoint), ReferenceError('cosmosDbEndpoint for CosmosDB is required.')); + }); - // No authKey. Should throw. + it('throws when no authKey provided', () => { const noAuthKey = getSettings(); noAuthKey.authKey = null; assert.throws(() => new CosmosDbPartitionedStorage(noAuthKey), ReferenceError('authKey for CosmosDB is required.')); + }); - // No databaseId. Should throw. + it('throws when no databaseId provided', () => { const noDatabaseId = getSettings(); noDatabaseId.databaseId = null; assert.throws(() => new CosmosDbPartitionedStorage(noDatabaseId), ReferenceError('databaseId is for CosmosDB required.')); + }); - // No containerId. Should throw. + it('throws when no containerId provided', () => { const noContainerId = getSettings(); noContainerId.containerId = null; assert.throws(() => new CosmosDbPartitionedStorage(noContainerId), ReferenceError('containerId for CosmosDB is required.')); + }); + + it('passes cosmosClientOptions to CosmosClient', async function() { + const { nockDone } = await usingNock(this.test, mode, options); - // Passes CosmosClientOptions const settingsWithClientOptions = getSettings(); settingsWithClientOptions.cosmosClientOptions = { agent: new https.Agent({ rejectUnauthorized: false }), @@ -115,311 +102,122 @@ const testStorage = () => { return nockDone(); }); +}); - // NOTE: THESE TESTS REQUIRE THAT THE COSMOS DB EMULATOR IS INSTALLED AND STARTED !!!!!!!!!!!!!!!!! - it('should create an object', async function() { - if(checkEmulator()) { - const { nockDone } = await usingNock(this.test, mode, options); - - const storeItems = { - createPoco: { id: 1 }, - createPocoStoreItem: { id: 2 }, - }; - - await storage.write(storeItems); - - const readStoreItems = await storage.read(Object.keys(storeItems)); - - assert.strictEqual(storeItems.createPoco.id, readStoreItems.createPoco.id); - assert.strictEqual(storeItems.createPocoStoreItem.id, readStoreItems.createPocoStoreItem.id); - assert.notStrictEqual(readStoreItems.createPoco.eTag, null); - assert.notStrictEqual(readStoreItems.createPocoStoreItem.eTag, null); - - return nockDone(); - } +/** + * Tests do not delete&renew database between tests. Because of DoOnce, it messes with Nock recordings. + */ +describe('CosmosDbPartitionedStorage - Base Storage Tests', function() { + after('cleanup', reset); + + it('return empty object when reading unknown key', async function() { + checkEmulator(); + const { nockDone } = await usingNock(this.test, mode, options); + + const testRan = await StorageBaseTests.returnEmptyObjectWhenReadingUnknownKey(storage); + + assert.strictEqual(testRan, true); + + return nockDone(); }); - // NOTE: THESE TESTS REQUIRE THAT THE COSMOS DB EMULATOR IS INSTALLED AND STARTED !!!!!!!!!!!!!!!!! - it('should handle crazy keys', async function() { - if(checkEmulator()) { - const { nockDone } = await usingNock(this.test, mode, options); - - const key = `!@#$%^&*()~/\\><,.?';\"\`~`; - const storeItem = { id: 1 }; - const storeItems = { [key]: storeItem }; - - await storage.write(storeItems); - - const readStoreItems = await storage.read(Object.keys(storeItems)); - - assert.notStrictEqual(readStoreItems[key], null); - assert.strictEqual(readStoreItems[key].id, 1); - - return nockDone(); - } + it('throws when reading null keys', async function() { + checkEmulator(); + const { nockDone } = await usingNock(this.test, mode, options); + + const testRan = await StorageBaseTests.handleNullKeysWhenReading(storage); + + assert.strictEqual(testRan, true); + return nockDone(); }); - // NOTE: THESE TESTS REQUIRE THAT THE COSMOS DB EMULATOR IS INSTALLED AND STARTED !!!!!!!!!!!!!!!!! - it('should return empty dictionary when reading empty keys', async function() { - if(checkEmulator()) { - const { nockDone } = await usingNock(this.test, mode, options); - - const state = await storage.read([]); - assert.deepStrictEqual(state, {}); - - return nockDone(); - } + it('throws when writing null keys', async function() { + checkEmulator(); + const { nockDone } = await usingNock(this.test, mode, options); + + const testRan = await StorageBaseTests.handleNullKeysWhenWriting(storage); + + assert.strictEqual(testRan, true); + return nockDone(); }); - // NOTE: THESE TESTS REQUIRE THAT THE COSMOS DB EMULATOR IS INSTALLED AND STARTED !!!!!!!!!!!!!!!!! - it('should throw when reading null keys', async function() { - if(checkEmulator()) { - const { nockDone } = await usingNock(this.test, mode, options); - - await assert.rejects(async () => await storage.read(null), ReferenceError(`Keys are required when reading.`)); - - return nockDone(); - } + it('does not throw when writing no items', async function() { + checkEmulator(); + const { nockDone } = await usingNock(this.test, mode, options); + + const testRan = await StorageBaseTests.doesNotThrowWhenWritingNoItems(storage); + + assert.strictEqual(testRan, true); + return nockDone(); }); - // NOTE: THESE TESTS REQUIRE THAT THE COSMOS DB EMULATOR IS INSTALLED AND STARTED !!!!!!!!!!!!!!!!! - it('should throw when writing null keys', async function() { - if(checkEmulator()) { - const { nockDone } = await usingNock(this.test, mode, options); - - await assert.rejects(async () => await storage.write(null), ReferenceError(`Changes are required when writing.`)); - - return nockDone(); - } + it('create an object', async function() { + checkEmulator(); + const { nockDone } = await usingNock(this.test, mode, options); + + const testRan = await StorageBaseTests.createObject(storage); + + assert.strictEqual(testRan, true); + return nockDone(); }); - // NOTE: THESE TESTS REQUIRE THAT THE COSMOS DB EMULATOR IS INSTALLED AND STARTED !!!!!!!!!!!!!!!!! - it('should not throw when writing no items', async function() { - if(checkEmulator()) { - const { nockDone } = await usingNock(this.test, mode, options); - - await assert.doesNotReject(async () => await storage.write([])); - - return nockDone(); - } + it('handle crazy keys', async function() { + checkEmulator(); + const { nockDone } = await usingNock(this.test, mode, options); + + const testRan = await StorageBaseTests.handleCrazyKeys(storage); + + assert.strictEqual(testRan, true); + return nockDone(); }); - // NOTE: THESE TESTS REQUIRE THAT THE COSMOS DB EMULATOR IS INSTALLED AND STARTED !!!!!!!!!!!!!!!!! - it('should update an object', async function() { - if(checkEmulator()) { - const { nockDone } = await usingNock(this.test, mode, options); - - const originalStoreItems = { - pocoItem: { id: 1, count: 1 }, - pocoStoreItem: { id: 1, count: 1 }, - }; - - // first write should work - await storage.write(originalStoreItems); - - const loadedStoreItems = await storage.read(['pocoItem', 'pocoStoreItem']); - - const updatePocoItem = loadedStoreItems.pocoItem; - delete updatePocoItem.eTag; // pocoItems don't have eTag - const updatePocoStoreItem = loadedStoreItems.pocoStoreItem; - assert.notStrictEqual(updatePocoStoreItem.eTag, null); - - // 2nd write should work - updatePocoItem.count++; - updatePocoStoreItem.count++; - - await storage.write(loadedStoreItems); - - const reloadedStoreItems = await storage.read(Object.keys(loadedStoreItems)); - - const reloadedUpdatePocoItem = reloadedStoreItems.pocoItem; - const reloadedUpdatePocoStoreItem = reloadedStoreItems.pocoStoreItem; - - assert.notStrictEqual(reloadedUpdatePocoItem.eTag, null); - assert.notStrictEqual(updatePocoStoreItem.eTag, reloadedUpdatePocoStoreItem.eTag); - assert.strictEqual(reloadedUpdatePocoItem.count, 2); - assert.strictEqual(reloadedUpdatePocoStoreItem.count, 2); - - // Write with old eTag should succeed for non-storeitem - try { - updatePocoItem.count = 123; - - await storage.write({ pocoItem: updatePocoItem }); - } catch(err) { - assert.fail('Should not throw exception on write with pocoItem'); - } - - // Write with old eTag should FAIL for storeItem - try { - updatePocoStoreItem.count = 123; - - await storage.write({ pocoStoreItem, updatePocoStoreItem }); - assert.fail('Should have thrown exception on write with store item because of old eTag'); - } catch(err) { } - - const reloadedStoreItems2 = await storage.read(['pocoItem', 'pocoStoreItem']); - - const reloadedPocoItem2 = reloadedStoreItems2.pocoItem; - delete reloadedPocoItem2.eTag; - const reloadedPocoStoreItem2 = reloadedStoreItems2.pocoStoreItem; - - assert.strictEqual(reloadedPocoItem2.count, 123); - assert.strictEqual(reloadedPocoStoreItem2.count, 2); - - // write with wildcard etag should work - reloadedPocoItem2.count = 100; - reloadedPocoStoreItem2.count = 100; - reloadedPocoStoreItem2.eTag = '*'; - - const wildcardEtagdict = { - pocoItem: reloadedPocoItem2, - pocoStoreItem: reloadedPocoStoreItem2 - }; - - await storage.write(wildcardEtagdict); - - const reloadedStoreItems3 = await storage.read(['pocoItem', 'pocoStoreItem']); - - assert.strictEqual(reloadedStoreItems3.pocoItem.count, 100); - assert.strictEqual(reloadedStoreItems3.pocoStoreItem.count, 100); - - // Write with empty etag should not work - try { - const reloadedStoreItems4 = await storage.read(['pocoStoreItem']); - const reloadedStoreItem4 = reloadedStoreItems4.pocoStoreItem; - - assert.notStrictEqual(reloadedStoreItem4, null); - - reloadedStoreItem4.eTag = ''; - const dict2 = { pocoStoreItem: reloadedStoreItem4 }; - - await storage.write(dict2); - - assert.fail('Should have thrown exception on write with storeItem because of empty eTag'); - } catch (err) { } - - const finalStoreItems = await storage.read(['pocoItem', 'pocoStoreItem']); - assert.strictEqual(finalStoreItems.pocoItem.count, 100); - assert.strictEqual(finalStoreItems.pocoStoreItem.count, 100); - - return nockDone(); - } + it('update an object', async function() { + checkEmulator(); + const { nockDone } = await usingNock(this.test, mode, options); + + const testRan = await StorageBaseTests.updateObject(storage); + + assert.strictEqual(testRan, true); + return nockDone(); }); - // NOTE: THESE TESTS REQUIRE THAT THE COSMOS DB EMULATOR IS INSTALLED AND STARTED !!!!!!!!!!!!!!!!! - it('should delete an object', async function() { - if(checkEmulator()) { - const { nockDone } = await usingNock(this.test, mode, options); - - const storeItems = { - delete1: { id: 1, count: 1 } - }; - - await storage.write(storeItems); - - const readStoreItems = await storage.read(['delete1']); - - assert.notStrictEqual(readStoreItems.delete1.eTag, null); - assert.strictEqual(readStoreItems.delete1.count, 1); - - await storage.delete(['delete1']); - - const reloadedStoreItems = await storage.read(['delete1']); - - assert.strictEqual(reloadedStoreItems.delete1, undefined); - - return nockDone(); - } + it('delete an object', async function() { + checkEmulator(); + const { nockDone } = await usingNock(this.test, mode, options); + + const testRan = await StorageBaseTests.deleteObject(storage); + + assert.strictEqual(testRan, true); + return nockDone(); }); - // NOTE: THESE TESTS REQUIRE THAT THE COSMOS DB EMULATOR IS INSTALLED AND STARTED !!!!!!!!!!!!!!!!! - it('should not throw when deleting unknown object', async function() { - if(checkEmulator()) { - const { nockDone } = await usingNock(this.test, mode, options); + it('does not throw when deleting an unknown object', async function() { + checkEmulator(); + const { nockDone } = await usingNock(this.test, mode, options); - await assert.doesNotReject(async () => { - await storage.delete(['unknown_key']); - }); - - return nockDone(); - } + const testRan = await StorageBaseTests.deleteUnknownObject(storage); + + assert.strictEqual(testRan, true); + return nockDone(); }); - // NOTE: THESE TESTS REQUIRE THAT THE COSMOS DB EMULATOR IS INSTALLED AND STARTED !!!!!!!!!!!!!!!!! - it('should correctly proceed through a waterfall dialog', async function() { - if(checkEmulator()) { - const { nockDone } = await usingNock(this.test, mode, options); - - const convoState = new ConversationState(storage); - - const dialogState = convoState.createProperty('dialogState'); - const dialogs = new DialogSet(dialogState); - - const adapter = new TestAdapter(async (turnContext) => { - const dc = await dialogs.createContext(turnContext); - - await dc.continueDialog(); - if (!turnContext.responded) { - await dc.beginDialog('waterfallDialog'); - } - }) - .use(new AutoSaveStateMiddleware(convoState)); - - dialogs.add(new TextPrompt('textPrompt', async (promptContext) => { - const result = promptContext.recognized.value; - if (result.length > 3) { - const succeededMessage = MessageFactory.text(`You got it at the ${ promptContext.attemptCount }th try!`); - await promptContext.context.sendActivity(succeededMessage); - return true; - } - - const reply = MessageFactory.text(`Please send a name that is longer than 3 characters. ${ promptContext.attemptCount }`); - await promptContext.context.sendActivity(reply); - return false; - })); - - const steps = [ - async (stepContext) => { - assert.strictEqual(typeof(stepContext.activeDialog.state['stepIndex']), 'number'); - await stepContext.context.sendActivity('step1'); - return Dialog.EndOfTurn; - }, - async (stepContext) => { - assert.strictEqual(typeof(stepContext.activeDialog.state['stepIndex']), 'number'); - await stepContext.prompt('textPrompt', { prompt: MessageFactory.text('Please type your name.') }); - }, - async (stepContext) => { - assert.strictEqual(typeof(stepContext.activeDialog.state['stepIndex']), 'number'); - await stepContext.context.sendActivity('step3'); - return Dialog.EndOfTurn; - }, - ]; - - dialogs.add(new WaterfallDialog('waterfallDialog', steps)); - - await adapter.send('hello') - .assertReply('step1') - .send('hello') - .assertReply('Please type your name.') - .send('hi') - .assertReply('Please send a name that is longer than 3 characters. 1') - .send('hi') - .assertReply('Please send a name that is longer than 3 characters. 2') - .send('hi') - .assertReply('Please send a name that is longer than 3 characters. 3') - .send('Kyle') - .assertReply('You got it at the 4th try!') - .assertReply('step3') - .startTest(); - - return nockDone(); - } + it('performs batch operations', async function() { + checkEmulator(); + const { nockDone } = await usingNock(this.test, mode, options); + + const testRan = await StorageBaseTests.performBatchOperations(storage); + + assert.strictEqual(testRan, true); + return nockDone(); }); -}; -describe('CosmosDbPartitionedStorage', function() { - this.timeout(20000); - before('cleanup', reset); - testStorage(); - after('cleanup', reset); -}); + it('proceeds through a waterfall dialog', async function() { + checkEmulator(); + const { nockDone } = await usingNock(this.test, mode, options); + + const testRan = await StorageBaseTests.proceedsThroughWaterfall(storage); + + assert.strictEqual(testRan, true); + return nockDone(); + }); +}); \ No newline at end of file diff --git a/libraries/botbuilder-azure/tests/cosmosDbStorage.test.js b/libraries/botbuilder-azure/tests/cosmosDbStorage.test.js index 1c0204a1c4..7f12dd73e8 100644 --- a/libraries/botbuilder-azure/tests/cosmosDbStorage.test.js +++ b/libraries/botbuilder-azure/tests/cosmosDbStorage.test.js @@ -1,26 +1,33 @@ const assert = require('assert'); const { CosmosDbStorage } = require('../'); +const { StorageBaseTests } = require('../../botbuilder-core/tests/storageBaseTests'); const { DocumentClient, UriFactory } = require('documentdb'); const { MockMode, usingNock } = require('./mockHelper'); const nock = require('nock'); +const fs = require('fs'); +/** + * @param mode controls the nock mode used for the tests. Available options found in ./mockHelper.js. + */ const mode = process.env.MOCK_MODE ? process.env.MOCK_MODE : MockMode.lockdown; -// Endpoint and Authkey for the CosmosDB Emulator running locally -const getSettings = (partitionKey) => ({ +const emulatorPath = 'C:/Program Files/Azure Cosmos DB Emulator/CosmosDB.Emulator.exe'; + +// Endpoint and authKey for the CosmosDB Emulator running locally +const getSettings = (partitionKey=undefined) => ({ serviceEndpoint: 'https://localhost:8081', authKey: 'C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw==', databaseId: 'test-db', collectionId: 'bot-storage', - partitionKey: partitionKey, + partitionKey }); -// item to test the read and delete operations with partitionkey -let changes = {}; -changes['001'] = { - Location: 'ARG', - MessageList: ['Hi', 'how are u'] -} +const checkEmulator = () => { + if (!fs.existsSync(emulatorPath)) { + console.warn('This test requires CosmosDB Emulator! go to https://aka.ms/documentdb-emulator-docs to download and install.'); + } + return true; +}; // called before each test const reset = (done) => { @@ -37,324 +44,27 @@ const reset = (done) => { const policyConfigurator = (policy) => policy.DisableSSLVerification = true; -const print = (o) => { - return JSON.stringify(o, null, ' '); -}; - const options = { scope: getSettings().serviceEndpoint -} +}; -testStorage = function () { - - const noEmulatorMessage = 'skipping test because azure storage emulator is not running'; - - it('delete with partition key', function () { - return usingNock(this.test, mode, options) - .then(({ nockDone, context }) => { - let storage = new CosmosDbStorage(getSettings('ARG'), policyConfigurator); - return (storage.write(changes)) - .then(() => storage.delete(['001'])) - .then(() => storage.read(['001'])) - .then(result => { - assert(!result['001'], 'result should not be found'); - }).catch(reason => { - if (reason.code == 'ECONNREFUSED') { - console.log(noEmulatorMessage); - } else { - assert(false, `should not throw: ${print(reason)}`); - } - }) - .then(nockDone); - }); - }); - - - it('delete without partition key', function () { - return usingNock(this.test, mode, options) - .then(({ nockDone, context }) => { - let storage = new CosmosDbStorage(getSettings(), policyConfigurator); - return (storage.write(changes)) - .then(() => storage.delete(['001'])) - .catch((reason) => { - assert(reason.code === 400, `should throw an exception, code 400: PartitionKey value must be supplied for this operation.`); - }) - .then(nockDone); - }); - }); - - it('read with partition key', function () { - return usingNock(this.test, mode, options) - .then(({ nockDone, context }) => { - let storage = new CosmosDbStorage(getSettings('ARG'), policyConfigurator); - return (storage.write(changes)) - .then(() => storage.read(['001'])) - .then(result => { - assert(result['001'], 'result should be found'); - }).catch(reason => { - if (reason.code == 'ECONNREFUSED') { - console.log(noEmulatorMessage); - } else { - assert(false, `should not throw: ${print(reason)}`); - } - }) - .then(nockDone); - }); - }); - - it('read without partition key', function () { - return usingNock(this.test, mode, options) - .then(({ nockDone, context }) => { - let storage = new CosmosDbStorage(getSettings(), policyConfigurator); - return (storage.write(changes)) - .then(() => storage.read(['001'])) - .catch((reason) => { - assert(reason.code === 400, `should throw an exception, code 400: Cross partition query is required but disabled.`); - }) - .then(nockDone); - }); - }); - - it('read of unknown key', function () { - return usingNock(this.test, mode, options) - .then(({ nockDone, context }) => { - let storage = new CosmosDbStorage(getSettings(), policyConfigurator); - return storage.read(['unk']) - .then((result) => { - assert(result != null, 'result should be object'); - assert(!result.unk, 'key should be undefined'); - }) - .catch(reason => { - if (reason.code == 'ECONNREFUSED') { - console.log(noEmulatorMessage); - } else { - assert(false, `should not throw: ${print(reason)}`); - } - }) - .then(nockDone); - }); - }); - - it('key creation', function () { - return usingNock(this.test, mode, options) - .then(({ nockDone, context }) => { - let storage = new CosmosDbStorage(getSettings(), policyConfigurator); - return storage.write({ keyCreate: { count: 1 } }) - .then(() => storage.read(['keyCreate'])) - .then((result) => { - assert(result != null, 'result should be object'); - assert(result.keyCreate != null, 'keyCreate should be defined'); - assert(result.keyCreate.count == 1, 'object should have count of 1'); - assert(!result.eTag, 'ETag should be defined'); - }) - .catch(reason => { - if (reason.code == 'ECONNREFUSED') { - console.log(noEmulatorMessage); - } else { - assert(false, `should not throw: ${print(reason)}`); - } - }) - .then(nockDone); - }); - }); - - it('key update', function () { - return usingNock(this.test, mode, options) - .then(({ nockDone, context }) => { - let storage = new CosmosDbStorage(getSettings(), policyConfigurator); - return storage.write({ keyUpdate: { count: 1 } }) - .then(() => storage.read(['keyUpdate'])) - .then((result) => { - result.keyUpdate.count = 2; - return storage.write(result) - .then(() => storage.read(['keyUpdate'])) - .then((updated) => { - assert(updated.keyUpdate.count == 2, 'object should be updated'); - assert(updated.keyUpdate.eTag != result.keyUpdate.eTag, 'Etag should be updated on write'); - }); - }).catch(reason => { - if (reason.code == 'ECONNREFUSED') { - console.log(noEmulatorMessage); - } else { - assert(false, `should not throw: ${print(reason)}`); - } - }) - .then(nockDone); - }); - }); - - it('invalid eTag', function () { - return usingNock(this.test, mode, options) - .then(({ nockDone, context }) => { - let storage = new CosmosDbStorage(getSettings(), policyConfigurator); - return storage.write({ keyUpdate2: { count: 1 } }) - .then(() => storage.read(['keyUpdate2'])) - .then((result) => { - result.keyUpdate2.count = 2; - return storage.write(result).then(() => { - result.keyUpdate2.count = 3; - return storage.write(result) - .then(() => assert(false, `should throw an exception on second write with same etag: ${print(reason)}`)) - .catch((reason) => { }); - }); - }) - .catch(reason => { - if (reason.code == 'ECONNREFUSED') { - console.log(noEmulatorMessage); - } else { - assert(false, `should not throw: ${print(reason)}`); - } - }) - .then(nockDone); - }); - }); - - it('wildcard eTag', function () { - return usingNock(this.test, mode, options) - .then(({ nockDone, context }) => { - let storage = new CosmosDbStorage(getSettings(), policyConfigurator); - return storage.write({ keyUpdate3: { count: 1 } }) - .then(() => storage.read(['keyUpdate3'])) - .then((result) => { - result.keyUpdate3.eTag = '*'; - result.keyUpdate3.count = 2; - return storage.write(result).then(() => { - result.keyUpdate3.count = 3; - return storage.write(result) - .catch((reason) => assert(false, `should NOT fail on etag writes with wildcard: ${print(reason)}`)); - }); - }) - .catch(reason => { - if (reason.code == 'ECONNREFUSED') { - console.log(noEmulatorMessage); - } else { - assert(false, `should not throw: ${print(reason)}`); - } - }) - .then(nockDone); - }); - }); - - it('delete unknown', function () { - return usingNock(this.test, mode, options) - .then(({ nockDone, context }) => { - let storage = new CosmosDbStorage(getSettings(), policyConfigurator); - return storage.delete(['unknown']) - .catch(reason => { - if (reason.code == 'ECONNREFUSED') { - console.log(noEmulatorMessage); - } else { - console.log(reason) - assert(false, `should not throw: ${print(reason)}`); - } - }) - .then(nockDone); - }); - }); - - it('delete known', function () { - return usingNock(this.test, mode, options) - .then(({ nockDone, context }) => { - let storage = new CosmosDbStorage(getSettings(), policyConfigurator); - return storage.write({ delete1: { count: 1 } }) - .then(() => storage.delete(['delete1'])) - .then(() => storage.read(['delete1'])) - .then(result => { - // if (result.delete1) - // console.log(JSON.stringify(result.delete1)); - assert(!result.delete1, 'delete1 should not be found'); - }) - .catch(reason => { - if (reason.code == 'ECONNREFUSED') { - console.log(noEmulatorMessage); - } else { - assert(false, `should not throw: ${print(reason)}`); - } - }) - .then(nockDone); - }); - }); - - it('batch operations', function () { - return usingNock(this.test, mode, options) - .then(({ nockDone, context }) => { - let storage = new CosmosDbStorage(getSettings(), policyConfigurator); - return storage.write({ - batch1: { count: 10 }, - batch2: { count: 20 }, - batch3: { count: 30 }, - }) - .then(() => storage.read(['batch1', 'batch2', 'batch3'])) - .then((result) => { - assert(result.batch1 != null, 'batch1 should exist and doesnt'); - assert(result.batch2 != null, 'batch2 should exist and doesnt'); - assert(result.batch3 != null, 'batch3 should exist and doesnt'); - assert(result.batch1.count > 0, 'batch1 should have count and doesnt'); - assert(result.batch2.count > 0, 'batch2 should have count and doesnt'); - assert(result.batch3.count > 0, 'batch3 should have count and doesnt'); - assert(result.batch1.eTag != null, 'batch1 should have etag and doesnt'); - assert(result.batch2.eTag != null, 'batch2 should have etag and doesnt'); - assert(result.batch3.eTag != null, 'batch3 should have etag and doesnt'); - }) - .then(() => storage.delete(['batch1', 'batch2', 'batch3'])) - .then(() => storage.read(['batch1', 'batch2', 'batch3'])) - .then((result) => { - assert(!result.batch1, 'batch1 should not exist and does'); - assert(!result.batch2, 'batch2 should not exist and does'); - assert(!result.batch3, 'batch3 should not exist and does'); - }) - .catch(reason => { - if (reason.code == 'ECONNREFUSED') { - console.log(noEmulatorMessage); - } else { - assert(false, `should not throw: ${print(reason)}`); - } - }) - .then(nockDone); - }); - }); - - it('crazy keys work', function () { - return usingNock(this.test, mode, options) - .then(({ nockDone, context }) => { - let storage = new CosmosDbStorage(getSettings(), policyConfigurator); - let obj = {}; - let crazyKey = '!@#$%^&*()_+??><":QASD~`'; - obj[crazyKey] = { count: 1 }; - return storage.write(obj) - .then(() => storage.read([crazyKey])) - .then((result) => { - assert(result != null, 'result should be object'); - assert(result[crazyKey], 'keyCreate should be defined'); - assert(result[crazyKey].count == 1, 'object should have count of 1'); - assert(result[crazyKey].eTag, 'ETag should be defined'); - }) - .catch(reason => { - if (reason.code == 'ECONNREFUSED') { - console.log(noEmulatorMessage); - } else { - console.log(reason) - assert(false, `should not throw: ${print(reason)}`); - } - }) - .then(nockDone); - }); - }); - - it('should call connectionPolicyConfigurator', function () { - let policy = null; - let storage = new CosmosDbStorage(getSettings(), (policyInstance) => policy = policyInstance); +const storage = new CosmosDbStorage(getSettings(), policyConfigurator); +const partitionKey = 'ARG'; +const partitionedStorage = new CosmosDbStorage(getSettings(partitionKey), policyConfigurator); - assert(policy != null, 'connectionPolicyConfigurator should have been called.') - }); +// item to test the read and delete operations with partitionkey +let changes = {}; +changes['001'] = { + Location: partitionKey, + MessageList: ['Hi', 'how are u'] } -describe('CosmosDbStorage Constructor', function () { - it('missing settings should throw', function () { +describe('CosmosDbStorage - Constructor Tests', function() { + it('missing settings should throw', function() { assert.throws(() => new CosmosDbStorage(), Error, 'constructor should have thrown error about missing settings.'); }); - it('missing settings endpoint should be thrown - null value', function () { + it('missing settings endpoint should be thrown - null value', function() { let testSettings = { serviceEndpoint: null, authKey: 'testKey', @@ -365,7 +75,7 @@ describe('CosmosDbStorage Constructor', function () { assert.throws(() => new CosmosDbStorage(testSettings), Error, 'constructor should have thrown error about missing service Endpoint.') }); - it('missing settings endpoint should be thrown - empty value', function () { + it('missing settings endpoint should be thrown - empty value', function() { let testSettings = { serviceEndpoint: '', authKey: 'testKey', @@ -376,7 +86,7 @@ describe('CosmosDbStorage Constructor', function () { assert.throws(() => new CosmosDbStorage(testSettings), Error, 'constructor should have thrown error about missing service Endpoint.') }); - it('missing settings endpoint should be thrown - white spaces', function () { + it('missing settings endpoint should be thrown - white spaces', function() { let testSettings = { serviceEndpoint: ' ', authKey: 'testKey', @@ -387,7 +97,7 @@ describe('CosmosDbStorage Constructor', function () { assert.throws(() => new CosmosDbStorage(testSettings), Error, 'constructor should have thrown error about missing service Endpoint.') }); - it('missing settings authKey should be thrown - null value', function () { + it('missing settings authKey should be thrown - null value', function() { let testSettings = { serviceEndpoint: 'testEndpoint', authKey: null, @@ -398,7 +108,7 @@ describe('CosmosDbStorage Constructor', function () { assert.throws(() => new CosmosDbStorage(testSettings), Error, 'constructor should have thrown error about missing authKey.') }); - it('missing settings authKey should be thrown - empty value', function () { + it('missing settings authKey should be thrown - empty value', function() { let testSettings = { serviceEndpoint: 'testEndpoint', authKey: '', @@ -409,7 +119,7 @@ describe('CosmosDbStorage Constructor', function () { assert.throws(() => new CosmosDbStorage(testSettings), Error, 'constructor should have thrown error about missing authKey.') }); - it('missing settings authKey should be thrown - white spaces', function () { + it('missing settings authKey should be thrown - white spaces', function() { let testSettings = { serviceEndpoint: 'testEndpoint', authKey: ' ', @@ -420,7 +130,7 @@ describe('CosmosDbStorage Constructor', function () { assert.throws(() => new CosmosDbStorage(testSettings), Error, 'constructor should have thrown error about missing authKey.') }); - it('missing settings databaseId should be thrown - null value', function () { + it('missing settings databaseId should be thrown - null value', function() { let testSettings = { serviceEndpoint: 'testEndpoint', authKey: 'testKey', @@ -431,7 +141,7 @@ describe('CosmosDbStorage Constructor', function () { assert.throws(() => new CosmosDbStorage(testSettings), Error, 'constructor should have thrown error about missing database ID.') }); - it('missing settings databaseId should be thrown - empty value', function () { + it('missing settings databaseId should be thrown - empty value', function() { let testSettings = { serviceEndpoint: 'testEndpoint', authKey: 'testKey', @@ -442,7 +152,7 @@ describe('CosmosDbStorage Constructor', function () { assert.throws(() => new CosmosDbStorage(testSettings), Error, 'constructor should have thrown error about missing database ID.') }); - it('missing settings databaseId should be thrown - white spaces', function () { + it('missing settings databaseId should be thrown - white spaces', function() { let testSettings = { serviceEndpoint: 'testEndpoint', authKey: 'testKey', @@ -453,7 +163,7 @@ describe('CosmosDbStorage Constructor', function () { assert.throws(() => new CosmosDbStorage(testSettings), Error, 'constructor should have thrown error about missing database ID.') }); - it('missing settings collectionId should be thrown - null value', function () { + it('missing settings collectionId should be thrown - null value', function() { let testSettings = { serviceEndpoint: 'testEndpoint', authKey: 'testKey', @@ -464,7 +174,7 @@ describe('CosmosDbStorage Constructor', function () { assert.throws(() => new CosmosDbStorage(testSettings), Error, 'constructor should have thrown error about missing collection ID.') }); - it('missing settings collectionId should be thrown - empty value', function () { + it('missing settings collectionId should be thrown - empty value', function() { let testSettings = { serviceEndpoint: 'testEndpoint', authKey: 'testKey', @@ -475,7 +185,7 @@ describe('CosmosDbStorage Constructor', function () { assert.throws(() => new CosmosDbStorage(testSettings), Error, 'constructor should have thrown error about missing collection ID.') }); - it('missing settings collectionId should be thrown - white spaces', function () { + it('missing settings collectionId should be thrown - white spaces', function() { let testSettings = { serviceEndpoint: 'testEndpoint', authKey: 'testKey', @@ -487,44 +197,211 @@ describe('CosmosDbStorage Constructor', function () { }); }); -describe('CosmosDbStorage', function () { - this.timeout(20000); +describe('CosmosDbStorage - Base Storage Tests', function() { + before('cleanup', reset); + after('cleanup', reset); + + it('return empty object when reading unknown key', async function() { + checkEmulator(); + const { nockDone } = await usingNock(this.test, mode, options); + + const testRan = await StorageBaseTests.returnEmptyObjectWhenReadingUnknownKey(storage); + + assert.strictEqual(testRan, true); + + return nockDone(); + }); + + it('throws when reading null keys', async function() { + checkEmulator(); + const { nockDone } = await usingNock(this.test, mode, options); + + const testRan = await StorageBaseTests.handleNullKeysWhenReading(storage); + + assert.strictEqual(testRan, true); + return nockDone(); + }); + + it('throws when writing null keys', async function() { + checkEmulator(); + const { nockDone } = await usingNock(this.test, mode, options); + + const testRan = await StorageBaseTests.handleNullKeysWhenWriting(storage); + + assert.strictEqual(testRan, true); + return nockDone(); + }); + + it('does not throw when writing no items', async function() { + checkEmulator(); + const { nockDone } = await usingNock(this.test, mode, options); + + const testRan = await StorageBaseTests.doesNotThrowWhenWritingNoItems(storage); + + assert.strictEqual(testRan, true); + return nockDone(); + }); + + it('create an object', async function() { + checkEmulator(); + const { nockDone } = await usingNock(this.test, mode, options); + + const testRan = await StorageBaseTests.createObject(storage); + + assert.strictEqual(testRan, true); + return nockDone(); + }); + + it('handle crazy keys', async function() { + checkEmulator(); + const { nockDone } = await usingNock(this.test, mode, options); + + const testRan = await StorageBaseTests.handleCrazyKeys(storage); + + assert.strictEqual(testRan, true); + return nockDone(); + }); + + it('update an object', async function() { + checkEmulator(); + const { nockDone } = await usingNock(this.test, mode, options); + + const testRan = await StorageBaseTests.updateObject(storage); + + assert.strictEqual(testRan, true); + return nockDone(); + }); + + it('delete an object', async function() { + checkEmulator(); + const { nockDone } = await usingNock(this.test, mode, options); + + const testRan = await StorageBaseTests.deleteObject(storage); + + assert.strictEqual(testRan, true); + return nockDone(); + }); + + it('does not throw when deleting an unknown object', async function() { + checkEmulator(); + const { nockDone } = await usingNock(this.test, mode, options); + + const testRan = await StorageBaseTests.deleteUnknownObject(storage); + + assert.strictEqual(testRan, true); + return nockDone(); + }); + + it('performs batch operations', async function() { + checkEmulator(); + const { nockDone } = await usingNock(this.test, mode, options); + + const testRan = await StorageBaseTests.performBatchOperations(storage); + + assert.strictEqual(testRan, true); + return nockDone(); + }); + + it('proceeds through a waterfall dialog', async function() { + checkEmulator(); + const { nockDone } = await usingNock(this.test, mode, options); + + const testRan = await StorageBaseTests.proceedsThroughWaterfall(storage); + + assert.strictEqual(testRan, true); + return nockDone(); + }); + + it('should call connectionPolicyConfigurator', function() { + let policy = null; + new CosmosDbStorage(getSettings(), (policyInstance) => policy = policyInstance); + + assert.notStrictEqual(policy, null); + }); +}); + +// PartitionKeys are deprecated. Tests are here to ensure backwards compatibility of changes +describe('CosmosDbStorage - PartitionKey Tests', function() { before('cleanup', reset); - testStorage(); after('cleanup', reset); + + it('create and read an object with partitionKey', async function() { + checkEmulator(); + const { nockDone } = await usingNock(this.test, mode, options); + + await storage.write(changes); + const result = await storage.read(['001']); + + assert.ok(result['001']); + return nockDone(); + }); + + it('update an object with partitionKey', async function() { + checkEmulator(); + const { nockDone } = await usingNock(this.test, mode, options); + + await storage.write({ keyUpdate: { count: 1 }, Location: partitionKey }); + const result = await storage.read(['keyUpdate']); + + assert.strictEqual(result.keyUpdate.count, 1); + + result.keyUpdate.count = 2; + await storage.write(result); + const updated = await storage.read(['keyUpdate']); + + assert.strictEqual(updated.keyUpdate.count, 2); + assert.notStrictEqual(updated.keyUpdate.eTag, result.keyUpdate.eTag); + + return nockDone(); + }); + + it('delete an object with partitionKey', async function() { + checkEmulator(); + const { nockDone } = await usingNock(this.test, mode, options); + + await storage.write(changes); + let result = await storage.read(['001']); + assert.ok(result['001']); + + await storage.delete(['001']); + result = await storage.read(['001']); + + assert.strictEqual(Object.keys(result).length, 0); + return nockDone(); + }); }); // These tests use the same Cosmos DB configuration, but are not expected to call the Cosmos DB Emulator. -describe('CosmosDbStorage - Offline tests', function () { - it('should return empty object when null is passed in to read()', async function () { +describe('CosmosDbStorage - Offline tests', function() { + it('should return empty object when null is passed in to read()', async function() { const storage = new CosmosDbStorage(getSettings(), policyConfigurator); const storeItems = await storage.read(null); - assert.deepEqual(storeItems, {}, `did not receive empty object, instead received ${JSON.stringify(storeItems)}`); + assert.deepEqual(storeItems, {}, `did not receive empty object, instead received ${ JSON.stringify(storeItems) }`); }); - it('should return empty object when no keys are passed in to read()', async function () { + it('should return empty object when no keys are passed in to read()', async function() { const storage = new CosmosDbStorage(getSettings(), policyConfigurator); const storeItems = await storage.read([]); - assert.deepEqual(storeItems, {}, `did not receive empty object, instead received ${JSON.stringify(storeItems)}`); + assert.deepEqual(storeItems, {}, `did not receive empty object, instead received ${ JSON.stringify(storeItems) }`); }); - it('should not blow up when no changes are passed in to write()', async function () { + it('should not blow up when no changes are passed in to write()', async function() { const storage = new CosmosDbStorage(getSettings(), policyConfigurator); - const storeItems = await storage.write({}); + await assert.doesNotReject(async () => await storage.write({})); }); - it('should not blow up when null is passed in to write()', async function () { + it('should not blow up when null is passed in to write()', async function() { const storage = new CosmosDbStorage(getSettings(), policyConfigurator); - const storeItems = await storage.write(null); + await assert.doesNotReject(async () => await storage.write(null)); }); - it('should not blow up when no keys are passed in to delete()', async function () { + it('should not blow up when no keys are passed in to delete()', async function() { const storage = new CosmosDbStorage(getSettings(), policyConfigurator); - const storeItems = await storage.delete([]); + await assert.doesNotReject(async () => await storage.delete([])); }); - it('should not blow up when null is passed in to delete()', async function () { + it('should not blow up when null is passed in to delete()', async function() { const storage = new CosmosDbStorage(getSettings(), policyConfigurator); - const storeItems = await storage.delete(null); + await assert.doesNotReject(async () => await storage.delete(null)); }); }); \ No newline at end of file diff --git a/libraries/botbuilder-azure/tests/mockHelper.js b/libraries/botbuilder-azure/tests/mockHelper.js index d48c9d7211..88a7781fc6 100644 --- a/libraries/botbuilder-azure/tests/mockHelper.js +++ b/libraries/botbuilder-azure/tests/mockHelper.js @@ -3,11 +3,18 @@ const path = require('path'); const nockBack = require('nock').back; +/** + * https://github.com/nock/nock#modes + * Setting environment: + * PowerShell: $env:MOCK_MODE="" + * Command Prompt: set MOCK_MODE= + * VS Code's launch.json: "env": { "MOCK_MODE": "" }, + */ const MockMode = Object.freeze({ - 'wild': 'wild', - 'dryrun': 'dryrun', - 'record': 'record', - 'lockdown': 'lockdown' + wild: 'wild', + dryrun: 'dryrun', + record: 'record', + lockdown: 'lockdown' }); function usingNock(test, mode, options = null) { diff --git a/libraries/botbuilder-core/src/memoryStorage.ts b/libraries/botbuilder-core/src/memoryStorage.ts index a5087fa256..903a7c2fc4 100644 --- a/libraries/botbuilder-core/src/memoryStorage.ts +++ b/libraries/botbuilder-core/src/memoryStorage.ts @@ -39,6 +39,7 @@ export class MemoryStorage implements Storage { public read(keys: string[]): Promise { return new Promise((resolve: any, reject: any): void => { + if (!keys) { throw new ReferenceError(`Keys are required when reading.`); } const data: StoreItems = {}; keys.forEach((key: string) => { const item: string = this.memory[key]; @@ -59,10 +60,11 @@ export class MemoryStorage implements Storage { } return new Promise((resolve: any, reject: any): void => { + if (!changes) { throw new ReferenceError(`Changes are required when writing.`); } Object.keys(changes).forEach((key: any) => { const newItem: any = changes[key]; const old: string = this.memory[key]; - if (!old || newItem.eTag === '*') { + if (!old || newItem.eTag === '*' || !newItem.eTag) { saveItem(key, newItem); } else { const oldItem: any = JSON.parse(old); diff --git a/libraries/botbuilder-core/tests/memoryStorage.test.js b/libraries/botbuilder-core/tests/memoryStorage.test.js index 4347e0929d..116e5dd83c 100644 --- a/libraries/botbuilder-core/tests/memoryStorage.test.js +++ b/libraries/botbuilder-core/tests/memoryStorage.test.js @@ -1,134 +1,82 @@ const assert = require('assert'); const { MemoryStorage } = require('../'); +const { StorageBaseTests } = require('../../botbuilder-core/tests/storageBaseTests'); +const newStorage = new MemoryStorage(); -function testStorage(storage) { - it('read of unknown key', function () { - return storage.read(['unk']) - .catch((reson) => assert(false, 'should not throw on read of unknown key')) - .then((result) => { - assert(result != null, 'result should be object'); - assert(!result.unk, 'key should be undefined'); - }); +function testStorage(storage=newStorage) { + it('return empty object when reading unknown key', async function() { + const testRan = await StorageBaseTests.returnEmptyObjectWhenReadingUnknownKey(storage); + + assert.strictEqual(testRan, true); }); - it('key creation', function () { - return storage.write({ keyCreate: { count: 1 } }) - .then(() => storage.read(['keyCreate'])) - .then((result) => { - assert(result != null, 'result should be object'); - assert(result.keyCreate != null, 'keyCreate should be defined'); - assert(result.keyCreate.count == 1, 'object should have count of 1'); - assert(result.keyCreate.eTag, 'ETag should be defined'); - }); + it('throws when reading null keys', async function() { + const testRan = await StorageBaseTests.handleNullKeysWhenReading(storage); + + assert.strictEqual(testRan, true); }); - it('key update', function () { - return storage.write({ keyUpdate: { count: 1 } }) - .then(() => storage.read(['keyUpdate'])) - .then((result) => { - result.keyUpdate.count = 2; - return storage.write(result) - .then(() => storage.read(['keyUpdate'])) - .then((updated) => { - assert(updated.keyUpdate.count == 2, 'object should be updated'); - assert(updated.keyUpdate.eTag != result.keyUpdate.eTag, 'Etag should be updated on write'); - }); - }) + it('throws when writing null keys', async function() { + const testRan = await StorageBaseTests.handleNullKeysWhenWriting(storage); + + assert.strictEqual(testRan, true); }); - it('invalid eTag', function () { - return storage.write({ keyUpdate2: { count: 1 } }) - .then(() => storage.read(['keyUpdate2'])) - .then((result) => { - result.keyUpdate2.count = 2; - return storage.write(result).then(() => { - result.keyUpdate2.count = 3; - return storage.write(result) - .then(() => assert(false, 'should throw an exception on second write with same etag')) - .catch((reason) => { }); - }); - }); + it('does not throw when writing no items', async function() { + const testRan = await StorageBaseTests.doesNotThrowWhenWritingNoItems(storage); + + assert.strictEqual(testRan, true); }); - it('wildcard eTag', function () { - return storage.write({ keyUpdate3: { count: 1 } }) - .then(() => storage.read(['keyUpdate3'])) - .then((result) => { - result.keyUpdate3.eTag = '*'; - result.keyUpdate3.count = 2; - return storage.write(result).then(() => { - result.keyUpdate3.count = 3; - return storage.write(result) - .catch((reason) => assert(false, 'should NOT fail on etag writes with wildcard')); - }); - }); + it('create an object', async function() { + const testRan = await StorageBaseTests.createObject(storage); + + assert.strictEqual(testRan, true); }); - it('delete unknown', function () { - return storage.delete(['unknown']) - .catch((reason) => assert(false, 'should not fail delete of unknown key')); + it('handle crazy keys', async function() { + const testRan = await StorageBaseTests.handleCrazyKeys(storage); + + assert.strictEqual(testRan, true); }); - it('delete known', function () { - return storage.write({ delete1: { count: 1 } }) - .then(() => storage.delete(['delete1'])) - .then(() => storage.read(['delete1'])) - .then(result => { - if (result.delete1) - console.log(JSON.stringify(result.delete1)); - assert(!result.delete1, 'delete1 should not be found'); - }); + it('update an object', async function() { + const testRan = await StorageBaseTests.updateObject(storage); + + assert.strictEqual(testRan, true); }); - it('batch operations', function () { - return storage.write({ - batch1: { count: 10 }, - batch2: { count: 20 }, - batch3: { count: 30 }, - }) - .then(() => storage.read(['batch1', 'batch2', 'batch3'])) - .then((result) => { - assert(result.batch1 != null, 'batch1 should exist and doesnt'); - assert(result.batch2 != null, 'batch2 should exist and doesnt'); - assert(result.batch3 != null, 'batch3 should exist and doesnt'); - assert(result.batch1.count > 0, 'batch1 should have count and doesnt'); - assert(result.batch2.count > 0, 'batch2 should have count and doesnt'); - assert(result.batch3.count > 0, 'batch3 should have count and doesnt'); - assert(result.batch1.eTag != null, 'batch1 should have etag and doesnt'); - assert(result.batch2.eTag != null, 'batch2 should have etag and doesnt'); - assert(result.batch3.eTag != null, 'batch3 should have etag and doesnt'); - }) - .then(() => storage.delete(['batch1', 'batch2', 'batch3'])) - .then(() => storage.read(['batch1', 'batch2', 'batch3'])) - .then((result) => { - assert(!result.batch1, 'batch1 should not exist and does'); - assert(!result.batch2, 'batch2 should not exist and does'); - assert(!result.batch3, 'batch3 should not exist and does'); - }); + it('delete an object', async function() { + const testRan = await StorageBaseTests.deleteObject(storage); + + assert.strictEqual(testRan, true); }); - it('crazy keys work', function () { - let obj = { }; - let crazyKey = '!@#$%^&*()_+??><":QASD~`'; - obj[crazyKey] = { count: 1}; - return storage.write(obj) - .then(() => storage.read([crazyKey])) - .then((result) => { - assert(result != null, 'result should be object'); - assert(result[crazyKey], 'crazyKey should be defined'); - assert(result[crazyKey].count == 1, 'object should have count of 1'); - assert(result[crazyKey].eTag, 'ETag should be defined'); - }); + it('does not throw when deleting an unknown object', async function() { + const testRan = await StorageBaseTests.deleteUnknownObject(storage); + + assert.strictEqual(testRan, true); }); + it('performs batch operations', async function() { + const testRan = await StorageBaseTests.performBatchOperations(storage); + + assert.strictEqual(testRan, true); + }); + + it('proceeds through a waterfall dialog', async function() { + const testRan = await StorageBaseTests.proceedsThroughWaterfall(storage); + + assert.strictEqual(testRan, true); + }); } -describe('MemoryStorage-Empty', function () { +describe('MemoryStorage - Empty', function() { testStorage(new MemoryStorage()); }); -describe('MemoryStorage-PreExisting', function () { +describe('MemoryStorage - PreExisting', function() { const dictionary = { 'test': JSON.stringify({counter:12})}; const storage = new MemoryStorage(dictionary); testStorage(storage); diff --git a/libraries/botbuilder-core/tests/storageBaseTests.js b/libraries/botbuilder-core/tests/storageBaseTests.js new file mode 100644 index 0000000000..501620891e --- /dev/null +++ b/libraries/botbuilder-core/tests/storageBaseTests.js @@ -0,0 +1,322 @@ +const assert = require('assert'); +const { AutoSaveStateMiddleware, ConversationState, MemoryStorage, MessageFactory, TestAdapter } = require('../lib'); +const { Dialog, DialogSet, TextPrompt, WaterfallDialog } = require('../../botbuilder-dialogs/lib'); +const { BlobStorage, CosmosDbPartitionedStorage } = require('../../botbuilder-azure/lib'); + +/** + * Base tests that all storage providers should implement in their own tests. + * They handle the storage-based assertions, internally. + * + * All tests return true if assertions pass to indicate that the code ran to completion, passing internal assertions. + * Therefore, all tests using theses static tests should strictly check that the method returns true. + * + * @example + * const testRan = await StorageBaseTests.returnEmptyObjectWhenReadingUnknownKey(storage); + * assert.strictEqual(testRan, true); + */ +class StorageBaseTests { + static async returnEmptyObjectWhenReadingUnknownKey(storage) { + const result = await storage.read(['unknown']); + + if (storage instanceof BlobStorage) { + assert.ok(result.undefined); + assert.strictEqual(Object.keys(result.undefined).length, 0); + } else { + assert.notStrictEqual(result, null); + assert.strictEqual(Object.keys(result).length, 0); + } + + return true; + } + + static async handleNullKeysWhenReading(storage) { + if (storage instanceof BlobStorage) { + await assert.rejects(async () => await storage.read(null), Error('Please provide at least one key to read from storage.')); + } else if (storage instanceof CosmosDbPartitionedStorage || storage instanceof MemoryStorage){ + await assert.rejects(async () => await storage.read(null), ReferenceError('Keys are required when reading.')); + // CosmosDbStorage and catch-all + } else { + const result = await storage.read(null); + assert.strictEqual(Object.keys(result).length, 0); + } + + return true; + } + + static async handleNullKeysWhenWriting(storage) { + if (storage instanceof BlobStorage) { + await assert.rejects(async () => await storage.write(null), Error('Please provide a StoreItems with changes to persist.')); + } else if (storage instanceof CosmosDbPartitionedStorage || storage instanceof MemoryStorage){ + await assert.rejects(async () => await storage.write(null), ReferenceError('Changes are required when writing.')); + // CosmosDbStorage and catch-all + } else { + const result = await storage.write(null); + assert.strictEqual(result, undefined); + } + + return true; + } + + static async doesNotThrowWhenWritingNoItems(storage) { + await assert.doesNotReject(async () => await storage.write([])); + + return true; + } + + static async createObject(storage) { + const storeItems = { + createPoco: { id: 1 }, + createPocoStoreItem: { id: 2 }, + }; + + await storage.write(storeItems); + + const readStoreItems = await storage.read(Object.keys(storeItems)); + + assert.strictEqual(storeItems.createPoco.id, readStoreItems.createPoco.id); + assert.strictEqual(storeItems.createPocoStoreItem.id, readStoreItems.createPocoStoreItem.id); + assert.notStrictEqual(readStoreItems.createPoco.eTag, null); + assert.notStrictEqual(readStoreItems.createPocoStoreItem.eTag, null); + + return true; + } + + static async handleCrazyKeys(storage) { + const key = `!@#$%^&*()~/\\><,.?';\"\`~`; + const storeItem = { id: 1 }; + const storeItems = { [key]: storeItem }; + + await storage.write(storeItems); + + const readStoreItems = await storage.read(Object.keys(storeItems)); + + assert.notStrictEqual(readStoreItems[key], null); + assert.strictEqual(readStoreItems[key].id, 1); + + return true; + } + + static async updateObject(storage) { + const originalStoreItems = { + pocoItem: { id: 1, count: 1 }, + pocoStoreItem: { id: 1, count: 1 }, + }; + + // first write should work + await storage.write(originalStoreItems); + + const loadedStoreItems = await storage.read(['pocoItem', 'pocoStoreItem']); + + const updatePocoItem = loadedStoreItems.pocoItem; + delete updatePocoItem.eTag; // pocoItems don't have eTag + const updatePocoStoreItem = loadedStoreItems.pocoStoreItem; + assert.notStrictEqual(updatePocoStoreItem.eTag, null); + + // 2nd write should work + updatePocoItem.count++; + updatePocoStoreItem.count++; + + await storage.write(loadedStoreItems); + + const reloadedStoreItems = await storage.read(Object.keys(loadedStoreItems)); + + const reloadedUpdatePocoItem = reloadedStoreItems.pocoItem; + const reloadedUpdatePocoStoreItem = reloadedStoreItems.pocoStoreItem; + + assert.notStrictEqual(reloadedUpdatePocoItem.eTag, null); + assert.notStrictEqual(updatePocoStoreItem.eTag, reloadedUpdatePocoStoreItem.eTag); + assert.strictEqual(reloadedUpdatePocoItem.count, 2); + assert.strictEqual(reloadedUpdatePocoStoreItem.count, 2); + + // Write with old eTag should succeed for non-storeitem + try { + updatePocoItem.count = 123; + + await storage.write({ pocoItem: updatePocoItem }); + } catch(err) { + assert.fail('Should not throw exception on write with pocoItem'); + } + + // Write with old eTag should FAIL for storeItem + try { + updatePocoStoreItem.count = 123; + + await storage.write({ pocoStoreItem: updatePocoStoreItem }); + assert.fail('Should have thrown exception on write with store item because of old eTag'); + } catch(err) { } + + const reloadedStoreItems2 = await storage.read(['pocoItem', 'pocoStoreItem']); + + const reloadedPocoItem2 = reloadedStoreItems2.pocoItem; + delete reloadedPocoItem2.eTag; + const reloadedPocoStoreItem2 = reloadedStoreItems2.pocoStoreItem; + + assert.strictEqual(reloadedPocoItem2.count, 123); + assert.strictEqual(reloadedPocoStoreItem2.count, 2); + + // write with wildcard etag should work + reloadedPocoItem2.count = 100; + reloadedPocoStoreItem2.count = 100; + reloadedPocoStoreItem2.eTag = '*'; + + const wildcardEtagdict = { + pocoItem: reloadedPocoItem2, + pocoStoreItem: reloadedPocoStoreItem2 + }; + + await storage.write(wildcardEtagdict); + + const reloadedStoreItems3 = await storage.read(['pocoItem', 'pocoStoreItem']); + + assert.strictEqual(reloadedStoreItems3.pocoItem.count, 100); + assert.strictEqual(reloadedStoreItems3.pocoStoreItem.count, 100); + + // Write with empty etag should not work + try { + const reloadedStoreItems4 = await storage.read(['pocoStoreItem']); + const reloadedStoreItem4 = reloadedStoreItems4.pocoStoreItem; + + assert.notStrictEqual(reloadedStoreItem4, null); + + reloadedStoreItem4.eTag = ''; + const dict2 = { pocoStoreItem: reloadedStoreItem4 }; + + await storage.write(dict2); + + assert.fail('Should have thrown exception on write with storeItem because of empty eTag'); + } catch (err) { } + + const finalStoreItems = await storage.read(['pocoItem', 'pocoStoreItem']); + assert.strictEqual(finalStoreItems.pocoItem.count, 100); + assert.strictEqual(finalStoreItems.pocoStoreItem.count, 100); + + return true; + } + + static async deleteObject(storage) { + const storeItems = { + delete1: { id: 1, count: 1 } + }; + + await storage.write(storeItems); + + const readStoreItems = await storage.read(['delete1']); + + assert.notStrictEqual(readStoreItems.delete1.eTag, null); + assert.strictEqual(readStoreItems.delete1.count, 1); + + await storage.delete(['delete1']); + + const reloadedStoreItems = await storage.read(['delete1']); + + assert.strictEqual(reloadedStoreItems.delete1, undefined); + + return true; + } + + static async deleteUnknownObject(storage) { + await assert.doesNotReject(async () => { + await storage.delete(['unknown_key']); + }); + + return true; + } + + static async performBatchOperations(storage) { + await storage.write({ + batch1: { count: 10 }, + batch2: { count: 20 }, + batch3: { count: 30 }, + }); + + let result = await storage.read(['batch1', 'batch2', 'batch3']); + + assert.notStrictEqual(result.batch1, null); + assert.notStrictEqual(result.batch2, null); + assert.notStrictEqual(result.batch3, null); + assert(result.batch1.count > 0); + assert(result.batch2.count > 0); + assert(result.batch3.count > 0); + assert.notStrictEqual(result.batch1.eTag, null); + assert.notStrictEqual(result.batch2.eTag, null); + assert.notStrictEqual(result.batch3.eTag, null); + + await storage.delete(['batch1', 'batch2', 'batch3']); + + result = await storage.read(['batch1', 'batch2', 'batch3']); + + assert.ok(!result.batch1); + assert.ok(!result.batch2); + assert.ok(!result.batch3); + + return true; + } + + static async proceedsThroughWaterfall(storage) { + const convoState = new ConversationState(storage); + + const dialogState = convoState.createProperty('dialogState'); + const dialogs = new DialogSet(dialogState); + + const adapter = new TestAdapter(async (turnContext) => { + const dc = await dialogs.createContext(turnContext); + + await dc.continueDialog(); + if (!turnContext.responded) { + await dc.beginDialog('waterfallDialog'); + } + }) + .use(new AutoSaveStateMiddleware(convoState)); + + dialogs.add(new TextPrompt('textPrompt', async (promptContext) => { + const result = promptContext.recognized.value; + if (result.length > 3) { + const succeededMessage = MessageFactory.text(`You got it at the ${ promptContext.attemptCount }th try!`); + await promptContext.context.sendActivity(succeededMessage); + return true; + } + + const reply = MessageFactory.text(`Please send a name that is longer than 3 characters. ${ promptContext.attemptCount }`); + await promptContext.context.sendActivity(reply); + return false; + })); + + const steps = [ + async (stepContext) => { + assert.strictEqual(typeof(stepContext.activeDialog.state['stepIndex']), 'number'); + await stepContext.context.sendActivity('step1'); + return Dialog.EndOfTurn; + }, + async (stepContext) => { + assert.strictEqual(typeof(stepContext.activeDialog.state['stepIndex']), 'number'); + await stepContext.prompt('textPrompt', { prompt: MessageFactory.text('Please type your name.') }); + }, + async (stepContext) => { + assert.strictEqual(typeof(stepContext.activeDialog.state['stepIndex']), 'number'); + await stepContext.context.sendActivity('step3'); + return Dialog.EndOfTurn; + }, + ]; + + dialogs.add(new WaterfallDialog('waterfallDialog', steps)); + + await adapter.send('hello') + .assertReply('step1') + .send('hello') + .assertReply('Please type your name.') + .send('hi') + .assertReply('Please send a name that is longer than 3 characters. 1') + .send('hi') + .assertReply('Please send a name that is longer than 3 characters. 2') + .send('hi') + .assertReply('Please send a name that is longer than 3 characters. 3') + .send('Kyle') + .assertReply('You got it at the 4th try!') + .assertReply('step3') + .startTest(); + + return true; + } +} + +module.exports = { StorageBaseTests }; \ No newline at end of file