From 1b83e0ceed2ae655349f32dcac34c6c8acdd61c4 Mon Sep 17 00:00:00 2001 From: Victor Colin Amador Date: Wed, 14 Jun 2023 17:20:34 -0700 Subject: [PATCH] Reset changes to the patch version. --- sdk/storage/azure-storage-queue/CHANGELOG.md | 17 +- sdk/storage/azure-storage-queue/README.md | 2 +- sdk/storage/azure-storage-queue/assets.json | 6 - sdk/storage/azure-storage-queue/pom.xml | 79 +- .../storage/queue/QueueServiceVersion.java | 9 +- .../com/azure/storage/queue/APISpec.groovy | 106 ++ .../azure/storage/queue/AzuriteTests.groovy | 177 ++++ .../com/azure/storage/queue/AzuriteTests.java | 144 --- .../storage/queue/BuildHelperTest.groovy | 457 +++++++++ .../azure/storage/queue/BuildHelperTests.java | 392 -------- .../azure/storage/queue/QueueAPITests.groovy | 926 ++++++++++++++++++ .../azure/storage/queue/QueueApiTests.java | 826 ---------------- .../storage/queue/QueueAsyncApiTests.java | 761 -------------- .../storage/queue/QueueAysncAPITests.groovy | 912 +++++++++++++++++ .../azure/storage/queue/QueueSASTests.groovy | 458 +++++++++ .../storage/queue/QueueSasClientTests.groovy | 215 ++++ .../storage/queue/QueueSasClientTests.java | 190 ---- .../azure/storage/queue/QueueSasTests.java | 403 -------- .../storage/queue/QueueServiceAPITests.groovy | 238 +++++ .../storage/queue/QueueServiceApiTests.java | 228 ----- .../queue/QueueServiceAsyncAPITests.groovy | 200 ++++ .../queue/QueueServiceAsyncApiTests.java | 157 --- .../queue/QueueServiceVersionTest.groovy | 13 + .../queue/QueueServiceVersionTests.java | 36 - .../azure/storage/queue/QueueTestBase.java | 207 ---- .../storage/queue/QueueTestHelper.groovy | 143 +++ .../azure/storage/queue/QueueTestHelper.java | 148 --- .../queue/QueueUserAgentPropertiesTest.groovy | 19 + .../queue/QueueUserAgentPropertiesTests.java | 23 - ...ingQueueClientWithConnectionString[0].json | 4 + ...ingQueueClientWithConnectionString[1].json | 4 + ...structingQueueClientWithCredential[0].json | 4 + ...structingQueueClientWithCredential[1].json | 4 + ...ueClientWithDefaultAzureCredential[0].json | 4 + ...ueClientWithDefaultAzureCredential[1].json | 4 + ...gServiceClientWithConnectionString[0].json | 4 + ...gServiceClientWithConnectionString[1].json | 4 + ...ructingServiceClientWithCredential[0].json | 4 + ...ructingServiceClientWithCredential[1].json | 4 + ...ceClientWithDefaultAzureCredential[0].json | 4 + ...ceClientWithDefaultAzureCredential[1].json | 4 + ...uriteTestsAzuriteURLGetQueueClient[0].json | 4 + ...uriteTestsAzuriteURLGetQueueClient[1].json | 4 + ...riteTestsUseDevelopmentStorageTrue[0].json | 4 + ...riteTestsUseDevelopmentStorageTrue[1].json | 4 + ...eAPITestsBuilderBearerTokenValidation.json | 4 + .../QueueAPITestsClearMessages.json | 150 +++ .../QueueAPITestsClearMessagesError.json | 26 + .../QueueAPITestsCreateIfNotExistsMin.json | 44 + ...tsCreateIfNotExistsQueueWithSharedKey.json | 23 + ...tadataOnAQueueClientThatAlreadyExists.json | 45 + ...tadataOnAQueueClientThatAlreadyExists.json | 42 + ...QueueAPITestsCreateQueueWithSharedKey.json | 23 + ...WithSmallTimeoutsFailForServiceClient.json | 4 + .../QueueAPITestsDeleteExistQueue.json | 42 + .../QueueAPITestsDeleteIfExistsMin.json | 42 + .../QueueAPITestsDeleteIfExistsQueue.json | 42 + ...esponseOnAQueueClientThatDoesNotExist.json | 48 + .../QueueAPITestsDeleteMessage.json | 172 ++++ ...ueAPITestsDeleteMessageInvalidArgs[0].json | 89 ++ ...ueAPITestsDeleteMessageInvalidArgs[1].json | 89 ++ ...ueAPITestsDeleteMessageInvalidArgs[2].json | 89 ++ .../QueueAPITestsDeleteQueueError.json | 26 + ...ueAPITestsDequeueAndDeleteWithHandler.json | 108 ++ ...ITestsDequeueAndDeleteWithSyncHandler.json | 108 ++ .../QueueAPITestsDequeueEncodedMessage.json | 67 ++ ...eueAPITestsDequeueFailsWithoutHandler.json | 67 ++ .../QueueAPITestsDequeueMessage.json | 67 ++ .../QueueAPITestsDequeueMultipleMessages.json | 89 ++ .../QueueAPITestsDequeueTooManyMessage.json | 45 + .../QueueAPITestsDequeueWithHandler.json | 89 ++ .../QueueAPITestsDequeueWithHandlerError.json | 89 ++ ...eAPITestsEnqueueDequeueNon-UTFMessage.json | 67 ++ .../QueueAPITestsEnqueueEmptyMessage.json | 67 ++ .../QueueAPITestsEnqueueMessage.json | 67 ++ ...QueueAPITestsEnqueueMessageBinaryData.json | 67 ++ ...eAPITestsEnqueueMessageEncodedMessage.json | 67 ++ ...ueueAPITestsEnqueuePeekNon-UTFMessage.json | 67 ++ .../QueueAPITestsEnqueueTimeToLive.json | 45 + .../QueueAPITestsGetAccessPolicy.json | 45 + .../QueueAPITestsGetAccessPolicyError.json | 26 + .../QueueAPITestsGetProperties.json | 45 + .../QueueAPITestsGetPropertiesError.json | 26 + .../QueueAPITestsGetQueueName.json | 4 + .../QueueAPITestsGetQueueURL.json | 4 + .../QueueAPITestsIPBasedEndpoint.json | 4 + .../QueueAPITestsPeekEncodedMessage.json | 67 ++ .../QueueAPITestsPeekFailsWithoutHandler.json | 67 ++ .../QueueAPITestsPeekMessage.json | 67 ++ .../QueueAPITestsPeekMessagesError.json | 26 + .../QueueAPITestsPeekMultipleMessages.json | 89 ++ .../QueueAPITestsPeekTooManyMessage.json | 45 + .../QueueAPITestsPeekWithHandler.json | 89 ++ ...QueueAPITestsPeekWithHandlerException.json | 89 ++ .../QueueAPITestsPeekWithSyncHandler.json | 110 +++ .../QueueAPITestsPerCallPolicy.json | 42 + .../QueueAPITestsSetAccessPolicy.json | 65 ++ .../QueueAPITestsSetAndClearMetadata[0].json | 85 ++ .../QueueAPITestsSetAndClearMetadata[1].json | 86 ++ .../QueueAPITestsSetAndClearMetadata[2].json | 85 ++ .../QueueAPITestsSetAndClearMetadata[3].json | 86 ++ .../QueueAPITestsSetAndClearMetadata[4].json | 84 ++ .../QueueAPITestsSetInvalidAccessPolicy.json | 46 + .../QueueAPITestsSetInvalidMeta[0].json | 45 + .../QueueAPITestsSetInvalidMeta[1].json | 45 + .../QueueAPITestsSetInvalidMeta[2].json | 45 + .../QueueAPITestsSetMetadataQueueError.json | 26 + ...ueueAPITestsSetMultipleAccessPolicies.json | 65 ++ ...QueueAPITestsSetTooManyAccessPolicies.json | 46 + .../QueueAPITestsUpdateMessage.json | 111 +++ ...ueAPITestsUpdateMessageInvalidArgs[0].json | 90 ++ ...ueAPITestsUpdateMessageInvalidArgs[1].json | 90 ++ ...ueAPITestsUpdateMessageInvalidArgs[2].json | 90 ++ .../QueueAPITestsUpdateMessageNoBody.json | 110 +++ ...ueueAPITestsUpdateMessageNullDuration.json | 110 +++ .../QueueAysncAPITestsClearMessages.json | 150 +++ .../QueueAysncAPITestsClearMessagesError.json | 26 + ...eateIfNotExistsQueueThatAlreadyExists.json | 42 + ...NotExistsQueueWithConflictingMetadata.json | 45 + ...reateIfNotExistsQueueWithSameMetadata.json | 42 + ...tsCreateIfNotExistsQueueWithSharedKey.json | 23 + ...AysncAPITestsCreateQueueWithSharedKey.json | 23 + .../QueueAysncAPITestsDeleteExistQueue.json | 42 + ...QueueAysncAPITestsDeleteIfExistsQueue.json | 42 + ...tsDeleteIfExistsQueueThatDoesNotExist.json | 26 + .../QueueAysncAPITestsDeleteMessage.json | 172 ++++ ...ncAPITestsDeleteMessageInvalidArgs[0].json | 89 ++ ...ncAPITestsDeleteMessageInvalidArgs[1].json | 89 ++ ...ncAPITestsDeleteMessageInvalidArgs[2].json | 89 ++ .../QueueAysncAPITestsDeleteQueueError.json | 26 + ...ncAPITestsDequeueAndDeleteWithHandler.json | 108 ++ ...ITestsDequeueAndDeleteWithSyncHandler.json | 108 ++ ...eueAysncAPITestsDequeueEncodedMessage.json | 67 ++ ...sncAPITestsDequeueFailsWithoutHandler.json | 67 ++ .../QueueAysncAPITestsDequeueMessage.json | 67 ++ ...cAPITestsDequeueMessageFromEmptyQueue.json | 45 + ...eAysncAPITestsDequeueMultipleMessages.json | 89 ++ ...eueAysncAPITestsDequeueTooManyMessage.json | 45 + .../QueueAysncAPITestsDequeueWithHandler.json | 89 ++ ...eAysncAPITestsDequeueWithHandlerError.json | 89 ++ ...cAPITestsEnqueueDequeueNon-UTFMessage.json | 67 ++ ...QueueAysncAPITestsEnqueueEmptyMessage.json | 67 ++ .../QueueAysncAPITestsEnqueueMessage.json | 67 ++ ...AysncAPITestsEnqueueMessageBinaryData.json | 67 ++ ...cAPITestsEnqueueMessageEncodedMessage.json | 67 ++ ...ysncAPITestsEnqueuePeekNon-UTFMessage.json | 67 ++ .../QueueAysncAPITestsEnqueueTimeToLive.json | 45 + .../QueueAysncAPITestsGetAccessPolicy.json | 45 + ...AysncAPITestsGetAccessPolicyDoesError.json | 26 + .../QueueAysncAPITestsGetProperties.json | 45 + .../QueueAysncAPITestsGetPropertiesError.json | 26 + .../QueueAysncAPITestsGetQueueName.json | 4 + .../QueueAysncAPITestsGetQueueURL.json | 4 + .../QueueAysncAPITestsIPBasedEndpoint.json | 4 + .../QueueAysncAPITestsPeekEncodedMessage.json | 67 ++ ...eAysncAPITestsPeekFailsWithoutHandler.json | 67 ++ .../QueueAysncAPITestsPeekMessage.json | 67 ++ ...ysncAPITestsPeekMessageFromEmptyQueue.json | 45 + .../QueueAysncAPITestsPeekMessagesError.json | 26 + ...ueueAysncAPITestsPeekMultipleMessages.json | 89 ++ .../QueueAysncAPITestsPeekTooManyMessage.json | 45 + .../QueueAysncAPITestsPeekWithHandler.json | 89 ++ ...AysncAPITestsPeekWithHandlerException.json | 89 ++ ...QueueAysncAPITestsPeekWithSyncHandler.json | 110 +++ .../QueueAysncAPITestsSetAccessPolicy.json | 65 ++ ...ueAysncAPITestsSetAndClearMetadata[0].json | 85 ++ ...ueAysncAPITestsSetAndClearMetadata[1].json | 86 ++ ...ueAysncAPITestsSetAndClearMetadata[2].json | 85 ++ ...ueAysncAPITestsSetAndClearMetadata[3].json | 86 ++ ...ueAysncAPITestsSetAndClearMetadata[4].json | 84 ++ ...ueAysncAPITestsSetInvalidAccessPolicy.json | 46 + .../QueueAysncAPITestsSetInvalidMeta[0].json | 45 + .../QueueAysncAPITestsSetInvalidMeta[1].json | 45 + .../QueueAysncAPITestsSetInvalidMeta[2].json | 45 + ...eueAysncAPITestsSetMetadataQueueError.json | 26 + ...ysncAPITestsSetMultipleAccessPolicies.json | 65 ++ ...AysncAPITestsSetTooManyAccessPolicies.json | 46 + .../QueueAysncAPITestsUpdateMessage.json | 111 +++ ...ncAPITestsUpdateMessageInvalidArgs[0].json | 90 ++ ...ncAPITestsUpdateMessageInvalidArgs[1].json | 90 ++ ...ncAPITestsUpdateMessageInvalidArgs[2].json | 90 ++ ...ueSASTestsAccountSASCreateDeleteQueue.json | 42 + .../QueueSASTestsAccountSASListQueues.json | 4 + ...ueSASTestsAccountSASNetworkOnEndpoint.json | 42 + .../QueueSASTestsCanUseSasToAuthenticate.json | 152 +++ ...sQueueSASEnqueueDequeueWithIdentifier.json | 109 +++ ...QueueSASEnqueueDequeueWithPermissions.json | 112 +++ ...ueueSASTestsQueueSASPermissionParseIA.json | 4 + ...eueSASTestsQueueSASPermissionParse[0].json | 4 + ...eueSASTestsQueueSASPermissionParse[1].json | 4 + ...eueSASTestsQueueSASPermissionParse[2].json | 4 + ...eueSASTestsQueueSASPermissionParse[3].json | 4 + ...eueSASTestsQueueSASPermissionParse[4].json | 4 + ...eueSASTestsQueueSASPermissionParse[5].json | 4 + ...eueSASTestsQueueSASPermissionParse[6].json | 4 + ...eueSASTestsQueueSASPermissionParse[7].json | 4 + ...SASTestsQueueSASPermissionToString[0].json | 4 + ...SASTestsQueueSASPermissionToString[1].json | 4 + ...SASTestsQueueSASPermissionToString[2].json | 4 + ...SASTestsQueueSASPermissionToString[3].json | 4 + ...SASTestsQueueSASPermissionToString[4].json | 4 + ...SASTestsQueueSASPermissionToString[5].json | 4 + ...tsQueueSASUpdateDeleteWithPermissions.json | 111 +++ ...sQueueServiceSASCanonicalizedResource.json | 4 + ...ueSasClientTestsAccountSASCreateQueue.json | 83 ++ ...eueSasClientTestsAccountSASListQueues.json | 45 + ...ueSasClientTestsQueueSASEnqueueWithId.json | 109 +++ ...SasClientTestsQueueSASEnqueueWithPerm.json | 112 +++ ...eSasClientTestsQueueSASUpdateWithPerm.json | 111 +++ ...sRememberAboutStringToSignDeprecation.json | 45 + ...eAPITestsBuilderBearerTokenValidation.json | 4 + .../QueueServiceAPITestsCreateNull.json | 4 + .../QueueServiceAPITestsCreateQueue.json | 45 + ...viceAPITestsCreateQueueMaxOverload[0].json | 45 + ...viceAPITestsCreateQueueMaxOverload[1].json | 45 + ...viceAPITestsCreateQueueMaxOverload[2].json | 45 + ...PITestsCreateQueueWithInvalidMetadata.json | 26 + ...APITestsCreateQueueWithInvalidName[0].json | 26 + ...APITestsCreateQueueWithInvalidName[1].json | 26 + ...APITestsCreateQueueWithInvalidName[2].json | 26 + ...APITestsCreateQueueWithInvalidName[3].json | 26 + ...APITestsCreateQueueWithInvalidName[4].json | 26 + ...APITestsCreateQueueWithInvalidName[5].json | 26 + .../QueueServiceAPITestsDeleteQueue.json | 65 ++ .../QueueServiceAPITestsDeleteQueueError.json | 26 + ...eueServiceAPITestsGetAndSetProperties.json | 90 ++ .../QueueServiceAPITestsGetQueueClient.json | 4 + .../QueueServiceAPITestsListEmptyQueues.json | 26 + ...iceAPITestsListQueuesMaxResultsByPage.json | 105 ++ .../QueueServiceAPITestsListQueues[0].json | 140 +++ .../QueueServiceAPITestsListQueues[1].json | 162 +++ .../QueueServiceAPITestsListQueues[2].json | 140 +++ .../QueueServiceAPITestsPerCallPolicy.json | 25 + .../QueueServiceAsyncAPITestsCreateNull.json | 4 + .../QueueServiceAsyncAPITestsCreateQueue.json | 45 + ...syncAPITestsCreateQueueMaxOverload[0].json | 45 + ...syncAPITestsCreateQueueMaxOverload[1].json | 45 + ...syncAPITestsCreateQueueMaxOverload[2].json | 45 + ...PITestsCreateQueueWithInvalidMetadata.json | 26 + ...APITestsCreateQueueWithInvalidName[0].json | 26 + ...APITestsCreateQueueWithInvalidName[1].json | 26 + ...APITestsCreateQueueWithInvalidName[2].json | 26 + ...APITestsCreateQueueWithInvalidName[3].json | 26 + ...APITestsCreateQueueWithInvalidName[4].json | 26 + ...APITestsCreateQueueWithInvalidName[5].json | 26 + .../QueueServiceAsyncAPITestsDeleteQueue.json | 65 ++ ...eServiceAsyncAPITestsDeleteQueueError.json | 26 + ...rviceAsyncAPITestsGetAndSetProperties.json | 90 ++ ...eueServiceAsyncAPITestsGetQueueClient.json | 4 + ...ueServiceAsyncAPITestsListEmptyQueues.json | 26 + ...ueueServiceAsyncAPITestsListQueues[0].json | 83 ++ ...ueueServiceAsyncAPITestsListQueues[1].json | 105 ++ ...ueueServiceAsyncAPITestsListQueues[2].json | 83 ++ .../azure-storage-queue/swagger/pom.xml | 22 +- 254 files changed, 15753 insertions(+), 3583 deletions(-) delete mode 100644 sdk/storage/azure-storage-queue/assets.json create mode 100644 sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/APISpec.groovy create mode 100644 sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/AzuriteTests.groovy delete mode 100644 sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/AzuriteTests.java create mode 100644 sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/BuildHelperTest.groovy delete mode 100644 sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/BuildHelperTests.java create mode 100644 sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueAPITests.groovy delete mode 100644 sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueApiTests.java delete mode 100644 sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueAsyncApiTests.java create mode 100644 sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueAysncAPITests.groovy create mode 100644 sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueSASTests.groovy create mode 100644 sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueSasClientTests.groovy delete mode 100644 sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueSasClientTests.java delete mode 100644 sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueSasTests.java create mode 100644 sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueServiceAPITests.groovy delete mode 100644 sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueServiceApiTests.java create mode 100644 sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueServiceAsyncAPITests.groovy delete mode 100644 sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueServiceAsyncApiTests.java create mode 100644 sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueServiceVersionTest.groovy delete mode 100644 sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueServiceVersionTests.java delete mode 100644 sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueTestBase.java create mode 100644 sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueTestHelper.groovy delete mode 100644 sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueTestHelper.java create mode 100644 sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueUserAgentPropertiesTest.groovy delete mode 100644 sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueUserAgentPropertiesTests.java create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/AzuriteTestsAzuriteURLConstructingQueueClientWithConnectionString[0].json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/AzuriteTestsAzuriteURLConstructingQueueClientWithConnectionString[1].json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/AzuriteTestsAzuriteURLConstructingQueueClientWithCredential[0].json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/AzuriteTestsAzuriteURLConstructingQueueClientWithCredential[1].json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/AzuriteTestsAzuriteURLConstructingQueueClientWithDefaultAzureCredential[0].json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/AzuriteTestsAzuriteURLConstructingQueueClientWithDefaultAzureCredential[1].json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/AzuriteTestsAzuriteURLConstructingServiceClientWithConnectionString[0].json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/AzuriteTestsAzuriteURLConstructingServiceClientWithConnectionString[1].json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/AzuriteTestsAzuriteURLConstructingServiceClientWithCredential[0].json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/AzuriteTestsAzuriteURLConstructingServiceClientWithCredential[1].json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/AzuriteTestsAzuriteURLConstructingServiceClientWithDefaultAzureCredential[0].json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/AzuriteTestsAzuriteURLConstructingServiceClientWithDefaultAzureCredential[1].json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/AzuriteTestsAzuriteURLGetQueueClient[0].json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/AzuriteTestsAzuriteURLGetQueueClient[1].json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/AzuriteTestsUseDevelopmentStorageTrue[0].json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/AzuriteTestsUseDevelopmentStorageTrue[1].json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsBuilderBearerTokenValidation.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsClearMessages.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsClearMessagesError.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsCreateIfNotExistsMin.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsCreateIfNotExistsQueueWithSharedKey.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsCreateIfNotExistsWithConflictingMetadataOnAQueueClientThatAlreadyExists.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsCreateIfNotExistsWithSameMetadataOnAQueueClientThatAlreadyExists.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsCreateQueueWithSharedKey.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsCreateQueueWithSmallTimeoutsFailForServiceClient.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsDeleteExistQueue.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsDeleteIfExistsMin.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsDeleteIfExistsQueue.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsDeleteIfExistsWithResponseOnAQueueClientThatDoesNotExist.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsDeleteMessage.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsDeleteMessageInvalidArgs[0].json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsDeleteMessageInvalidArgs[1].json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsDeleteMessageInvalidArgs[2].json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsDeleteQueueError.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsDequeueAndDeleteWithHandler.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsDequeueAndDeleteWithSyncHandler.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsDequeueEncodedMessage.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsDequeueFailsWithoutHandler.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsDequeueMessage.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsDequeueMultipleMessages.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsDequeueTooManyMessage.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsDequeueWithHandler.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsDequeueWithHandlerError.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsEnqueueDequeueNon-UTFMessage.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsEnqueueEmptyMessage.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsEnqueueMessage.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsEnqueueMessageBinaryData.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsEnqueueMessageEncodedMessage.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsEnqueuePeekNon-UTFMessage.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsEnqueueTimeToLive.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsGetAccessPolicy.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsGetAccessPolicyError.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsGetProperties.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsGetPropertiesError.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsGetQueueName.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsGetQueueURL.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsIPBasedEndpoint.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsPeekEncodedMessage.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsPeekFailsWithoutHandler.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsPeekMessage.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsPeekMessagesError.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsPeekMultipleMessages.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsPeekTooManyMessage.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsPeekWithHandler.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsPeekWithHandlerException.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsPeekWithSyncHandler.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsPerCallPolicy.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsSetAccessPolicy.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsSetAndClearMetadata[0].json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsSetAndClearMetadata[1].json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsSetAndClearMetadata[2].json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsSetAndClearMetadata[3].json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsSetAndClearMetadata[4].json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsSetInvalidAccessPolicy.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsSetInvalidMeta[0].json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsSetInvalidMeta[1].json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsSetInvalidMeta[2].json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsSetMetadataQueueError.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsSetMultipleAccessPolicies.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsSetTooManyAccessPolicies.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsUpdateMessage.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsUpdateMessageInvalidArgs[0].json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsUpdateMessageInvalidArgs[1].json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsUpdateMessageInvalidArgs[2].json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsUpdateMessageNoBody.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsUpdateMessageNullDuration.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsClearMessages.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsClearMessagesError.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsCreateIfNotExistsQueueThatAlreadyExists.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsCreateIfNotExistsQueueWithConflictingMetadata.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsCreateIfNotExistsQueueWithSameMetadata.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsCreateIfNotExistsQueueWithSharedKey.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsCreateQueueWithSharedKey.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsDeleteExistQueue.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsDeleteIfExistsQueue.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsDeleteIfExistsQueueThatDoesNotExist.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsDeleteMessage.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsDeleteMessageInvalidArgs[0].json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsDeleteMessageInvalidArgs[1].json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsDeleteMessageInvalidArgs[2].json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsDeleteQueueError.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsDequeueAndDeleteWithHandler.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsDequeueAndDeleteWithSyncHandler.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsDequeueEncodedMessage.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsDequeueFailsWithoutHandler.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsDequeueMessage.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsDequeueMessageFromEmptyQueue.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsDequeueMultipleMessages.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsDequeueTooManyMessage.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsDequeueWithHandler.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsDequeueWithHandlerError.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsEnqueueDequeueNon-UTFMessage.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsEnqueueEmptyMessage.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsEnqueueMessage.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsEnqueueMessageBinaryData.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsEnqueueMessageEncodedMessage.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsEnqueuePeekNon-UTFMessage.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsEnqueueTimeToLive.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsGetAccessPolicy.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsGetAccessPolicyDoesError.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsGetProperties.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsGetPropertiesError.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsGetQueueName.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsGetQueueURL.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsIPBasedEndpoint.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsPeekEncodedMessage.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsPeekFailsWithoutHandler.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsPeekMessage.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsPeekMessageFromEmptyQueue.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsPeekMessagesError.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsPeekMultipleMessages.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsPeekTooManyMessage.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsPeekWithHandler.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsPeekWithHandlerException.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsPeekWithSyncHandler.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsSetAccessPolicy.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsSetAndClearMetadata[0].json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsSetAndClearMetadata[1].json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsSetAndClearMetadata[2].json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsSetAndClearMetadata[3].json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsSetAndClearMetadata[4].json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsSetInvalidAccessPolicy.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsSetInvalidMeta[0].json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsSetInvalidMeta[1].json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsSetInvalidMeta[2].json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsSetMetadataQueueError.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsSetMultipleAccessPolicies.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsSetTooManyAccessPolicies.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsUpdateMessage.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsUpdateMessageInvalidArgs[0].json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsUpdateMessageInvalidArgs[1].json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsUpdateMessageInvalidArgs[2].json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsAccountSASCreateDeleteQueue.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsAccountSASListQueues.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsAccountSASNetworkOnEndpoint.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsCanUseSasToAuthenticate.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsQueueSASEnqueueDequeueWithIdentifier.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsQueueSASEnqueueDequeueWithPermissions.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsQueueSASPermissionParseIA.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsQueueSASPermissionParse[0].json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsQueueSASPermissionParse[1].json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsQueueSASPermissionParse[2].json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsQueueSASPermissionParse[3].json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsQueueSASPermissionParse[4].json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsQueueSASPermissionParse[5].json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsQueueSASPermissionParse[6].json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsQueueSASPermissionParse[7].json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsQueueSASPermissionToString[0].json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsQueueSASPermissionToString[1].json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsQueueSASPermissionToString[2].json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsQueueSASPermissionToString[3].json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsQueueSASPermissionToString[4].json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsQueueSASPermissionToString[5].json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsQueueSASUpdateDeleteWithPermissions.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsQueueServiceSASCanonicalizedResource.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSasClientTestsAccountSASCreateQueue.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSasClientTestsAccountSASListQueues.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSasClientTestsQueueSASEnqueueWithId.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSasClientTestsQueueSASEnqueueWithPerm.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSasClientTestsQueueSASUpdateWithPerm.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSasClientTestsRememberAboutStringToSignDeprecation.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsBuilderBearerTokenValidation.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsCreateNull.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsCreateQueue.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsCreateQueueMaxOverload[0].json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsCreateQueueMaxOverload[1].json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsCreateQueueMaxOverload[2].json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsCreateQueueWithInvalidMetadata.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsCreateQueueWithInvalidName[0].json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsCreateQueueWithInvalidName[1].json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsCreateQueueWithInvalidName[2].json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsCreateQueueWithInvalidName[3].json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsCreateQueueWithInvalidName[4].json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsCreateQueueWithInvalidName[5].json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsDeleteQueue.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsDeleteQueueError.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsGetAndSetProperties.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsGetQueueClient.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsListEmptyQueues.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsListQueuesMaxResultsByPage.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsListQueues[0].json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsListQueues[1].json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsListQueues[2].json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsPerCallPolicy.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsCreateNull.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsCreateQueue.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsCreateQueueMaxOverload[0].json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsCreateQueueMaxOverload[1].json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsCreateQueueMaxOverload[2].json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsCreateQueueWithInvalidMetadata.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsCreateQueueWithInvalidName[0].json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsCreateQueueWithInvalidName[1].json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsCreateQueueWithInvalidName[2].json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsCreateQueueWithInvalidName[3].json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsCreateQueueWithInvalidName[4].json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsCreateQueueWithInvalidName[5].json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsDeleteQueue.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsDeleteQueueError.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsGetAndSetProperties.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsGetQueueClient.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsListEmptyQueues.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsListQueues[0].json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsListQueues[1].json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsListQueues[2].json diff --git a/sdk/storage/azure-storage-queue/CHANGELOG.md b/sdk/storage/azure-storage-queue/CHANGELOG.md index 66618369f0689..d2fd46507a19e 100644 --- a/sdk/storage/azure-storage-queue/CHANGELOG.md +++ b/sdk/storage/azure-storage-queue/CHANGELOG.md @@ -1,21 +1,5 @@ # Release History -## 12.18.0-beta.2 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes -- Migrate test recordings to assets repo. - -## 12.18.0-beta.1 (2023-05-30) - -### Features Added -- Added support for 2023-01-03 service version. - ## 12.17.1 (2023-05-23) ### Other Changes @@ -26,6 +10,7 @@ - Upgraded `azure-core` from `1.38.0` to version `1.39.0`. - Upgraded `azure-storage-common` from `12.21.0` to version `12.21.1`. + ## 12.17.0 (2023-04-13) ### Features Added diff --git a/sdk/storage/azure-storage-queue/README.md b/sdk/storage/azure-storage-queue/README.md index c6cff6f7d5493..35146694e904e 100644 --- a/sdk/storage/azure-storage-queue/README.md +++ b/sdk/storage/azure-storage-queue/README.md @@ -53,7 +53,7 @@ add the direct dependency to your project as follows. com.azure azure-storage-queue - 12.18.0-beta.1 + 12.17.1 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/storage/azure-storage-queue/assets.json b/sdk/storage/azure-storage-queue/assets.json deleted file mode 100644 index 2dac58cb05929..0000000000000 --- a/sdk/storage/azure-storage-queue/assets.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "AssetsRepo": "Azure/azure-sdk-assets", - "AssetsRepoPrefixPath": "java", - "TagPrefix": "java/storage/azure-storage-queue", - "Tag": "java/storage/azure-storage-queue_b7c7493aab" -} diff --git a/sdk/storage/azure-storage-queue/pom.xml b/sdk/storage/azure-storage-queue/pom.xml index 3c1d325776df0..43b3a6624505f 100644 --- a/sdk/storage/azure-storage-queue/pom.xml +++ b/sdk/storage/azure-storage-queue/pom.xml @@ -13,7 +13,7 @@ com.azure azure-storage-queue - 12.18.0-beta.2 + 12.17.1 Microsoft Azure client library for Queue Storage This module contains client library for Microsoft Azure Queue Storage. @@ -43,27 +43,26 @@ --add-opens com.azure.storage.queue/com.azure.storage.queue.implementation=ALL-UNNAMED --add-opens com.azure.storage.queue/com.azure.storage.queue.implementation.util=ALL-UNNAMED --add-opens com.azure.storage.queue/com.azure.storage.queue.models=ALL-UNNAMED - --add-reads com.azure.storage.queue=com.azure.http.netty - --add-reads com.azure.storage.queue=com.azure.core.http.okhttp + --add-reads com.azure.core=ALL-UNNAMED + --add-reads com.azure.storage.common=ALL-UNNAMED - true com.azure azure-core - 1.40.0 + 1.39.0 com.azure azure-core-http-netty - 1.13.4 + 1.13.3 com.azure azure-storage-common - 12.21.2 + 12.21.1 @@ -75,7 +74,7 @@ com.azure azure-storage-common - 12.21.2 + 12.21.1 tests test-jar test @@ -83,37 +82,19 @@ com.azure azure-core-test - 1.18.0 - test - - - org.junit.jupiter - junit-jupiter-api - 5.9.3 - test - - - org.junit.jupiter - junit-jupiter-engine - 5.9.3 - test - - - org.junit.jupiter - junit-jupiter-params - 5.9.3 + 1.17.0 test io.projectreactor reactor-test - 3.4.29 + 3.4.27 test com.azure azure-identity - 1.9.1 + 1.9.0 test @@ -125,7 +106,13 @@ com.azure azure-core-http-okhttp - 1.11.10 + 1.11.9 + test + + + org.spockframework + spock-core + 2.4-M1-groovy-4.0 test @@ -146,6 +133,36 @@ + + + org.codehaus.gmavenplus + gmavenplus-plugin + 2.1.0 + + + + + + addTestSources + generateTestStubs + compileTests + removeTestStubs + + test-compile + + + + ${skipTestCompile} + + + ${project.basedir}/src/test + + **/*.groovy + + + + + @@ -179,7 +196,7 @@ org.apache.maven.plugins maven-surefire-plugin - 3.1.0 + 3.0.0-M7 ${AZURE_STORAGE_SAS_SERVICE_VERSION} diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceVersion.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceVersion.java index cfa8de396a04c..73d00d6903eee 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceVersion.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceVersion.java @@ -87,12 +87,7 @@ public enum QueueServiceVersion implements ServiceVersion { /** * Service version {@code 2022-11-02}. */ - V2022_11_02("2022-11-02"), - - /** - * Service version {@code 2023-01-03}. - */ - V2023_01_03("2023-01-03"); + V2022_11_02("2022-11-02"); private final String version; @@ -114,6 +109,6 @@ public String getVersion() { * @return the latest {@link QueueServiceVersion} */ public static QueueServiceVersion getLatest() { - return V2023_01_03; + return V2022_11_02; } } diff --git a/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/APISpec.groovy b/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/APISpec.groovy new file mode 100644 index 0000000000000..fe68d5503a447 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/APISpec.groovy @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.queue + +import com.azure.core.http.HttpPipelineCallContext +import com.azure.core.http.HttpPipelineNextPolicy +import com.azure.core.http.HttpPipelinePosition +import com.azure.core.http.HttpResponse +import com.azure.core.http.policy.HttpLogDetailLevel +import com.azure.core.http.policy.HttpLogOptions +import com.azure.core.http.policy.HttpPipelinePolicy +import com.azure.core.test.TestMode +import com.azure.core.util.Context +import com.azure.storage.common.StorageSharedKeyCredential +import com.azure.storage.common.test.shared.StorageSpec +import com.azure.storage.queue.models.QueuesSegmentOptions +import reactor.core.publisher.Mono + +import java.time.Duration + +class APISpec extends StorageSpec { + // Clients for API tests + QueueServiceClient primaryQueueServiceClient + QueueServiceAsyncClient primaryQueueServiceAsyncClient + + /** + * Clean up the test queues and messages for the account. + */ + def cleanup() { + if (environment.testMode != TestMode.PLAYBACK) { + def cleanupQueueServiceClient = new QueueServiceClientBuilder() + .connectionString(environment.primaryAccount.connectionString) + .buildClient() + cleanupQueueServiceClient.listQueues(new QueuesSegmentOptions().setPrefix(namer.getResourcePrefix()), + null, Context.NONE).each { + queueItem -> cleanupQueueServiceClient.deleteQueue(queueItem.getName()) + } + } + } + + def queueServiceBuilderHelper() { + QueueServiceClientBuilder builder = instrument(new QueueServiceClientBuilder()) + return builder + .connectionString(environment.primaryAccount.connectionString) + } + + def queueBuilderHelper() { + def queueName = namer.getRandomName(60) + QueueClientBuilder builder = instrument(new QueueClientBuilder()) + return builder + .connectionString(environment.primaryAccount.connectionString) + .queueName(queueName) + } + + QueueServiceClientBuilder getServiceClientBuilder(StorageSharedKeyCredential credential, String endpoint, + HttpPipelinePolicy... policies) { + QueueServiceClientBuilder builder = new QueueServiceClientBuilder() + .endpoint(endpoint) + .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BODY_AND_HEADERS)) + + for (HttpPipelinePolicy policy : policies) { + builder.addPolicy(policy) + } + + instrument(builder) + + if (credential != null) { + builder.credential(credential) + } + + return builder + } + + QueueClientBuilder getQueueClientBuilder(String endpoint) { + QueueClientBuilder builder = instrument(new QueueClientBuilder()) + .endpoint(endpoint) + return builder + } + + def sleepIfLive(long milliseconds) { + if (environment.testMode == TestMode.PLAYBACK) { + return + } + + sleep(milliseconds) + } + + def getMessageUpdateDelay(long liveTestDurationInMillis) { + return (environment.testMode == TestMode.PLAYBACK) ? Duration.ofMillis(10) : Duration.ofMillis(liveTestDurationInMillis) + } + + def getPerCallVersionPolicy() { + return new HttpPipelinePolicy() { + @Override + Mono process(HttpPipelineCallContext context, HttpPipelineNextPolicy next) { + context.getHttpRequest().setHeader("x-ms-version","2017-11-09") + return next.process() + } + @Override + HttpPipelinePosition getPipelinePosition() { + return HttpPipelinePosition.PER_CALL + } + } + } +} diff --git a/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/AzuriteTests.groovy b/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/AzuriteTests.groovy new file mode 100644 index 0000000000000..050210ba73d4e --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/AzuriteTests.groovy @@ -0,0 +1,177 @@ +package com.azure.storage.queue + +import com.azure.identity.DefaultAzureCredentialBuilder +import com.azure.storage.common.StorageSharedKeyCredential +import spock.lang.Unroll + +class AzuriteTests extends APISpec { + String[] azuriteEndpoints = ["https://127.0.0.1:10000/devstoreaccount1", + "https://azure-storage-emulator-azurite:10000/devstoreaccount1"] + + /* + * The credential information for Azurite is static and documented in numerous locations, therefore it is okay to have this "secret" written into public code. + */ + StorageSharedKeyCredential azuriteCredential = new StorageSharedKeyCredential("devstoreaccount1", "Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==") + private getAzuriteQueueConnectionString(String azuriteEndpoint) { + return "DefaultEndpointsProtocol=https;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;QueueEndpoint=" + azuriteEndpoint + ";" + } + + @Unroll + def "UseDevelopmentStorage true"() { + setup: + def originalUseDevelopmentStorage = System.getProperty("UseDevelopmentStorage") + System.setProperty("UseDevelopmentStorage", "true") + + when: + def serviceClient = new QueueServiceClientBuilder() + .connectionString(getAzuriteQueueConnectionString(azuriteEndpoints[index])) + .buildClient() + + then: + serviceClient.getQueueServiceUrl() == azuriteEndpoints[index] + serviceClient.getAccountName() == "devstoreaccount1" + + cleanup: + if (originalUseDevelopmentStorage != null) { + System.setProperty("UseDevelopmentStorage", originalUseDevelopmentStorage) + } else { + System.clearProperty("UseDevelopmentStorage") + } + + where: + index | _ + 0 | _ + 1 | _ + } + + @Unroll + def "Azurite URL constructing service client with connection string"() { + when: + def serviceClient = new QueueServiceClientBuilder() + .connectionString(getAzuriteQueueConnectionString(azuriteEndpoints[index])) + .buildClient() + + then: + serviceClient.getAccountName() == "devstoreaccount1" + serviceClient.getQueueServiceUrl() == azuriteEndpoints[index] + + where: + index | _ + 0 | _ + 1 | _ + } + + @Unroll + def "Azurite URL constructing service client with default azure credential"() { + when: + def serviceClient = new QueueServiceClientBuilder() + .endpoint(azuriteEndpoints[index]) + .credential(new DefaultAzureCredentialBuilder().build()) + .buildClient() + + then: + serviceClient.getAccountName() == "devstoreaccount1" + serviceClient.getQueueServiceUrl() == azuriteEndpoints[index] + + where: + index | _ + 0 | _ + 1 | _ + } + + @Unroll + def "Azurite URL constructing service client with credential"() { + when: + def serviceClient = new QueueServiceClientBuilder() + .credential(azuriteCredential) + .endpoint(azuriteEndpoints[index]) + .buildClient() + + then: + serviceClient.getAccountName() == "devstoreaccount1" + serviceClient.getQueueServiceUrl() == azuriteEndpoints[index] + + where: + index | _ + 0 | _ + 1 | _ + } + + @Unroll + def "Azurite URL get queue client"() { + when: + def queueClient = new QueueServiceClientBuilder() + .connectionString(getAzuriteQueueConnectionString(azuriteEndpoints[index])) + .buildClient() + .getQueueClient("queue") + + then: + queueClient.getAccountName() == "devstoreaccount1" + queueClient.getQueueName() == "queue" + queueClient.getQueueUrl() == azuriteEndpoints[index] + "/queue" + + where: + index | _ + 0 | _ + 1 | _ + } + + @Unroll + def "Azurite URL constructing queue client with connection string"() { + when: + def queueClient = new QueueClientBuilder() + .connectionString(getAzuriteQueueConnectionString(azuriteEndpoints[index])) + .queueName("queue") + .buildClient() + + then: + queueClient.getAccountName() == "devstoreaccount1" + queueClient.getQueueName() == "queue" + queueClient.getQueueUrl() == azuriteEndpoints[index] + "/queue" + + where: + index | _ + 0 | _ + 1 | _ + } + + @Unroll + def "Azurite URL constructing queue client with default azure credential"() { + when: + def queueClient = new QueueClientBuilder() + .endpoint(azuriteEndpoints[index]) + .credential(new DefaultAzureCredentialBuilder().build()) + .queueName("queue") + .buildClient() + + then: + queueClient.getAccountName() == "devstoreaccount1" + queueClient.getQueueName() == "queue" + queueClient.getQueueUrl() == azuriteEndpoints[index] + "/queue" + + where: + index | _ + 0 | _ + 1 | _ + } + + @Unroll + def "Azurite URL constructing queue client with credential"() { + when: + def queueClient = new QueueClientBuilder() + .credential(azuriteCredential) + .endpoint(azuriteEndpoints[index]) + .queueName("queue") + .buildClient() + + then: + queueClient.getAccountName() == "devstoreaccount1" + queueClient.getQueueName() == "queue" + queueClient.getQueueUrl() == azuriteEndpoints[index] + "/queue" + + where: + index | _ + 0 | _ + 1 | _ + } +} diff --git a/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/AzuriteTests.java b/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/AzuriteTests.java deleted file mode 100644 index a8bf79a04ea05..0000000000000 --- a/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/AzuriteTests.java +++ /dev/null @@ -1,144 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.storage.queue; - -import com.azure.identity.DefaultAzureCredentialBuilder; -import com.azure.storage.common.StorageSharedKeyCredential; -import org.junit.jupiter.params.ParameterizedTest; -import org.junit.jupiter.params.provider.ValueSource; - -import static org.junit.jupiter.api.Assertions.assertEquals; - -/** - * Tests basic Azure Storage Queue functionality for Azurite. - */ -public class AzuriteTests extends QueueTestBase { - private static final String[] AZURITE_ENDPOINTS = new String[] { - "https://127.0.0.1:10000/devstoreaccount1", "https://azure-storage-emulator-azurite:10000/devstoreaccount1" - }; - - /* - * The credential information for Azurite is static and documented in numerous locations, therefore it is okay to - * have this "secret" written into public code. - */ - private static final StorageSharedKeyCredential AZURITE_CREDENTIAL = new StorageSharedKeyCredential( - "devstoreaccount1", "Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw=="); - - private static String getAzuriteQueueConnectionString(String azuriteEndpoint) { - return "DefaultEndpointsProtocol=https;AccountName=devstoreaccount1;" - + "AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;" - + "QueueEndpoint=" + azuriteEndpoint + ";"; - } - - @ParameterizedTest - @ValueSource(ints = { 0, 1 }) - public void useDevelopmentStorageTrue(int index) { - String originalUseDevelopmentStorage = System.getProperty("UseDevelopmentStorage"); - - try { - System.setProperty("UseDevelopmentStorage", "true"); - QueueServiceClient serviceClient = new QueueServiceClientBuilder() - .connectionString(getAzuriteQueueConnectionString(AZURITE_ENDPOINTS[index])) - .buildClient(); - - assertEquals(AZURITE_ENDPOINTS[index], serviceClient.getQueueServiceUrl()); - assertEquals("devstoreaccount1", serviceClient.getAccountName()); - } finally { - if (originalUseDevelopmentStorage != null) { - System.setProperty("UseDevelopmentStorage", originalUseDevelopmentStorage); - } else { - System.clearProperty("UseDevelopmentStorage"); - } - } - } - - @ParameterizedTest - @ValueSource(ints = { 0, 1 }) - public void azuriteUrlConstructingServiceClientWithConnectionString(int index) { - QueueServiceClient serviceClient = new QueueServiceClientBuilder() - .connectionString(getAzuriteQueueConnectionString(AZURITE_ENDPOINTS[index])) - .buildClient(); - - assertEquals("devstoreaccount1", serviceClient.getAccountName()); - assertEquals(AZURITE_ENDPOINTS[index], serviceClient.getQueueServiceUrl()); - } - - @ParameterizedTest - @ValueSource(ints = { 0, 1 }) - public void azuriteUrlConstructingServiceClientWithDefaultAzureCredential(int index) { - QueueServiceClient serviceClient = new QueueServiceClientBuilder() - .endpoint(AZURITE_ENDPOINTS[index]) - .credential(new DefaultAzureCredentialBuilder().build()) - .buildClient(); - - assertEquals("devstoreaccount1", serviceClient.getAccountName()); - assertEquals(AZURITE_ENDPOINTS[index], serviceClient.getQueueServiceUrl()); - } - - @ParameterizedTest - @ValueSource(ints = { 0, 1 }) - public void azuriteUrlConstructingServiceClientWithCredential(int index) { - QueueServiceClient serviceClient = new QueueServiceClientBuilder() - .credential(AZURITE_CREDENTIAL) - .endpoint(AZURITE_ENDPOINTS[index]) - .buildClient(); - - assertEquals("devstoreaccount1", serviceClient.getAccountName()); - assertEquals(AZURITE_ENDPOINTS[index], serviceClient.getQueueServiceUrl()); - } - - @ParameterizedTest - @ValueSource(ints = { 0, 1 }) - public void azuriteUrlGetQueueClient(int index) { - QueueClient queueClient = new QueueServiceClientBuilder() - .connectionString(getAzuriteQueueConnectionString(AZURITE_ENDPOINTS[index])) - .buildClient() - .getQueueClient("queue"); - - assertEquals("devstoreaccount1", queueClient.getAccountName()); - assertEquals("queue", queueClient.getQueueName()); - assertEquals(AZURITE_ENDPOINTS[index] + "/queue", queueClient.getQueueUrl()); - } - - @ParameterizedTest - @ValueSource(ints = { 0, 1 }) - public void azuriteUrlConstructingQueueClientWithConnectionString(int index) { - QueueClient queueClient = new QueueClientBuilder() - .connectionString(getAzuriteQueueConnectionString(AZURITE_ENDPOINTS[index])) - .queueName("queue") - .buildClient(); - - assertEquals("devstoreaccount1", queueClient.getAccountName()); - assertEquals("queue", queueClient.getQueueName()); - assertEquals(AZURITE_ENDPOINTS[index] + "/queue", queueClient.getQueueUrl()); - } - - @ParameterizedTest - @ValueSource(ints = { 0, 1 }) - public void azuriteUrlConstructingQueueClientWithDefaultAzureCredential(int index) { - QueueClient queueClient = new QueueClientBuilder() - .endpoint(AZURITE_ENDPOINTS[index]) - .credential(new DefaultAzureCredentialBuilder().build()) - .queueName("queue") - .buildClient(); - - assertEquals("devstoreaccount1", queueClient.getAccountName()); - assertEquals("queue", queueClient.getQueueName()); - assertEquals(AZURITE_ENDPOINTS[index] + "/queue", queueClient.getQueueUrl()); - } - - @ParameterizedTest - @ValueSource(ints = { 0, 1 }) - public void azuriteUrlConstructingQueueClientWithCredential(int index) { - QueueClient queueClient = new QueueClientBuilder() - .credential(AZURITE_CREDENTIAL) - .endpoint(AZURITE_ENDPOINTS[index]) - .queueName("queue") - .buildClient(); - - assertEquals("devstoreaccount1", queueClient.getAccountName()); - assertEquals("queue", queueClient.getQueueName()); - assertEquals(AZURITE_ENDPOINTS[index] + "/queue", queueClient.getQueueUrl()); - } -} diff --git a/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/BuildHelperTest.groovy b/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/BuildHelperTest.groovy new file mode 100644 index 0000000000000..c0874141e2749 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/BuildHelperTest.groovy @@ -0,0 +1,457 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.queue + +import com.azure.core.credential.AzureSasCredential +import com.azure.core.credential.TokenCredential +import com.azure.core.http.HttpClient +import com.azure.core.http.HttpHeaders +import com.azure.core.http.HttpMethod +import com.azure.core.http.HttpRequest +import com.azure.core.http.HttpResponse +import com.azure.core.http.policy.FixedDelayOptions +import com.azure.core.http.policy.HttpLogOptions +import com.azure.core.http.policy.RetryOptions +import com.azure.core.test.http.MockHttpResponse +import com.azure.core.util.ClientOptions +import com.azure.core.util.Configuration +import com.azure.core.util.CoreUtils +import com.azure.core.util.DateTimeRfc1123 +import com.azure.core.util.Header +import com.azure.core.util.logging.ClientLogger +import com.azure.storage.common.StorageSharedKeyCredential +import com.azure.storage.common.policy.RequestRetryOptions +import com.azure.storage.common.policy.RetryPolicyType +import com.azure.storage.queue.implementation.util.BuilderHelper +import reactor.core.publisher.Flux +import reactor.core.publisher.Mono +import reactor.test.StepVerifier +import spock.lang.Specification +import spock.lang.Unroll + +import java.time.Duration + +class BuildHelperTest extends Specification { + static def credentials = new StorageSharedKeyCredential("accountName", "accountKey") + static def endpoint = "https://account.queue.core.windows.net/" + static def requestRetryOptions = new RequestRetryOptions(RetryPolicyType.FIXED, 2, 2, 1000, 4000, null) + static def coreRetryOptions = new RetryOptions(new FixedDelayOptions(1, Duration.ofSeconds(2))) + + static HttpRequest request(String url) { + return new HttpRequest(HttpMethod.HEAD, new URL(url), new HttpHeaders().put("Content-Length", "0"), + Flux.empty()) + } + + /** + * Tests that a new date will be applied to every retry when using the default pipeline builder. + */ + def "Fresh date applied on retry"() { + when: + def pipeline = BuilderHelper.buildPipeline(credentials, null, null, null, endpoint, requestRetryOptions, null, + BuilderHelper.defaultHttpLogOptions, + new ClientOptions(), new FreshDateTestClient(), new ArrayList<>(), new ArrayList<>(), Configuration.NONE, new ClientLogger(BuildHelperTest.class)) + + then: + StepVerifier.create(pipeline.send(request(endpoint))) + .assertNext({ it.getStatusCode() == 200 }) + .verifyComplete() + } + + /** + * Tests that a new date will be applied to every retry when using the service client builder's default pipeline. + */ + def "Service client fresh date on retry"() { + when: + def serviceClient = new QueueServiceClientBuilder() + .endpoint(endpoint) + .credential(credentials) + .httpClient(new FreshDateTestClient()) + .retryOptions(requestRetryOptions) + .buildClient() + + then: + StepVerifier.create(serviceClient.getHttpPipeline().send(request(serviceClient.getQueueServiceUrl()))) + .assertNext({ it.getStatusCode() == 200 }) + .verifyComplete() + } + + /** + * Tests that a new date will be applied to every retry when using the queue client builder's default pipeline. + */ + def "Queue client fresh date on retry"() { + when: + def queueClient = new QueueClientBuilder() + .endpoint(endpoint) + .queueName("queue") + .credential(credentials) + .httpClient(new FreshDateTestClient()) + .retryOptions(requestRetryOptions) + .buildClient() + + then: + StepVerifier.create(queueClient.getHttpPipeline().send(request(queueClient.getQueueUrl()))) + .assertNext({ it.getStatusCode() == 200 }) + .verifyComplete() + } + + /** + * Tests that a user application id will be honored in the UA string when using the default pipeline builder. + */ + @Unroll + def "Custom application id in UA string"() { + when: + def pipeline = BuilderHelper.buildPipeline(credentials, null, null, null, + endpoint, new RequestRetryOptions(), null, new HttpLogOptions().setApplicationId(logOptionsUA), new ClientOptions().setApplicationId(clientOptionsUA), + new ApplicationIdUAStringTestClient(expectedUA), new ArrayList<>(), new ArrayList<>(), Configuration.NONE, new ClientLogger(BuildHelperTest.class)) + + then: + StepVerifier.create(pipeline.send(request(endpoint))) + .assertNext({ it.getStatusCode() == 200 }) + .verifyComplete() + + where: + logOptionsUA | clientOptionsUA || expectedUA + "log-options-id" | null || "log-options-id" + null | "client-options-id" || "client-options-id" + "log-options-id" | "client-options-id" || "client-options-id" // Client options preferred over log options + } + + /** + * Tests that a user application id will be honored in the UA string when using the service client builder's default pipeline. + */ + @Unroll + def "Service client custom application id in UA string"() { + when: + def serviceClient = new QueueServiceClientBuilder() + .endpoint(endpoint) + .credential(credentials) + .httpLogOptions(new HttpLogOptions().setApplicationId(logOptionsUA)) + .clientOptions(new ClientOptions().setApplicationId(clientOptionsUA)) + .httpClient(new ApplicationIdUAStringTestClient(expectedUA)) + .buildClient() + + then: + StepVerifier.create(serviceClient.getHttpPipeline().send(request(serviceClient.getQueueServiceUrl()))) + .assertNext({ it.getStatusCode() == 200 }) + .verifyComplete() + + where: + logOptionsUA | clientOptionsUA || expectedUA + "log-options-id" | null || "log-options-id" + null | "client-options-id" || "client-options-id" + "log-options-id" | "client-options-id" || "client-options-id" // Client options preferred over log options + } + + /** + * Tests that a user application id will be honored in the UA string when using the queue client builder's default pipeline. + */ + @Unroll + def "Queue client custom application id in UA string"() { + when: + def queueClient = new QueueClientBuilder() + .endpoint(endpoint) + .queueName("queue") + .credential(credentials) + .httpLogOptions(new HttpLogOptions().setApplicationId(logOptionsUA)) + .clientOptions(new ClientOptions().setApplicationId(clientOptionsUA)) + .httpClient(new ApplicationIdUAStringTestClient(expectedUA)) + .buildClient() + + then: + StepVerifier.create(queueClient.getHttpPipeline().send(request(queueClient.getQueueUrl()))) + .assertNext({ it.getStatusCode() == 200 }) + .verifyComplete() + + where: + logOptionsUA | clientOptionsUA || expectedUA + "log-options-id" | null || "log-options-id" + null | "client-options-id" || "client-options-id" + "log-options-id" | "client-options-id" || "client-options-id" // Client options preferred over log options + } + + /** + * Tests that a custom headers will be honored when using the default pipeline builder. + */ + def "Custom headers client options"() { + setup: + List
headers = new ArrayList<>(); + headers.add(new Header("custom", "header")) + headers.add(new Header("Authorization", "notthis")) + headers.add(new Header("User-Agent", "overwritten")) + + when: + def pipeline = BuilderHelper.buildPipeline(credentials, null, null, null, + endpoint, new RequestRetryOptions(), null, BuilderHelper.defaultHttpLogOptions, new ClientOptions().setHeaders(headers), + new ClientOptionsHeadersTestClient(headers), new ArrayList<>(), new ArrayList<>(), Configuration.NONE, new ClientLogger(BuildHelperTest.class)) + + then: + StepVerifier.create(pipeline.send(request(endpoint))) + .assertNext({ it.getStatusCode() == 200 }) + .verifyComplete() + } + + /** + * Tests that a user application id will be honored in the UA string when using the service client builder's default pipeline. + */ + def "Service client custom headers client options"() { + setup: + List
headers = new ArrayList<>(); + headers.add(new Header("custom", "header")) + headers.add(new Header("Authorization", "notthis")) + headers.add(new Header("User-Agent", "overwritten")) + + when: + def serviceClient = new QueueServiceClientBuilder() + .endpoint(endpoint) + .credential(credentials) + .clientOptions(new ClientOptions().setHeaders(headers)) + .httpClient(new ClientOptionsHeadersTestClient(headers)) + .buildClient() + + then: + StepVerifier.create(serviceClient.getHttpPipeline().send(request(serviceClient.getQueueServiceUrl()))) + .assertNext({ it.getStatusCode() == 200 }) + .verifyComplete() + } + + /** + * Tests that a user application id will be honored in the UA string when using the queue client builder's default pipeline. + */ + def "Queue client custom headers client options"() { + setup: + List
headers = new ArrayList<>(); + headers.add(new Header("custom", "header")) + headers.add(new Header("Authorization", "notthis")) + headers.add(new Header("User-Agent", "overwritten")) + + when: + def queueClient = new QueueClientBuilder() + .endpoint(endpoint) + .queueName("queue") + .credential(credentials) + .clientOptions(new ClientOptions().setHeaders(headers)) + .httpClient(new ClientOptionsHeadersTestClient(headers)) + .buildClient() + + then: + StepVerifier.create(queueClient.getHttpPipeline().send(request(queueClient.getQueueUrl()))) + .assertNext({ it.getStatusCode() == 200 }) + .verifyComplete() + } + + def "Does not throw on ambiguous credentials, without AzureSasCredential"(){ + when: + new QueueClientBuilder() + .endpoint(endpoint) + .queueName("foo") + .credential(new StorageSharedKeyCredential("foo", "bar")) + .credential(Mock(TokenCredential.class)) + .sasToken("foo") + .buildClient() + + then: + noExceptionThrown() + + when: + new QueueServiceClientBuilder() + .endpoint(endpoint) + .credential(new StorageSharedKeyCredential("foo", "bar")) + .credential(Mock(TokenCredential.class)) + .sasToken("foo") + .buildClient() + + then: + noExceptionThrown() + } + + def "Throws on ambiguous credentials, with AzureSasCredential"() { + when: + new QueueClientBuilder() + .endpoint(endpoint) + .queueName("foo") + .credential(new StorageSharedKeyCredential("foo", "bar")) + .credential(new AzureSasCredential("foo")) + .buildClient() + + then: + thrown(IllegalStateException.class) + + when: + new QueueClientBuilder() + .endpoint(endpoint) + .queueName("foo") + .credential(Mock(TokenCredential.class)) + .credential(new AzureSasCredential("foo")) + .buildClient() + + then: + thrown(IllegalStateException.class) + + when: + new QueueClientBuilder() + .endpoint(endpoint) + .queueName("foo") + .sasToken("foo") + .credential(new AzureSasCredential("foo")) + .buildClient() + + then: + thrown(IllegalStateException.class) + + when: + new QueueClientBuilder() + .endpoint(endpoint + "?sig=foo") + .queueName("foo") + .credential(new AzureSasCredential("foo")) + .buildClient() + + then: + thrown(IllegalStateException.class) + + when: + new QueueServiceClientBuilder() + .endpoint(endpoint) + .credential(new StorageSharedKeyCredential("foo", "bar")) + .credential(new AzureSasCredential("foo")) + .buildClient() + + then: + thrown(IllegalStateException.class) + + when: + new QueueServiceClientBuilder() + .endpoint(endpoint) + .credential(Mock(TokenCredential.class)) + .credential(new AzureSasCredential("foo")) + .buildClient() + + then: + thrown(IllegalStateException.class) + + when: + new QueueServiceClientBuilder() + .endpoint(endpoint) + .sasToken("foo") + .credential(new AzureSasCredential("foo")) + .buildClient() + + then: + thrown(IllegalStateException.class) + + when: + new QueueServiceClientBuilder() + .endpoint(endpoint + "?sig=foo") + .credential(new AzureSasCredential("foo")) + .buildClient() + + then: + thrown(IllegalStateException.class) + } + + def "Only one retryOptions can be applied"() { + when: + new QueueServiceClientBuilder() + .endpoint(endpoint) + .credential(credentials) + .retryOptions(requestRetryOptions) + .retryOptions(coreRetryOptions) + .buildClient() + + then: + thrown(IllegalStateException.class) + + when: + new QueueClientBuilder() + .endpoint(endpoint) + .credential(credentials) + .queueName("foo") + .retryOptions(requestRetryOptions) + .retryOptions(coreRetryOptions) + .buildClient() + + then: + thrown(IllegalStateException.class) + } + + private static final class FreshDateTestClient implements HttpClient { + private DateTimeRfc1123 firstDate + + @Override + Mono send(HttpRequest request) { + if (firstDate == null) { + firstDate = convertToDateObject(request.getHeaders().getValue("Date")) + return Mono.error(new IOException("IOException!")) + } + + assert firstDate != convertToDateObject(request.getHeaders().getValue("Date")) + return Mono.just(new MockHttpResponse(request, 200)) + } + + private static DateTimeRfc1123 convertToDateObject(String dateHeader) { + if (CoreUtils.isNullOrEmpty(dateHeader)) { + throw new RuntimeException("Failed to set 'Date' header.") + } + + return new DateTimeRfc1123(dateHeader) + } + } + + def "Parse protocol"() { + when: + def parts = BuilderHelper.parseEndpoint(endpoint + + "?sv=2019-12-12&ss=bfqt&srt=s&sp=rwdlacupx&se=2020-08-15T05:43:05Z&st=2020-08-14T21:43:05Z&spr=https,http&sig=sig", null) + + then: + parts.getSasToken().contains("https%2Chttp") + } + + private static final class ApplicationIdUAStringTestClient implements HttpClient { + + private final String expectedUA; + + ApplicationIdUAStringTestClient(String expectedUA) { + this.expectedUA = expectedUA; + } + + @Override + Mono send(HttpRequest request) { + if (CoreUtils.isNullOrEmpty(request.getHeaders().getValue("User-Agent"))) { + throw new RuntimeException("Failed to set 'User-Agent' header.") + } + assert request.getHeaders().getValue("User-Agent").startsWith(expectedUA) + return Mono.just(new MockHttpResponse(request, 200)) + } + } + + private static final class ClientOptionsHeadersTestClient implements HttpClient { + + private final Iterable
headers; + + ClientOptionsHeadersTestClient(Iterable
headers) { + this.headers = headers; + } + + @Override + Mono send(HttpRequest request) { + + headers.forEach({ header -> + if (CoreUtils.isNullOrEmpty(request.getHeaders().getValue(header.getName()))) { + throw new RuntimeException("Failed to set custom header " + header.getName()) + } + // This is meant to not match. + if (header.getName() == "Authorization") { + if (request.getHeaders().getValue(header.getName()) == header.getValue()) { + throw new RuntimeException("Custom header " + header.getName() + " did not match expectation.") + } + } else { + if (request.getHeaders().getValue(header.getName()) != header.getValue()) { + throw new RuntimeException("Custom header " + header.getName() + " did not match expectation.") + } + } + + }) + return Mono.just(new MockHttpResponse(request, 200)) + } + } +} diff --git a/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/BuildHelperTests.java b/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/BuildHelperTests.java deleted file mode 100644 index 3035a8cf6f652..0000000000000 --- a/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/BuildHelperTests.java +++ /dev/null @@ -1,392 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.storage.queue; - -import com.azure.core.credential.AzureSasCredential; -import com.azure.core.credential.TokenCredential; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaderName; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpMethod; -import com.azure.core.http.HttpPipeline; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.policy.FixedDelayOptions; -import com.azure.core.http.policy.HttpLogOptions; -import com.azure.core.http.policy.RetryOptions; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.core.util.ClientOptions; -import com.azure.core.util.Configuration; -import com.azure.core.util.CoreUtils; -import com.azure.core.util.Header; -import com.azure.core.util.logging.ClientLogger; -import com.azure.storage.common.StorageSharedKeyCredential; -import com.azure.storage.common.policy.RequestRetryOptions; -import com.azure.storage.common.policy.RetryPolicyType; -import com.azure.storage.queue.implementation.util.BuilderHelper; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.params.ParameterizedTest; -import org.junit.jupiter.params.provider.Arguments; -import org.junit.jupiter.params.provider.MethodSource; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; -import reactor.test.StepVerifier; - -import java.io.IOException; -import java.net.MalformedURLException; -import java.net.URL; -import java.time.Duration; -import java.util.ArrayList; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.stream.Stream; - -import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNotEquals; -import static org.junit.jupiter.api.Assertions.assertThrows; -import static org.junit.jupiter.api.Assertions.assertTrue; - -public class BuildHelperTests { - private static final ClientLogger LOGGER = new ClientLogger(BuildHelperTests.class); - private static final StorageSharedKeyCredential CREDENTIALS = - new StorageSharedKeyCredential("accountName", "accountKey"); - private static final String ENDPOINT = "https://account.queue.core.windows.net/"; - private static final RequestRetryOptions REQUEST_RETRY_OPTIONS = - new RequestRetryOptions(RetryPolicyType.FIXED, 2, 2, 1000L, 4000L, null); - private static final RetryOptions RETRY_OPTIONS = new RetryOptions(new FixedDelayOptions(1, Duration.ofSeconds(1))); - private static final TokenCredential MOCK_CREDENTIAL = request -> null; - private static final List
CLIENT_OPTIONS_HEADERS; - private static final Map HEADERS_MAP; - - static { - CLIENT_OPTIONS_HEADERS = new ArrayList<>(); - CLIENT_OPTIONS_HEADERS.add(new Header("custom", "header")); - CLIENT_OPTIONS_HEADERS.add(new Header("Authorization", "notthis")); - CLIENT_OPTIONS_HEADERS.add(new Header("User-Agent", "overwritten")); - - HEADERS_MAP = new LinkedHashMap<>(); - HEADERS_MAP.put(HttpHeaderName.fromString("custom"), "header"); - HEADERS_MAP.put(HttpHeaderName.AUTHORIZATION, "notthis"); - HEADERS_MAP.put(HttpHeaderName.USER_AGENT, "overwritten"); - } - - private static void sendRequestAndValidate(HttpPipeline pipeline, String url) { - try { - StepVerifier.create(pipeline.send(new HttpRequest(HttpMethod.HEAD, new URL(url), - new HttpHeaders().set(HttpHeaderName.CONTENT_LENGTH, "0"), Flux.empty()))) - .assertNext(response -> assertEquals(200, response.getStatusCode())) - .verifyComplete(); - } catch (MalformedURLException ex) { - throw new RuntimeException(ex); - } - } - - private static HttpPipeline buildPipeline(HttpLogOptions logOptions, ClientOptions clientOptions, HttpClient - httpClient) { - return BuilderHelper.buildPipeline(CREDENTIALS, null, null, null, ENDPOINT, REQUEST_RETRY_OPTIONS, null, - logOptions, clientOptions, httpClient, new ArrayList<>(), new ArrayList<>(), Configuration.NONE, LOGGER); - } - - /** - * Tests that a new date will be applied to every retry when using the default pipeline builder. - */ - @Test - public void freshDateAppliedOnRetry() { - HttpPipeline pipeline = buildPipeline(BuilderHelper.getDefaultHttpLogOptions(), new ClientOptions(), - new FreshDateTestClient()); - - sendRequestAndValidate(pipeline, ENDPOINT); - } - - /** - * Tests that a new date will be applied to every retry when using the service client builder's default pipeline. - */ - @Test - public void serviceClientFreshDateOnRetry() { - QueueServiceClient serviceClient = new QueueServiceClientBuilder() - .endpoint(ENDPOINT) - .credential(CREDENTIALS) - .httpClient(new FreshDateTestClient()) - .retryOptions(REQUEST_RETRY_OPTIONS) - .buildClient(); - - sendRequestAndValidate(serviceClient.getHttpPipeline(), serviceClient.getQueueServiceUrl()); - } - - /** - * Tests that a new date will be applied to every retry when using the queue client builder's default pipeline. - */ - @Test - public void queueClientFreshDateOnRetry() { - QueueClient queueClient = new QueueClientBuilder() - .endpoint(ENDPOINT) - .queueName("queue") - .credential(CREDENTIALS) - .httpClient(new FreshDateTestClient()) - .retryOptions(REQUEST_RETRY_OPTIONS) - .buildClient(); - - sendRequestAndValidate(queueClient.getHttpPipeline(), queueClient.getQueueUrl()); - } - - /** - * Tests that a user application id will be honored in the UA string when using the default pipeline builder. - */ - @ParameterizedTest - @MethodSource("customApplicationIdSupplier") - public void customApplicationIdInUserAgentString(String logOptionsUA, String clientOptionsUA, String expectedUA) { - HttpPipeline pipeline = buildPipeline(new HttpLogOptions().setApplicationId(logOptionsUA), - new ClientOptions().setApplicationId(clientOptionsUA), new ApplicationIdUAStringTestClient(expectedUA)); - - sendRequestAndValidate(pipeline, ENDPOINT); - } - - /** - * Tests that a user application id will be honored in the UA string when using the service client builder's default pipeline. - */ - @ParameterizedTest - @MethodSource("customApplicationIdSupplier") - public void serviceClientCustomApplicationIdInUserAgentString(String logOptionsUA, String clientOptionsUA, - String expectedUA) { - QueueServiceClient serviceClient = new QueueServiceClientBuilder() - .endpoint(ENDPOINT) - .credential(CREDENTIALS) - .httpLogOptions(new HttpLogOptions().setApplicationId(logOptionsUA)) - .clientOptions(new ClientOptions().setApplicationId(clientOptionsUA)) - .httpClient(new ApplicationIdUAStringTestClient(expectedUA)) - .buildClient(); - - sendRequestAndValidate(serviceClient.getHttpPipeline(), serviceClient.getQueueServiceUrl()); - } - - /** - * Tests that a user application id will be honored in the UA string when using the queue client builder's default pipeline. - */ - @ParameterizedTest - @MethodSource("customApplicationIdSupplier") - public void queueClientCustomApplicationIdInUserAgentString(String logOptionsUA, String clientOptionsUA, - String expectedUA) { - QueueClient queueClient = new QueueClientBuilder() - .endpoint(ENDPOINT) - .queueName("queue") - .credential(CREDENTIALS) - .httpLogOptions(new HttpLogOptions().setApplicationId(logOptionsUA)) - .clientOptions(new ClientOptions().setApplicationId(clientOptionsUA)) - .httpClient(new ApplicationIdUAStringTestClient(expectedUA)) - .buildClient(); - - sendRequestAndValidate(queueClient.getHttpPipeline(), queueClient.getQueueUrl()); - } - - private static Stream customApplicationIdSupplier() { - return Stream.of( - Arguments.of("log-options-id", null, "log-options-id"), - Arguments.of(null, "client-options-id", "client-options-id"), - - // Client options preferred over log options - Arguments.of("log-options-id", "client-options-id", "client-options-id") - ); - } - - /** - * Tests that a custom headers will be honored when using the default pipeline builder. - */ - @Test - public void customHeadersClientOptions() { - HttpPipeline pipeline = buildPipeline(BuilderHelper.getDefaultHttpLogOptions(), - new ClientOptions().setHeaders(CLIENT_OPTIONS_HEADERS), new ClientOptionsHeadersTestClient(HEADERS_MAP)); - - sendRequestAndValidate(pipeline, ENDPOINT); - } - - /** - * Tests that a user application id will be honored in the UA string when using the service client builder's default pipeline. - */ - @Test - public void serviceClientCustomHeadersClientOptions() { - QueueServiceClient serviceClient = new QueueServiceClientBuilder() - .endpoint(ENDPOINT) - .credential(CREDENTIALS) - .clientOptions(new ClientOptions().setHeaders(CLIENT_OPTIONS_HEADERS)) - .httpClient(new ClientOptionsHeadersTestClient(HEADERS_MAP)) - .buildClient(); - - sendRequestAndValidate(serviceClient.getHttpPipeline(), serviceClient.getQueueServiceUrl()); - } - - /** - * Tests that a user application id will be honored in the UA string when using the queue client builder's default pipeline. - */ - @Test - public void queueClientCustomHeadersClientOptions() { - QueueClient queueClient = new QueueClientBuilder() - .endpoint(ENDPOINT) - .queueName("queue") - .credential(CREDENTIALS) - .clientOptions(new ClientOptions().setHeaders(CLIENT_OPTIONS_HEADERS)) - .httpClient(new ClientOptionsHeadersTestClient(HEADERS_MAP)) - .buildClient(); - - sendRequestAndValidate(queueClient.getHttpPipeline(), queueClient.getQueueUrl()); - } - - @Test - public void doesNotThrowOnAmbiguousCredentialsWithoutAzureSasCredential() { - assertDoesNotThrow(() -> new QueueClientBuilder() - .endpoint(ENDPOINT) - .queueName("foo") - .credential(new StorageSharedKeyCredential("foo", "bar")) - .credential(MOCK_CREDENTIAL) - .sasToken("foo") - .buildClient()); - - assertDoesNotThrow(() -> new QueueServiceClientBuilder() - .endpoint(ENDPOINT) - .credential(new StorageSharedKeyCredential("foo", "bar")) - .credential(MOCK_CREDENTIAL) - .sasToken("foo") - .buildClient()); - } - - @Test - public void throwsOnAmbiguousCredentialsWithAzureSasCredential() { - assertThrows(IllegalStateException.class, () -> new QueueClientBuilder() - .endpoint(ENDPOINT) - .queueName("foo") - .credential(new StorageSharedKeyCredential("foo", "bar")) - .credential(new AzureSasCredential("foo")) - .buildClient()); - - assertThrows(IllegalStateException.class, () -> new QueueClientBuilder() - .endpoint(ENDPOINT) - .queueName("foo") - .credential(MOCK_CREDENTIAL) - .credential(new AzureSasCredential("foo")) - .buildClient()); - - assertThrows(IllegalStateException.class, () -> new QueueClientBuilder() - .endpoint(ENDPOINT) - .queueName("foo") - .sasToken("foo") - .credential(new AzureSasCredential("foo")) - .buildClient()); - - assertThrows(IllegalStateException.class, () -> new QueueClientBuilder() - .endpoint(ENDPOINT + "?sig=foo") - .queueName("foo") - .credential(new AzureSasCredential("foo")) - .buildClient()); - - assertThrows(IllegalStateException.class, () -> new QueueServiceClientBuilder() - .endpoint(ENDPOINT) - .credential(new StorageSharedKeyCredential("foo", "bar")) - .credential(new AzureSasCredential("foo")) - .buildClient()); - - assertThrows(IllegalStateException.class, () -> new QueueServiceClientBuilder() - .endpoint(ENDPOINT) - .credential(MOCK_CREDENTIAL) - .credential(new AzureSasCredential("foo")) - .buildClient()); - - assertThrows(IllegalStateException.class, () -> new QueueServiceClientBuilder() - .endpoint(ENDPOINT) - .sasToken("foo") - .credential(new AzureSasCredential("foo")) - .buildClient()); - - assertThrows(IllegalStateException.class, () -> new QueueServiceClientBuilder() - .endpoint(ENDPOINT + "?sig=foo") - .credential(new AzureSasCredential("foo")) - .buildClient()); - } - - @Test - public void onlyOneRetryOptionsCanBeApplied() { - assertThrows(IllegalStateException.class, () -> new QueueServiceClientBuilder() - .endpoint(ENDPOINT) - .credential(CREDENTIALS) - .retryOptions(REQUEST_RETRY_OPTIONS) - .retryOptions(RETRY_OPTIONS) - .buildClient()); - - assertThrows(IllegalStateException.class, () -> new QueueClientBuilder() - .endpoint(ENDPOINT) - .credential(CREDENTIALS) - .queueName("foo") - .retryOptions(REQUEST_RETRY_OPTIONS) - .retryOptions(RETRY_OPTIONS) - .buildClient()); - } - - @Test - public void parseProtocol() { - BuilderHelper.QueueUrlParts parts = BuilderHelper.parseEndpoint(ENDPOINT + "?sv=2019-12-12&ss=bfqt&srt=s" - + "&sp=rwdlacupx&se=2020-08-15T05:43:05Z&st=2020-08-14T21:43:05Z&spr=https,http&sig=sig", null); - - assertTrue(parts.getSasToken().contains("https%2Chttp"), "Expected SAS token to contain 'https%2Chttp'."); - } - - private static final class FreshDateTestClient implements HttpClient { - private String firstDate; - - @Override - public Mono send(HttpRequest request) { - if (firstDate == null) { - firstDate = request.getHeaders().getValue(HttpHeaderName.DATE); - return Mono.error(new IOException("IOException!")); - } - - assertNotEquals(firstDate, request.getHeaders().getValue(HttpHeaderName.DATE)); - return Mono.just(new MockHttpResponse(request, 200)); - } - } - - private static final class ApplicationIdUAStringTestClient implements HttpClient { - private final String expectedUA; - - ApplicationIdUAStringTestClient(String expectedUA) { - this.expectedUA = expectedUA; - } - - @Override - public Mono send(HttpRequest request) { - assertTrue(request.getHeaders().getValue(HttpHeaderName.USER_AGENT).startsWith(expectedUA)); - - return Mono.just(new MockHttpResponse(request, 200)); - } - } - - private static final class ClientOptionsHeadersTestClient implements HttpClient { - private final Map headers; - - ClientOptionsHeadersTestClient(Map headers) { - this.headers = headers; - } - - @Override - public Mono send(HttpRequest request) { - headers.forEach((name, value) -> { - if (CoreUtils.isNullOrEmpty(request.getHeaders().getValue(name))) { - throw new RuntimeException("Failed to set custom header " + name); - } - - if (name == HttpHeaderName.AUTHORIZATION) { - if (Objects.equals(value, request.getHeaders().getValue(HttpHeaderName.AUTHORIZATION))) { - throw new RuntimeException("Custom header " + name + " did not match expectation."); - } - } else { - if (!Objects.equals(value, request.getHeaders().getValue(name))) { - throw new RuntimeException("Custom header " + name + " did not match expectation."); - } - } - }); - - return Mono.just(new MockHttpResponse(request, 200)); - } - } -} diff --git a/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueAPITests.groovy b/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueAPITests.groovy new file mode 100644 index 0000000000000..6bb5bf09dbbeb --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueAPITests.groovy @@ -0,0 +1,926 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.queue + +import com.azure.core.http.policy.ExponentialBackoffOptions +import com.azure.core.http.policy.RetryOptions +import com.azure.core.util.BinaryData +import com.azure.core.util.Context +import com.azure.core.util.HttpClientOptions +import com.azure.identity.DefaultAzureCredentialBuilder +import com.azure.storage.common.StorageSharedKeyCredential +import com.azure.storage.common.policy.RequestRetryOptions +import com.azure.storage.queue.models.PeekedMessageItem +import com.azure.storage.queue.models.QueueAccessPolicy +import com.azure.storage.queue.models.QueueErrorCode +import com.azure.storage.queue.models.QueueMessageItem +import com.azure.storage.queue.models.QueueSignedIdentifier +import com.azure.storage.queue.models.QueueStorageException +import reactor.core.publisher.Mono +import spock.lang.Retry +import spock.lang.Unroll + +import java.nio.charset.StandardCharsets +import java.time.Duration +import java.time.LocalDateTime +import java.time.OffsetDateTime +import java.time.ZoneOffset + +class QueueAPITests extends APISpec { + QueueClient queueClient + + static def testMetadata = Collections.singletonMap("metadata", "value") + static def createMetadata = Collections.singletonMap("metadata1", "value") + String queueName + + def setup() { + queueName = namer.getRandomName(60) + primaryQueueServiceClient = queueServiceBuilderHelper().buildClient() + queueClient = primaryQueueServiceClient.getQueueClient(queueName) + } + + def "Get queue URL"() { + given: + def accountName = StorageSharedKeyCredential.fromConnectionString(environment.primaryAccount.connectionString).getAccountName() + def expectURL = String.format("https://%s.queue.core.windows.net/%s", accountName, queueName) + + when: + def queueURL = queueClient.getQueueUrl() + + then: + expectURL == queueURL + } + + def "IP based endpoint"() { + when: + def queueClient = new QueueClientBuilder() + .connectionString(environment.primaryAccount.connectionString) + .endpoint("http://127.0.0.1:10001/devstoreaccount1/myqueue") + .buildClient() + + then: + queueClient.getAccountName() == "devstoreaccount1" + queueClient.getQueueName() == "myqueue" + } + + def "Create queue with shared key"() { + expect: + QueueTestHelper.assertResponseStatusCode(queueClient.createWithResponse(null, null, null), 201) + } + + def "Create if not exists queue with shared key"() { + expect: + QueueTestHelper.assertResponseStatusCode(queueClient.createIfNotExistsWithResponse(null, null, null), 201) + } + + def "Create if not exists min"() { + setup: + queueName = namer.getRandomName(60) + def client = primaryQueueServiceClient.getQueueClient(queueName) + + when: + def result = client.createIfNotExists() + + then: + client.getQueueName() == queueName + client.getProperties() != null + result + } + + def "Create if not exists with same metadata on a queue client that already exists"() { + setup: + queueName = namer.getRandomName(60) + def client = primaryQueueServiceClient.getQueueClient(queueName) + def initialResponse = client.createIfNotExistsWithResponse(null, null, null) + + when: + def secondResponse = client.createIfNotExistsWithResponse(null, null, null) + + then: + initialResponse.getStatusCode() == 201 + secondResponse.getStatusCode() == 204 + } + + def "Create if not exists with conflicting metadata on a queue client that already exists"() { + setup: + queueName = namer.getRandomName(60) + def client = primaryQueueServiceClient.getQueueClient(queueName) + def initialResponse = client.createIfNotExistsWithResponse(testMetadata, null, null) + + when: + def secondResponse = client.createIfNotExistsWithResponse(null, null, null) + + then: + initialResponse.getStatusCode() == 201 + secondResponse.getStatusCode() == 409 + initialResponse.getValue() + !secondResponse.getValue() + } + + def "Delete exist queue"() { + given: + queueClient.create() + when: + def deleteQueueResponse = queueClient.deleteWithResponse(null, null) + then: + QueueTestHelper.assertResponseStatusCode(deleteQueueResponse, 204) + + } + + def "Delete queue error"() { + when: + queueClient.delete() + then: + def e = thrown(QueueStorageException) + QueueTestHelper.assertExceptionStatusCodeAndMessage(e, 404, QueueErrorCode.QUEUE_NOT_FOUND) + } + + def "Delete if exists min"() { + setup: + queueClient.create() + + when: + def result = queueClient.deleteIfExists() + + then: + result + } + + def "Delete if exists queue"() { + given: + queueClient.create() + when: + def deleteQueueResponse = queueClient.deleteIfExistsWithResponse(null, null) + then: + QueueTestHelper.assertResponseStatusCode(deleteQueueResponse, 204) + + } + + def "Delete if exists with response on a queue client that does not exist"() { + setup: + queueName = namer.getRandomName(60) + def client = primaryQueueServiceClient.getQueueClient(queueName) + + when: + def response = client.deleteIfExistsWithResponse(null, null) + client.getProperties() + + then: + thrown(QueueStorageException) + response.getStatusCode() == 404 + !response.getValue() + } + + def "Get properties"() { + given: + queueClient.createWithResponse(testMetadata, null, null) + when: + def getPropertiesResponse = queueClient.getPropertiesWithResponse(null, null) + then: + QueueTestHelper.assertResponseStatusCode(getPropertiesResponse, 200) + getPropertiesResponse.getValue().getApproximateMessagesCount() == 0 + testMetadata == getPropertiesResponse.getValue().getMetadata() + } + + def "Get properties error"() { + when: + queueClient.getProperties() + then: + def e = thrown(QueueStorageException) + QueueTestHelper.assertExceptionStatusCodeAndMessage(e, 404, QueueErrorCode.QUEUE_NOT_FOUND) + } + + @Unroll + def "Set and clear metadata"() { + given: + queueClient.createWithResponse(matadataInCreate, null, null) + when: + def getPropertiesResponseBefore = queueClient.getPropertiesWithResponse(null, null) + def setMetadataResponse = queueClient.setMetadataWithResponse(metadataInSet, null, null) + def getPropertiesResponseAfter = queueClient.getPropertiesWithResponse(null, null) + then: + QueueTestHelper.assertResponseStatusCode(getPropertiesResponseBefore, 200) + expectMetadataInCreate == getPropertiesResponseBefore.getValue().getMetadata() + QueueTestHelper.assertResponseStatusCode(setMetadataResponse, 204) + QueueTestHelper.assertResponseStatusCode(getPropertiesResponseAfter, 200) + expectMetadataInSet == getPropertiesResponseAfter.getValue().getMetadata() + where: + matadataInCreate | metadataInSet | expectMetadataInCreate | expectMetadataInSet + null | testMetadata | Collections.emptyMap() | testMetadata + createMetadata | testMetadata | createMetadata | testMetadata + createMetadata | null | createMetadata | Collections.emptyMap() + testMetadata | testMetadata | testMetadata | testMetadata + null | null | Collections.emptyMap() | Collections.emptyMap() + } + + def "Set metadata queue error"() { + when: + queueClient.setMetadata(testMetadata) + then: + def e = thrown(QueueStorageException) + QueueTestHelper.assertExceptionStatusCodeAndMessage(e, 404, QueueErrorCode.QUEUE_NOT_FOUND) + } + + @Unroll + def "Set invalid meta"() { + given: + def invalidMetadata = Collections.singletonMap(invalidKey, "value") + queueClient.create() + when: + queueClient.setMetadata(invalidMetadata) + then: + def e = thrown(QueueStorageException) + QueueTestHelper.assertExceptionStatusCodeAndMessage(e, statusCode, errMessage) + where: + invalidKey | statusCode | errMessage + "invalid-meta" | 400 | QueueErrorCode.INVALID_METADATA + "12345" | 400 | QueueErrorCode.INVALID_METADATA + "" | 400 | QueueErrorCode.EMPTY_METADATA_KEY + } + + def "Get access policy"() { + given: + queueClient.create() + when: + def accessPolicies = queueClient.getAccessPolicy() + then: + !accessPolicies.iterator().hasNext() + } + + def "Get access policy error"() { + when: + queueClient.getAccessPolicy().iterator().next() + then: + def e = thrown(QueueStorageException) + QueueTestHelper.assertExceptionStatusCodeAndMessage(e, 404, QueueErrorCode.QUEUE_NOT_FOUND) + } + + def "Set access policy"() { + given: + queueClient.create() + def accessPolicy = new QueueAccessPolicy() + .setPermissions("raup") + .setStartsOn(OffsetDateTime.of(LocalDateTime.of(2000, 1, 1, 0, 0), ZoneOffset.UTC)) + .setExpiresOn(OffsetDateTime.of(LocalDateTime.of(2020, 1, 1, 0, 0), ZoneOffset.UTC)) + def permission = new QueueSignedIdentifier() + .setId("testpermission") + .setAccessPolicy(accessPolicy) + when: + def setAccessPolicyResponse = queueClient.setAccessPolicyWithResponse(Collections.singletonList(permission), null, null) + def nextAccessPolicy = queueClient.getAccessPolicy().iterator().next() + then: + QueueTestHelper.assertResponseStatusCode(setAccessPolicyResponse, 204) + QueueTestHelper.assertPermissionsAreEqual(permission, nextAccessPolicy) + } + + def "Set invalid access policy"() { + given: + def accessPolicy = new QueueAccessPolicy() + .setPermissions("r") + .setStartsOn(OffsetDateTime.of(LocalDateTime.of(2000, 1, 1, 0, 0), ZoneOffset.UTC)) + .setExpiresOn(OffsetDateTime.of(LocalDateTime.of(2020, 1, 1, 0, 0), ZoneOffset.UTC)) + + def permission = new QueueSignedIdentifier() + .setId("theidofthispermissionislongerthanwhatisallowedbytheserviceandshouldfail") + .setAccessPolicy(accessPolicy) + queueClient.create() + when: + queueClient.setAccessPolicy(Collections.singletonList(permission)) + then: + def e = thrown(QueueStorageException) + QueueTestHelper.assertExceptionStatusCodeAndMessage(e, 400, QueueErrorCode.INVALID_XML_DOCUMENT) + } + + def "Set multiple access policies"() { + given: + def accessPolicy = new QueueAccessPolicy() + .setPermissions("r") + .setStartsOn(OffsetDateTime.of(LocalDateTime.of(2000, 1, 1, 0, 0), ZoneOffset.UTC)) + .setExpiresOn(OffsetDateTime.of(LocalDateTime.of(2020, 1, 1, 0, 0), ZoneOffset.UTC)) + + def permissions = new ArrayList() + for (int i = 0; i < 3; i++) { + permissions.add(new QueueSignedIdentifier() + .setId("policy" + i) + .setAccessPolicy(accessPolicy)) + } + queueClient.create() + when: + def setAccessPolicyResponse = queueClient.setAccessPolicyWithResponse(permissions, null, Context.NONE) + def nextAccessPolicy = queueClient.getAccessPolicy().iterator() + then: + QueueTestHelper.assertResponseStatusCode(setAccessPolicyResponse, 204) + QueueTestHelper.assertPermissionsAreEqual(permissions[0], nextAccessPolicy.next()) + QueueTestHelper.assertPermissionsAreEqual(permissions[1], nextAccessPolicy.next()) + QueueTestHelper.assertPermissionsAreEqual(permissions[2], nextAccessPolicy.next()) + !nextAccessPolicy.hasNext() + } + + def "Set too many access policies"() { + given: + def accessPolicy = new QueueAccessPolicy() + .setPermissions("r") + .setStartsOn(OffsetDateTime.of(LocalDateTime.of(2000, 1, 1, 0, 0), ZoneOffset.UTC)) + .setExpiresOn(OffsetDateTime.of(LocalDateTime.of(2020, 1, 1, 0, 0), ZoneOffset.UTC)) + + def permissions = new ArrayList() + for (int i = 0; i < 6; i++) { + permissions.add(new QueueSignedIdentifier() + .setId("policy" + i) + .setAccessPolicy(accessPolicy)) + } + queueClient.create() + when: + queueClient.setAccessPolicyWithResponse(permissions, null, Context.NONE) + then: + def e = thrown(QueueStorageException) + QueueTestHelper.assertExceptionStatusCodeAndMessage(e, 400, QueueErrorCode.INVALID_XML_DOCUMENT) + } + + def "Enqueue message"() { + given: + queueClient.create() + def expectMsg = "test message" + when: + def enqueueMsgResponse = queueClient.sendMessageWithResponse(expectMsg, null, null, null, null) + def peekedMessage = queueClient.peekMessage() + then: + QueueTestHelper.assertResponseStatusCode(enqueueMsgResponse, 201) + expectMsg == peekedMessage.getMessageText() + } + + def "Enqueue message binary data"() { + given: + queueClient.create() + def expectMsg = BinaryData.fromString("test message") + when: + def enqueueMsgResponse = queueClient.sendMessageWithResponse(expectMsg, null, null, null, null) + def peekedMessage = queueClient.peekMessage() + then: + QueueTestHelper.assertResponseStatusCode(enqueueMsgResponse, 201) + expectMsg.toBytes() == peekedMessage.getBody().toBytes() + } + + def "Enqueue empty message"() { + given: + queueClient.create() + def expectMsg = "" + when: + def enqueueMsgResponse = queueClient.sendMessageWithResponse(expectMsg, null, null, null, null) + def peekedMessage = queueClient.peekMessage() + then: + QueueTestHelper.assertResponseStatusCode(enqueueMsgResponse, 201) + peekedMessage.getMessageText() == null + } + + def "Enqueue time to live"() { + given: + queueClient.create() + when: + def enqueueMsgResponse = queueClient.sendMessageWithResponse("test message", + Duration.ofSeconds(0), Duration.ofSeconds(2), Duration.ofSeconds(5), null) + then: + QueueTestHelper.assertResponseStatusCode(enqueueMsgResponse, 201) + } + + def "Enqueue message encoded message"() { + given: + queueClient.create() + def encodingQueueClient = queueServiceBuilderHelper().messageEncoding(QueueMessageEncoding.BASE64).buildClient().getQueueClient(queueName) + def expectMsg = BinaryData.fromString("test message") + when: + def enqueueMsgResponse = encodingQueueClient.sendMessageWithResponse(expectMsg, null, null, null, null) + def peekedMessage = queueClient.peekMessage() + then: + QueueTestHelper.assertResponseStatusCode(enqueueMsgResponse, 201) + Base64.getEncoder().encodeToString(expectMsg.toBytes()) == peekedMessage.getBody().toString() + } + + def "Dequeue message"() { + given: + queueClient.create() + def expectMsg = "test message" + queueClient.sendMessage(expectMsg) + when: + def messageItem = queueClient.receiveMessage() + then: + expectMsg == messageItem.getMessageText() + } + + def "Dequeue encoded message"() { + given: + queueClient.create() + def expectMsg = "test message" + def encodedMsg = Base64.getEncoder().encodeToString(expectMsg.getBytes(StandardCharsets.UTF_8)) + queueClient.sendMessage(encodedMsg) + def encodingQueueClient = queueServiceBuilderHelper().messageEncoding(QueueMessageEncoding.BASE64).buildClient().getQueueClient(queueName) + when: + def messageItem = encodingQueueClient.receiveMessage() + then: + expectMsg == messageItem.getBody().toString() + } + + def "Dequeue fails without handler"() { + given: + queueClient.create() + def expectMsg = "test message" + queueClient.sendMessage(expectMsg) + def encodingQueueClient = queueServiceBuilderHelper().messageEncoding(QueueMessageEncoding.BASE64).buildClient().getQueueClient(queueName) + when: + encodingQueueClient.receiveMessage() + then: + thrown(IllegalArgumentException.class) + } + + def "Dequeue with handler"() { + given: + queueClient.create() + def expectMsg = "test message" + def encodedMsg = Base64.getEncoder().encodeToString(expectMsg.getBytes(StandardCharsets.UTF_8)) + queueClient.sendMessage(encodedMsg) + queueClient.sendMessage(expectMsg) + QueueMessageItem badMessage = null + String queueUrl = null + def encodingQueueClient = queueServiceBuilderHelper() + .messageEncoding(QueueMessageEncoding.BASE64) + .processMessageDecodingErrorAsync({ failure -> + badMessage = failure.getQueueMessageItem() + queueUrl = failure.getQueueAsyncClient().getQueueUrl() + return Mono.empty() + }) + .buildClient().getQueueClient(queueName) + when: + def messageItems = encodingQueueClient.receiveMessages(10).toList() + then: + messageItems.size() == 1 + messageItems[0].getBody().toString() == expectMsg + badMessage != null + badMessage.getBody().toString() == expectMsg + queueUrl == queueClient.getQueueUrl() + } + + def "Dequeue and delete with handler"() { + given: + queueClient.create() + def expectMsg = "test message" + def encodedMsg = Base64.getEncoder().encodeToString(expectMsg.getBytes(StandardCharsets.UTF_8)) + queueClient.sendMessage(encodedMsg) + queueClient.sendMessage(expectMsg) + QueueMessageItem badMessage = null + def encodingQueueClient = queueServiceBuilderHelper() + .messageEncoding(QueueMessageEncoding.BASE64) + .processMessageDecodingErrorAsync({ failure -> + badMessage = failure.getQueueMessageItem() + return failure.getQueueAsyncClient().deleteMessage(badMessage.getMessageId(), badMessage.getPopReceipt()) + }) + .buildClient().getQueueClient(queueName) + when: + def messageItems = encodingQueueClient.receiveMessages(10).toList() + then: + messageItems.size() == 1 + messageItems[0].getBody().toString() == expectMsg + badMessage != null + badMessage.getBody().toString() == expectMsg + } + + def "Dequeue and delete with sync handler"() { + given: + queueClient.create() + def expectMsg = "test message" + def encodedMsg = Base64.getEncoder().encodeToString(expectMsg.getBytes(StandardCharsets.UTF_8)) + queueClient.sendMessage(encodedMsg) + queueClient.sendMessage(expectMsg) + QueueMessageItem badMessage = null + def encodingQueueClient = queueServiceBuilderHelper() + .messageEncoding(QueueMessageEncoding.BASE64) + .processMessageDecodingError({ failure -> + badMessage = failure.getQueueMessageItem() + failure.getQueueClient().deleteMessage(badMessage.getMessageId(), badMessage.getPopReceipt()) + }) + .buildClient().getQueueClient(queueName) + when: + def messageItems = encodingQueueClient.receiveMessages(10).toList() + then: + messageItems.size() == 1 + messageItems[0].getBody().toString() == expectMsg + badMessage != null + badMessage.getBody().toString() == expectMsg + } + + def "Dequeue with handler error"() { + given: + queueClient.create() + def expectMsg = "test message" + def encodedMsg = Base64.getEncoder().encodeToString(expectMsg.getBytes(StandardCharsets.UTF_8)) + queueClient.sendMessage(encodedMsg) + queueClient.sendMessage(expectMsg) + def encodingQueueClient = queueServiceBuilderHelper() + .messageEncoding(QueueMessageEncoding.BASE64) + .processMessageDecodingErrorAsync({ message -> + throw new IllegalStateException("KABOOM") + }) + .buildClient().getQueueClient(queueName) + when: + encodingQueueClient.receiveMessages(10).toList() + then: + thrown(IllegalStateException.class) + } + + def "Dequeue multiple messages"() { + given: + queueClient.create() + def expectMsg1 = "test message 1" + def expectMsg2 = "test message 2" + queueClient.sendMessage(expectMsg1) + queueClient.sendMessage(expectMsg2) + when: + def dequeueMsgIter = queueClient.receiveMessages(2).iterator() + then: + expectMsg1 == dequeueMsgIter.next().getMessageText() + expectMsg2 == dequeueMsgIter.next().getMessageText() + } + + def "Dequeue too many message"() { + given: + queueClient.create() + when: + queueClient.receiveMessages(33).iterator().next() + then: + def e = thrown(QueueStorageException) + QueueTestHelper.assertExceptionStatusCodeAndMessage(e, 400, QueueErrorCode.OUT_OF_RANGE_QUERY_PARAMETER_VALUE) + } + + def "Enqueue Dequeue non-UTF message"() { + given: + queueClient.create() + def encodingQueueClient = queueServiceBuilderHelper().messageEncoding(QueueMessageEncoding.BASE64).buildClient().getQueueClient(queueName) + byte[] content = [ 0xFF, 0x00 ]; // Not a valid UTF-8 byte sequence. + encodingQueueClient.sendMessage(BinaryData.fromBytes(content)) + + when: + def messageItem = encodingQueueClient.receiveMessage() + then: + content == messageItem.getBody().toBytes() + } + + def "Enqueue Peek non-UTF message"() { + given: + queueClient.create() + def encodingQueueClient = queueServiceBuilderHelper().messageEncoding(QueueMessageEncoding.BASE64).buildClient().getQueueClient(queueName) + byte[] content = [ 0xFF, 0x00 ]; // Not a valid UTF-8 byte sequence. + encodingQueueClient.sendMessage(BinaryData.fromBytes(content)) + + when: + def messageItem = encodingQueueClient.peekMessage() + then: + content == messageItem.getBody().toBytes() + } + + def "Peek message"() { + given: + queueClient.create() + def expectMsg = "test message" + queueClient.sendMessage(expectMsg) + when: + def peekedMessage = queueClient.peekMessage() + then: + expectMsg == peekedMessage.getMessageText() + } + + def "Peek encoded message"() { + given: + queueClient.create() + def expectMsg = "test message" + def encodedMsg = Base64.getEncoder().encodeToString(expectMsg.getBytes(StandardCharsets.UTF_8)) + queueClient.sendMessage(encodedMsg) + def encodingQueueClient = queueServiceBuilderHelper().messageEncoding(QueueMessageEncoding.BASE64).buildClient().getQueueClient(queueName) + when: + def peekedMessage = encodingQueueClient.peekMessage() + then: + expectMsg == peekedMessage.getBody().toString() + } + + def "Peek fails without handler"() { + given: + queueClient.create() + def expectMsg = "test message" + queueClient.sendMessage(expectMsg) + def encodingQueueClient = queueServiceBuilderHelper().messageEncoding(QueueMessageEncoding.BASE64).buildClient().getQueueClient(queueName) + when: + encodingQueueClient.peekMessage() + then: + thrown(IllegalArgumentException.class) + } + + def "Peek with handler"() { + given: + queueClient.create() + def expectMsg = "test message" + def encodedMsg = Base64.getEncoder().encodeToString(expectMsg.getBytes(StandardCharsets.UTF_8)) + queueClient.sendMessage(expectMsg) + queueClient.sendMessage(encodedMsg) + PeekedMessageItem badMessage = null + String queueUrl = null + Exception cause = null + def encodingQueueClient = queueServiceBuilderHelper() + .messageEncoding(QueueMessageEncoding.BASE64) + .processMessageDecodingErrorAsync({ failure -> + badMessage = failure.getPeekedMessageItem() + queueUrl = failure.getQueueAsyncClient().getQueueUrl() + cause = failure.getCause() + return Mono.empty() + }) + .buildClient().getQueueClient(queueName) + when: + def peekedMessages = encodingQueueClient.peekMessages(10, null, null).toList() + then: + peekedMessages.size() == 1 + peekedMessages[0].getBody().toString() == expectMsg + badMessage != null + badMessage.getBody().toString() == expectMsg + queueUrl == queueClient.getQueueUrl() + cause != null + } + + def "Peek with sync handler"() { + given: + queueClient.create() + def expectMsg = "test message" + def encodedMsg = Base64.getEncoder().encodeToString(expectMsg.getBytes(StandardCharsets.UTF_8)) + queueClient.sendMessage(expectMsg) + queueClient.sendMessage(encodedMsg) + PeekedMessageItem badMessage = null + Exception cause = null + def encodingQueueClient = queueServiceBuilderHelper() + .messageEncoding(QueueMessageEncoding.BASE64) + .processMessageDecodingError({ failure -> + badMessage = failure.getPeekedMessageItem() + cause = failure.getCause() + // call some sync API here + failure.getQueueClient().getProperties() + }) + .buildClient().getQueueClient(queueName) + when: + def peekedMessages = encodingQueueClient.peekMessages(10, null, null).toList() + then: + peekedMessages.size() == 1 + peekedMessages[0].getBody().toString() == expectMsg + badMessage != null + badMessage.getBody().toString() == expectMsg + cause != null + } + + def "Peek with handler exception"() { + given: + queueClient.create() + def expectMsg = "test message" + def encodedMsg = Base64.getEncoder().encodeToString(expectMsg.getBytes(StandardCharsets.UTF_8)) + queueClient.sendMessage(expectMsg) + queueClient.sendMessage(encodedMsg) + def encodingQueueClient = queueServiceBuilderHelper() + .messageEncoding(QueueMessageEncoding.BASE64) + .processMessageDecodingErrorAsync({ message -> + throw new IllegalStateException("KABOOM") + }) + .buildClient().getQueueClient(queueName) + when: + encodingQueueClient.peekMessages(10, null, null).toList() + then: + thrown(IllegalStateException.class) + } + + def "Peek multiple messages"() { + given: + queueClient.create() + def expectMsg1 = "test message 1" + def expectMsg2 = "test message 2" + queueClient.sendMessage(expectMsg1) + queueClient.sendMessage(expectMsg2) + when: + def peekMsgIter = queueClient.peekMessages(2, Duration.ofSeconds(10), null).iterator() + then: + expectMsg1 == peekMsgIter.next().getMessageText() + expectMsg2 == peekMsgIter.next().getMessageText() + !peekMsgIter.hasNext() + } + + def "Peek too many message"() { + given: + queueClient.create() + when: + queueClient.peekMessages(33, null, null).iterator().next() + then: + def e = thrown(QueueStorageException) + QueueTestHelper.assertExceptionStatusCodeAndMessage(e, 400, QueueErrorCode.OUT_OF_RANGE_QUERY_PARAMETER_VALUE) + } + + def "Peek messages error"() { + when: + queueClient.peekMessage() + then: + def e = thrown(QueueStorageException) + QueueTestHelper.assertExceptionStatusCodeAndMessage(e, 404, QueueErrorCode.QUEUE_NOT_FOUND) + } + + def "Clear messages"() { + given: + queueClient.create() + queueClient.sendMessage("test message 1") + queueClient.sendMessage("test message 2") + queueClient.sendMessage("test message 3") + when: + def getPropertiesResponse = queueClient.getPropertiesWithResponse(null, null) + def clearMsgResponse = queueClient.clearMessagesWithResponse(null, null) + def getPropertiesAfterResponse = queueClient.getPropertiesWithResponse(null, null) + then: + QueueTestHelper.assertResponseStatusCode(getPropertiesResponse, 200) + getPropertiesResponse.getValue().getApproximateMessagesCount() == 3 + QueueTestHelper.assertResponseStatusCode(clearMsgResponse, 204) + QueueTestHelper.assertResponseStatusCode(getPropertiesAfterResponse, 200) + getPropertiesAfterResponse.getValue().getApproximateMessagesCount() == 0 + } + + def "Clear messages error"() { + when: + queueClient.clearMessagesWithResponse(null, null) + then: + def e = thrown(QueueStorageException) + QueueTestHelper.assertExceptionStatusCodeAndMessage(e, 404, QueueErrorCode.QUEUE_NOT_FOUND) + } + + def "Delete message"() { + given: + queueClient.create() + queueClient.sendMessage("test message 1") + queueClient.sendMessage("test message 2") + queueClient.sendMessage("test message 3") + def dequeueMsg = queueClient.receiveMessage() + when: + def getPropertiesResponse = queueClient.getPropertiesWithResponse(null, null) + def deleteMsgResponse = queueClient.deleteMessageWithResponse(dequeueMsg.getMessageId(), dequeueMsg.getPopReceipt(), + null, null) + def getPropertiesAfterResponse = queueClient.getPropertiesWithResponse(null, null) + then: + QueueTestHelper.assertResponseStatusCode(getPropertiesResponse, 200) + getPropertiesResponse.getValue().getApproximateMessagesCount() == 3 + QueueTestHelper.assertResponseStatusCode(deleteMsgResponse, 204) + QueueTestHelper.assertResponseStatusCode(getPropertiesAfterResponse, 200) + getPropertiesAfterResponse.getValue().getApproximateMessagesCount() == 2 + } + + @Unroll + def "Delete message invalid args"() { + given: + queueClient.create() + def expectMsg = "test message" + queueClient.sendMessage(expectMsg) + QueueMessageItem queueMessageItem = queueClient.receiveMessage() + when: + def deleteMessageId = messageId ? queueMessageItem.getMessageId() : queueMessageItem.getMessageId() + "Random" + def deletePopReceipt = popReceipt ? queueMessageItem.getPopReceipt() : queueMessageItem.getPopReceipt() + "Random" + queueClient.deleteMessage(deleteMessageId, deletePopReceipt) + then: + def e = thrown(QueueStorageException) + QueueTestHelper.assertExceptionStatusCodeAndMessage(e, statusCode, errMsg) + where: + messageId | popReceipt | statusCode | errMsg + true | false | 400 | QueueErrorCode.INVALID_QUERY_PARAMETER_VALUE + false | true | 404 | QueueErrorCode.MESSAGE_NOT_FOUND + false | false | 400 | QueueErrorCode.INVALID_QUERY_PARAMETER_VALUE + } + + def "Update message"() { + given: + def updateMsg = "Updated test message" + queueClient.create() + queueClient.sendMessage("test message before update") + + def dequeueMsg = queueClient.receiveMessage() + when: + def updateMsgResponse = queueClient.updateMessageWithResponse(dequeueMsg.getMessageId(), + dequeueMsg.getPopReceipt(), updateMsg, Duration.ofSeconds(1), null, null) + sleepIfLive(2000) + def peekMsgIter = queueClient.peekMessage() + then: + QueueTestHelper.assertResponseStatusCode(updateMsgResponse, 204) + updateMsg == peekMsgIter.getMessageText() + } + + def "Update message no body"() { + given: + def messageText = "test message before update" + queueClient.create() + queueClient.sendMessage(messageText) + + def dequeueMsg = queueClient.receiveMessage() + when: + def updateMsgResponse = queueClient.updateMessageWithResponse(dequeueMsg.getMessageId(), + dequeueMsg.getPopReceipt(), null, Duration.ofSeconds(1), null, null) + sleepIfLive(2000) + def peekMsgIter = queueClient.peekMessage() + then: + QueueTestHelper.assertResponseStatusCode(updateMsgResponse, 204) + messageText == peekMsgIter.getMessageText() + } + + def "Update message null duration"() { + given: + def messageText = "test message before update" + queueClient.create() + queueClient.sendMessage(messageText) + + def dequeueMsg = queueClient.receiveMessage() + when: + def updateMsgResponse = queueClient.updateMessageWithResponse(dequeueMsg.getMessageId(), + dequeueMsg.getPopReceipt(), null, null, null, null) + sleepIfLive(2000) + def peekMsgIter = queueClient.peekMessage() + then: + QueueTestHelper.assertResponseStatusCode(updateMsgResponse, 204) + messageText == peekMsgIter.getMessageText() + } + + @Unroll + def "Update message invalid args"() { + given: + queueClient.create() + def updateMsg = "Updated test message" + queueClient.sendMessage("test message before update") + def dequeueMessageIter = queueClient.receiveMessage() + when: + def updateMessageId = messageId ? dequeueMessageIter.getMessageId() : dequeueMessageIter.getMessageId() + "Random" + def updatePopReceipt = popReceipt ? dequeueMessageIter.getPopReceipt() : dequeueMessageIter.getPopReceipt() + "Random" + queueClient.updateMessage(updateMessageId, updatePopReceipt, updateMsg, Duration.ofSeconds(1)) + then: + def e = thrown(QueueStorageException) + QueueTestHelper.assertExceptionStatusCodeAndMessage(e, statusCode, errMsg) + where: + messageId | popReceipt | statusCode | errMsg + true | false | 400 | QueueErrorCode.INVALID_QUERY_PARAMETER_VALUE + false | true | 404 | QueueErrorCode.MESSAGE_NOT_FOUND + false | false | 400 | QueueErrorCode.INVALID_QUERY_PARAMETER_VALUE + } + + def "Get Queue Name"() { + expect: + queueName == queueClient.getQueueName() + } + + def "Builder bearer token validation"() { + setup: + URL url = new URL(queueClient.getQueueUrl()) + String endpoint = new URL("http", url.getHost(), url.getPort(), url.getFile()).toString() + def builder = new QueueClientBuilder() + .credential(new DefaultAzureCredentialBuilder().build()) + .endpoint(endpoint) + + when: + builder.buildClient() + + then: + thrown(IllegalArgumentException) + } + + // This tests the policy is in the right place because if it were added per retry, it would be after the credentials and auth would fail because we changed a signed header. + def "Per call policy"() { + given: + def queueClient = queueBuilderHelper() + .addPolicy(getPerCallVersionPolicy()).buildClient() + queueClient.create() + + when: + def response = queueClient.getPropertiesWithResponse(null, null) + + then: + notThrown(QueueStorageException) + response.getHeaders().getValue("x-ms-version") == "2017-11-09" + } + + @Retry(count = 5, delay = 1000) + def "create queue with small timeouts fail for service client"() { + setup: + def clientOptions = new HttpClientOptions() + .setApplicationId("client-options-id") + .setResponseTimeout(Duration.ofNanos(1)) + .setReadTimeout(Duration.ofNanos(1)) + .setWriteTimeout(Duration.ofNanos(1)) + .setConnectTimeout(Duration.ofNanos(1)) + + def clientBuilder = new QueueServiceClientBuilder() + .endpoint(environment.primaryAccount.blobEndpoint) + .credential(environment.primaryAccount.credential) + .retryOptions(new RequestRetryOptions(null, 1, null, null, null, null)) + .clientOptions(clientOptions) + + def serviceClient = clientBuilder.buildClient() + + when: + serviceClient.createQueueWithResponse(namer.getRandomName(60), null, Duration.ofSeconds(10), null) + + then: + // test whether failure occurs due to small timeout intervals set on the service client + thrown(RuntimeException) + } + +} diff --git a/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueApiTests.java b/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueApiTests.java deleted file mode 100644 index b81bcf2a28af4..0000000000000 --- a/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueApiTests.java +++ /dev/null @@ -1,826 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.storage.queue; - -import com.azure.core.http.rest.Response; -import com.azure.core.util.BinaryData; -import com.azure.core.util.Context; -import com.azure.identity.DefaultAzureCredentialBuilder; -import com.azure.storage.common.StorageSharedKeyCredential; -import com.azure.storage.queue.models.PeekedMessageItem; -import com.azure.storage.queue.models.QueueAccessPolicy; -import com.azure.storage.queue.models.QueueErrorCode; -import com.azure.storage.queue.models.QueueMessageItem; -import com.azure.storage.queue.models.QueueProperties; -import com.azure.storage.queue.models.QueueSignedIdentifier; -import com.azure.storage.queue.models.QueueStorageException; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.params.ParameterizedTest; -import org.junit.jupiter.params.provider.Arguments; -import org.junit.jupiter.params.provider.MethodSource; -import reactor.core.publisher.Mono; - -import java.net.MalformedURLException; -import java.net.URL; -import java.nio.charset.StandardCharsets; -import java.time.Duration; -import java.time.LocalDateTime; -import java.time.OffsetDateTime; -import java.time.ZoneOffset; -import java.util.ArrayList; -import java.util.Base64; -import java.util.Collections; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.concurrent.atomic.AtomicReference; -import java.util.stream.Collectors; -import java.util.stream.Stream; - -import static com.azure.core.test.utils.TestUtils.assertArraysEqual; -import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertFalse; -import static org.junit.jupiter.api.Assertions.assertNotNull; -import static org.junit.jupiter.api.Assertions.assertNull; -import static org.junit.jupiter.api.Assertions.assertThrows; -import static org.junit.jupiter.api.Assertions.assertTrue; - -public class QueueApiTests extends QueueTestBase { - static final Map TEST_METADATA = Collections.singletonMap("metadata", "value"); - static final Map CREATE_METADATA = Collections.singletonMap("metadata1", "value"); - - private String queueName; - private QueueClient queueClient; - - @BeforeEach - public void setup() { - queueName = getRandomName(60); - primaryQueueServiceClient = queueServiceBuilderHelper().buildClient(); - queueClient = primaryQueueServiceClient.getQueueClient(queueName); - } - - @Test - public void getQueueUrl() { - String accountName = StorageSharedKeyCredential.fromConnectionString(getPrimaryConnectionString()) - .getAccountName(); - String expectedUrl = String.format("https://%s.queue.core.windows.net/%s", accountName, queueName); - - assertEquals(expectedUrl, queueClient.getQueueUrl()); - } - - @Test - public void ipBaseEndpoint() { - QueueClient queueClient = new QueueClientBuilder() - .connectionString(getPrimaryConnectionString()) - .endpoint("http://127.0.0.1:10001/devstoreaccount1/myqueue") - .buildClient(); - - assertEquals("devstoreaccount1", queueClient.getAccountName()); - assertEquals("myqueue", queueClient.getQueueName()); - } - - @Test - public void createQueueWithSharedKey() { - QueueTestHelper.assertResponseStatusCode(queueClient.createWithResponse(null, null, null), 201); - } - - @Test - public void createIfNotExistsQueueWithSharedKey() { - QueueTestHelper.assertResponseStatusCode(queueClient.createIfNotExistsWithResponse(null, null, null), 201); - } - - @Test - public void createIfNotExistsMin() { - String queueName = getRandomName(60); - QueueClient client = primaryQueueServiceClient.getQueueClient(queueName); - - assertEquals(queueName, client.getQueueName()); - assertDoesNotThrow(client::createIfNotExists); - assertNotNull(client.getProperties()); - } - - @Test - public void createIfNotExistsWithSameMetadataOnAQueueClientThatAlreadyExists() { - String queueName = getRandomName(60); - QueueClient client = primaryQueueServiceClient.getQueueClient(queueName); - - assertEquals(201, client.createIfNotExistsWithResponse(null, null, null).getStatusCode()); - assertEquals(204, client.createIfNotExistsWithResponse(null, null, null).getStatusCode()); - } - - @Test - public void createIfNotExistsWithConflictingMetadataOnAQueueClientThatAlreadyExists() { - String queueName = getRandomName(60); - QueueClient client = primaryQueueServiceClient.getQueueClient(queueName); - - Response initialResponse = client.createIfNotExistsWithResponse(TEST_METADATA, null, null); - Response secondResponse = client.createIfNotExistsWithResponse(null, null, null); - - assertEquals(201, initialResponse.getStatusCode()); - assertTrue(initialResponse.getValue()); - assertEquals(409, secondResponse.getStatusCode()); - assertFalse(secondResponse.getValue()); - } - - @Test - public void deleteExistingQueue() { - queueClient.create(); - QueueTestHelper.assertResponseStatusCode(queueClient.deleteWithResponse(null, null), 204); - } - - - @Test - public void deleteQueueError() { - QueueStorageException exception = assertThrows(QueueStorageException.class, queueClient::delete); - QueueTestHelper.assertExceptionStatusCodeAndMessage(exception, 404, QueueErrorCode.QUEUE_NOT_FOUND); - } - - @Test - public void deleteIfExistsMin() { - queueClient.create(); - assertTrue(queueClient.deleteIfExists()); - } - - @Test - public void deleteIfExistsQueue() { - queueClient.create(); - QueueTestHelper.assertResponseStatusCode(queueClient.deleteIfExistsWithResponse(null, null), 204); - } - - @Test - public void deleteIfExistsWithResponseOnAQueueClientThatDoesNotExist() { - String queueName = getRandomName(60); - QueueClient client = primaryQueueServiceClient.getQueueClient(queueName); - - Response response = client.deleteIfExistsWithResponse(null, null); - assertEquals(404, response.getStatusCode()); - assertFalse(response.getValue()); - } - - @Test - public void getProperties() { - queueClient.createWithResponse(TEST_METADATA, null, null); - Response response = queueClient.getPropertiesWithResponse(null, null); - - QueueTestHelper.assertResponseStatusCode(response, 200); - assertEquals(0, response.getValue().getApproximateMessagesCount()); - assertEquals(TEST_METADATA, response.getValue().getMetadata()); - } - - @ParameterizedTest - @MethodSource("setAndClearMetadataSupplier") - public void setAndClearMetadata(Map create, Map set, - Map expectedCreate, Map expectedSet) { - queueClient.createWithResponse(create, null, null); - - Response response = queueClient.getPropertiesWithResponse(null, null); - assertEquals(200, response.getStatusCode()); - assertEquals(expectedCreate, response.getValue().getMetadata()); - - assertEquals(204, queueClient.setMetadataWithResponse(set, null, null).getStatusCode()); - - response = queueClient.getPropertiesWithResponse(null, null); - assertEquals(200, response.getStatusCode()); - assertEquals(expectedSet, response.getValue().getMetadata()); - } - - public static Stream setAndClearMetadataSupplier() { - return Stream.of( - Arguments.of(null, TEST_METADATA, Collections.emptyMap(), TEST_METADATA), - Arguments.of(CREATE_METADATA, TEST_METADATA, CREATE_METADATA, TEST_METADATA), - Arguments.of(CREATE_METADATA, null, CREATE_METADATA, Collections.emptyMap()), - Arguments.of(TEST_METADATA, TEST_METADATA, TEST_METADATA, TEST_METADATA), - Arguments.of(null, null, Collections.emptyMap(), Collections.emptyMap()) - ); - } - - @Test - public void setMetadataQueueError() { - QueueStorageException exception = assertThrows(QueueStorageException.class, - () -> queueClient.setMetadata(TEST_METADATA)); - QueueTestHelper.assertExceptionStatusCodeAndMessage(exception, 404, QueueErrorCode.QUEUE_NOT_FOUND); - } - - @ParameterizedTest - @MethodSource("setInvalidMetadataSupplier") - public void setInvalidMetadata(String invalidKey, int statusCode, QueueErrorCode errMessage) { - queueClient.create(); - QueueStorageException exception = assertThrows(QueueStorageException.class, - () -> queueClient.setMetadata(Collections.singletonMap(invalidKey, "value"))); - QueueTestHelper.assertExceptionStatusCodeAndMessage(exception, statusCode, errMessage); - } - - public static Stream setInvalidMetadataSupplier() { - return Stream.of( - Arguments.of("invalid-meta", 400, QueueErrorCode.INVALID_METADATA), - Arguments.of("12345", 400, QueueErrorCode.INVALID_METADATA), - Arguments.of("", 400, QueueErrorCode.EMPTY_METADATA_KEY) - ); - } - - @Test - public void getAccessPolicy() { - queueClient.create(); - assertFalse(queueClient.getAccessPolicy().iterator().hasNext()); - } - - @Test - public void getAccessPolicyError() { - QueueStorageException exception = assertThrows(QueueStorageException.class, - () -> queueClient.getAccessPolicy().iterator().next()); - QueueTestHelper.assertExceptionStatusCodeAndMessage(exception, 404, QueueErrorCode.QUEUE_NOT_FOUND); - } - - @Test - public void setAccessPolicy() { - queueClient.create(); - QueueAccessPolicy accessPolicy = new QueueAccessPolicy() - .setPermissions("raup") - .setStartsOn(OffsetDateTime.of(LocalDateTime.of(2000, 1, 1, 0, 0), ZoneOffset.UTC)) - .setExpiresOn(OffsetDateTime.of(LocalDateTime.of(2020, 1, 1, 0, 0), ZoneOffset.UTC)); - QueueSignedIdentifier permission = new QueueSignedIdentifier() - .setId("testpermission") - .setAccessPolicy(accessPolicy); - - QueueTestHelper.assertResponseStatusCode( - queueClient.setAccessPolicyWithResponse(Collections.singletonList(permission), null, null), 204); - QueueTestHelper.assertPermissionsAreEqual(permission, queueClient.getAccessPolicy().iterator().next()); - } - - @Test - public void setInvalidAccessPolicy() { - queueClient.create(); - QueueAccessPolicy accessPolicy = new QueueAccessPolicy() - .setPermissions("r") - .setStartsOn(OffsetDateTime.of(LocalDateTime.of(2000, 1, 1, 0, 0), ZoneOffset.UTC)) - .setExpiresOn(OffsetDateTime.of(LocalDateTime.of(2020, 1, 1, 0, 0), ZoneOffset.UTC)); - QueueSignedIdentifier permission = new QueueSignedIdentifier() - .setId("theidofthispermissionislongerthanwhatisallowedbytheserviceandshouldfail") - .setAccessPolicy(accessPolicy); - - QueueStorageException exception = assertThrows(QueueStorageException.class, - () -> queueClient.setAccessPolicy(Collections.singletonList(permission))); - QueueTestHelper.assertExceptionStatusCodeAndMessage(exception, 400, QueueErrorCode.INVALID_XML_DOCUMENT); - } - - @Test - public void setMultipleAccessPolicies() { - queueClient.create(); - QueueAccessPolicy accessPolicy = new QueueAccessPolicy() - .setPermissions("r") - .setStartsOn(OffsetDateTime.of(LocalDateTime.of(2000, 1, 1, 0, 0), ZoneOffset.UTC)) - .setExpiresOn(OffsetDateTime.of(LocalDateTime.of(2020, 1, 1, 0, 0), ZoneOffset.UTC)); - List permissions = new ArrayList<>(3); - for (int i = 0; i < 3; i++) { - permissions.add(new QueueSignedIdentifier().setId("policy" + i).setAccessPolicy(accessPolicy)); - } - - assertEquals(204, queueClient.setAccessPolicyWithResponse(permissions, null, Context.NONE).getStatusCode()); - Iterator nextAccessPolicy = queueClient.getAccessPolicy().iterator(); - QueueTestHelper.assertPermissionsAreEqual(permissions.get(0), nextAccessPolicy.next()); - QueueTestHelper.assertPermissionsAreEqual(permissions.get(1), nextAccessPolicy.next()); - QueueTestHelper.assertPermissionsAreEqual(permissions.get(2), nextAccessPolicy.next()); - assertFalse(nextAccessPolicy.hasNext()); - } - - @Test - public void setTooManyAccessPolicies() { - queueClient.create(); - QueueAccessPolicy accessPolicy = new QueueAccessPolicy() - .setPermissions("r") - .setStartsOn(OffsetDateTime.of(LocalDateTime.of(2000, 1, 1, 0, 0), ZoneOffset.UTC)) - .setExpiresOn(OffsetDateTime.of(LocalDateTime.of(2020, 1, 1, 0, 0), ZoneOffset.UTC)); - List permissions = new ArrayList<>(6); - for (int i = 0; i < 6; i++) { - permissions.add(new QueueSignedIdentifier().setId("policy" + i).setAccessPolicy(accessPolicy)); - } - - QueueStorageException exception = assertThrows(QueueStorageException.class, - () -> queueClient.setAccessPolicyWithResponse(permissions, null, Context.NONE)); - QueueTestHelper.assertExceptionStatusCodeAndMessage(exception, 400, QueueErrorCode.INVALID_XML_DOCUMENT); - } - - @Test - public void enqueueMessage() { - queueClient.create(); - String expectMsg = "test message"; - - assertEquals(201, queueClient.sendMessageWithResponse(expectMsg, null, null, null, null).getStatusCode()); - assertEquals(expectMsg, queueClient.peekMessage().getMessageText()); - } - - @Test - public void enqueueMessageBinaryData() { - queueClient.create(); - BinaryData expectMsg = BinaryData.fromString("test message"); - - assertEquals(201, queueClient.sendMessageWithResponse(expectMsg, null, null, null, null).getStatusCode()); - assertArraysEqual(expectMsg.toBytes(), queueClient.peekMessage().getBody().toBytes()); - } - - @Test - public void enqueueEmptyMessage() { - queueClient.create(); - String expectMsg = ""; - - assertEquals(201, queueClient.sendMessageWithResponse(expectMsg, null, null, null, null).getStatusCode()); - assertNull(queueClient.peekMessage().getMessageText()); - } - - @Test - public void enqueueTimeToLive() { - queueClient.create(); - - assertEquals(201, queueClient.sendMessageWithResponse("test message", Duration.ofSeconds(0), - Duration.ofSeconds(2), Duration.ofSeconds(5), null).getStatusCode()); - } - - @Test - public void enqueueMessageEncodedMessage() { - queueClient.create(); - QueueClient encodingClient = queueServiceBuilderHelper().messageEncoding(QueueMessageEncoding.BASE64) - .buildClient().getQueueClient(queueName); - BinaryData expectMsg = BinaryData.fromString("test message"); - - assertEquals(201, encodingClient.sendMessageWithResponse(expectMsg, null, null, null, null).getStatusCode()); - assertEquals(Base64.getEncoder().encodeToString(expectMsg.toBytes()), - queueClient.peekMessage().getBody().toString()); - } - - @Test - public void dequeueMessage() { - queueClient.create(); - String expectMsg = "test message"; - queueClient.sendMessage(expectMsg); - - assertEquals(expectMsg, queueClient.receiveMessage().getMessageText()); - } - - @Test - public void dequeueEncodedMessage() { - queueClient.create(); - String expectMsg = "test message"; - String encodedMsg = Base64.getEncoder().encodeToString(expectMsg.getBytes(StandardCharsets.UTF_8)); - queueClient.sendMessage(encodedMsg); - QueueClient encodingQueueClient = queueServiceBuilderHelper().messageEncoding(QueueMessageEncoding.BASE64) - .buildClient().getQueueClient(queueName); - - assertEquals(expectMsg, encodingQueueClient.receiveMessage().getBody().toString()); - } - - @Test - public void dequeueFailsWithoutHandler() { - queueClient.create(); - String expectMsg = "test message"; - queueClient.sendMessage(expectMsg); - QueueClient encodingQueueClient = queueServiceBuilderHelper().messageEncoding(QueueMessageEncoding.BASE64) - .buildClient().getQueueClient(queueName); - - assertThrows(IllegalArgumentException.class, encodingQueueClient::receiveMessage); - } - - @Test - public void dequeueWithHandler() { - queueClient.create(); - String expectMsg = "test message"; - String encodedMsg = Base64.getEncoder().encodeToString(expectMsg.getBytes(StandardCharsets.UTF_8)); - queueClient.sendMessage(encodedMsg); - queueClient.sendMessage(expectMsg); - AtomicReference badMessage = new AtomicReference<>(); - AtomicReference queueUrl = new AtomicReference<>(); - - QueueClient encodingQueueClient = queueServiceBuilderHelper() - .messageEncoding(QueueMessageEncoding.BASE64) - .processMessageDecodingErrorAsync(failure -> { - badMessage.set(failure.getQueueMessageItem()); - queueUrl.set(failure.getQueueAsyncClient().getQueueUrl()); - return Mono.empty(); - }) - .buildClient().getQueueClient(queueName); - - List messageItems = encodingQueueClient.receiveMessages(10).stream() - .collect(Collectors.toList()); - - assertEquals(1, messageItems.size()); - assertEquals(expectMsg, messageItems.get(0).getBody().toString()); - assertNotNull(badMessage.get()); - assertEquals(expectMsg, badMessage.get().getBody().toString()); - assertEquals(queueClient.getQueueUrl(), queueUrl.get()); - } - - @Test - public void dequeueAndDeleteWithHandler() { - queueClient.create(); - String expectMsg = "test message"; - String encodedMsg = Base64.getEncoder().encodeToString(expectMsg.getBytes(StandardCharsets.UTF_8)); - queueClient.sendMessage(encodedMsg); - queueClient.sendMessage(expectMsg); - AtomicReference badMessage = new AtomicReference<>(); - QueueClient encodingQueueClient = queueServiceBuilderHelper() - .messageEncoding(QueueMessageEncoding.BASE64) - .processMessageDecodingErrorAsync(failure -> { - QueueMessageItem item = failure.getQueueMessageItem(); - badMessage.set(item); - return failure.getQueueAsyncClient().deleteMessage(item.getMessageId(), item.getPopReceipt()); - }) - .buildClient().getQueueClient(queueName); - - List messageItems = encodingQueueClient.receiveMessages(10).stream() - .collect(Collectors.toList()); - - assertEquals(1, messageItems.size()); - assertEquals(expectMsg, messageItems.get(0).getBody().toString()); - assertNotNull(badMessage.get()); - assertEquals(expectMsg, badMessage.get().getBody().toString()); - } - - @Test - public void dequeueAndDeleteWithSyncHandler() { - queueClient.create(); - String expectMsg = "test message"; - String encodedMsg = Base64.getEncoder().encodeToString(expectMsg.getBytes(StandardCharsets.UTF_8)); - queueClient.sendMessage(encodedMsg); - queueClient.sendMessage(expectMsg); - AtomicReference badMessage = new AtomicReference<>(); - QueueClient encodingQueueClient = queueServiceBuilderHelper() - .messageEncoding(QueueMessageEncoding.BASE64) - .processMessageDecodingError(failure -> { - QueueMessageItem item = failure.getQueueMessageItem(); - badMessage.set(item); - failure.getQueueClient().deleteMessage(item.getMessageId(), item.getPopReceipt()); - }) - .buildClient().getQueueClient(queueName); - - List messageItems = encodingQueueClient.receiveMessages(10).stream() - .collect(Collectors.toList()); - assertEquals(1, messageItems.size()); - assertEquals(expectMsg, messageItems.get(0).getBody().toString()); - assertNotNull(badMessage.get()); - assertEquals(expectMsg, badMessage.get().getBody().toString()); - } - - @Test - public void dequeueWithHandlerError() { - queueClient.create(); - String expectMsg = "test message"; - String encodedMsg = Base64.getEncoder().encodeToString(expectMsg.getBytes(StandardCharsets.UTF_8)); - queueClient.sendMessage(encodedMsg); - queueClient.sendMessage(expectMsg); - QueueClient encodingQueueClient = queueServiceBuilderHelper() - .messageEncoding(QueueMessageEncoding.BASE64) - .processMessageDecodingErrorAsync(message -> { - throw new IllegalStateException("KABOOM"); - }) - .buildClient().getQueueClient(queueName); - - assertThrows(IllegalStateException.class, () -> encodingQueueClient.receiveMessages(10).iterator().next()); - } - - @Test - public void dequeueMultipleMessages() { - queueClient.create(); - String expectMsg1 = "test message 1"; - String expectMsg2 = "test message 2"; - queueClient.sendMessage(expectMsg1); - queueClient.sendMessage(expectMsg2); - - Iterator dequeueMsgIter = queueClient.receiveMessages(2).iterator(); - assertEquals(expectMsg1, dequeueMsgIter.next().getMessageText()); - assertEquals(expectMsg2, dequeueMsgIter.next().getMessageText()); - } - - @Test - public void dequeueTooManyMessages() { - queueClient.create(); - - QueueStorageException exception = assertThrows(QueueStorageException.class, - () -> queueClient.receiveMessages(33).iterator().next()); - QueueTestHelper.assertExceptionStatusCodeAndMessage(exception, 400, - QueueErrorCode.OUT_OF_RANGE_QUERY_PARAMETER_VALUE); - } - - @Test - public void enqueueDequeueNonUtfMessage() { - queueClient.create(); - QueueClient encodingQueueClient = getBase64Client(); - byte[] content = new byte[]{(byte) 0xFF, 0x00}; // Not a valid UTF-8 byte sequence. - encodingQueueClient.sendMessage(BinaryData.fromBytes(content)); - - assertArraysEqual(content, encodingQueueClient.receiveMessage().getBody().toBytes()); - } - - @Test - public void enqueuePeekNonUtfMessage() { - queueClient.create(); - QueueClient encodingQueueClient = getBase64Client(); - byte[] content = new byte[]{(byte) 0xFF, 0x00}; // Not a valid UTF-8 byte sequence. - encodingQueueClient.sendMessage(BinaryData.fromBytes(content)); - - assertArraysEqual(content, encodingQueueClient.peekMessage().getBody().toBytes()); - } - - @Test - public void peekMessage() { - queueClient.create(); - String expectMsg = "test message"; - queueClient.sendMessage(expectMsg); - - assertEquals(expectMsg, queueClient.peekMessage().getMessageText()); - } - - @Test - public void peekEncodedMessage() { - queueClient.create(); - String expectMsg = "test message"; - String encodedMsg = Base64.getEncoder().encodeToString(expectMsg.getBytes(StandardCharsets.UTF_8)); - queueClient.sendMessage(encodedMsg); - QueueClient encodingQueueClient = getBase64Client(); - - assertEquals(expectMsg, encodingQueueClient.peekMessage().getBody().toString()); - } - - @Test - public void peekFailsWithoutHandler() { - queueClient.create(); - String expectMsg = "test message"; - queueClient.sendMessage(expectMsg); - QueueClient encodingQueueClient = getBase64Client(); - - assertThrows(IllegalArgumentException.class, encodingQueueClient::peekMessage); - } - - @Test - public void peekWithHandler() { - queueClient.create(); - String expectMsg = "test message"; - String encodedMsg = Base64.getEncoder().encodeToString(expectMsg.getBytes(StandardCharsets.UTF_8)); - queueClient.sendMessage(expectMsg); - queueClient.sendMessage(encodedMsg); - AtomicReference badMessage = new AtomicReference<>(); - AtomicReference queueUrl = new AtomicReference<>(); - AtomicReference cause = new AtomicReference<>(); - QueueClient encodingQueueClient = queueServiceBuilderHelper() - .messageEncoding(QueueMessageEncoding.BASE64) - .processMessageDecodingErrorAsync(failure -> { - badMessage.set(failure.getPeekedMessageItem()); - queueUrl.set(failure.getQueueAsyncClient().getQueueUrl()); - cause.set(failure.getCause()); - return Mono.empty(); - }) - .buildClient().getQueueClient(queueName); - - List peekedMessages = encodingQueueClient.peekMessages(10, null, null).stream() - .collect(Collectors.toList()); - - assertEquals(1, peekedMessages.size()); - assertEquals(expectMsg, peekedMessages.get(0).getBody().toString()); - assertNotNull(badMessage.get()); - assertEquals(expectMsg, badMessage.get().getBody().toString()); - assertEquals(queueClient.getQueueUrl(), queueUrl.get()); - assertNotNull(cause.get()); - } - - @Test - public void peekWithSyncHandler() { - queueClient.create(); - String expectMsg = "test message"; - String encodedMsg = Base64.getEncoder().encodeToString(expectMsg.getBytes(StandardCharsets.UTF_8)); - queueClient.sendMessage(expectMsg); - queueClient.sendMessage(encodedMsg); - AtomicReference badMessage = new AtomicReference<>(); - AtomicReference cause = new AtomicReference<>(); - QueueClient encodingQueueClient = queueServiceBuilderHelper() - .messageEncoding(QueueMessageEncoding.BASE64) - .processMessageDecodingError(failure -> { - badMessage.set(failure.getPeekedMessageItem()); - cause.set(failure.getCause()); - // call some sync API here - failure.getQueueClient().getProperties(); - }) - .buildClient().getQueueClient(queueName); - - List peekedMessages = encodingQueueClient.peekMessages(10, null, null).stream() - .collect(Collectors.toList()); - - assertEquals(1, peekedMessages.size()); - assertEquals(expectMsg, peekedMessages.get(0).getBody().toString()); - assertNotNull(badMessage.get()); - assertEquals(expectMsg, badMessage.get().getBody().toString()); - assertNotNull(cause.get()); - } - - @Test - public void peekWithHandlerException() { - queueClient.create(); - String expectMsg = "test message"; - String encodedMsg = Base64.getEncoder().encodeToString(expectMsg.getBytes(StandardCharsets.UTF_8)); - queueClient.sendMessage(expectMsg); - queueClient.sendMessage(encodedMsg); - QueueClient encodingQueueClient = queueServiceBuilderHelper() - .messageEncoding(QueueMessageEncoding.BASE64) - .processMessageDecodingErrorAsync(message -> { - throw new IllegalStateException("KABOOM"); - }) - .buildClient().getQueueClient(queueName); - - assertThrows(IllegalStateException.class, - () -> encodingQueueClient.peekMessages(10, null, null).iterator().next()); - } - - @Test - public void peekMultipleMessages() { - queueClient.create(); - String expectMsg1 = "test message 1"; - String expectMsg2 = "test message 2"; - queueClient.sendMessage(expectMsg1); - queueClient.sendMessage(expectMsg2); - - Iterator peekMsgIter = queueClient.peekMessages(2, Duration.ofSeconds(10), null).iterator(); - assertEquals(expectMsg1, peekMsgIter.next().getMessageText()); - assertEquals(expectMsg2, peekMsgIter.next().getMessageText()); - assertFalse(peekMsgIter.hasNext()); - } - - @Test - public void peekTooManyMessages() { - queueClient.create(); - - QueueStorageException exception = assertThrows(QueueStorageException.class, - () -> queueClient.peekMessages(33, null, null).iterator().next()); - QueueTestHelper.assertExceptionStatusCodeAndMessage(exception, 400, - QueueErrorCode.OUT_OF_RANGE_QUERY_PARAMETER_VALUE); - } - - @Test - public void peekMessageError() { - QueueStorageException exception = assertThrows(QueueStorageException.class, queueClient::peekMessage); - QueueTestHelper.assertExceptionStatusCodeAndMessage(exception, 404, QueueErrorCode.QUEUE_NOT_FOUND); - } - - @Test - public void clearMessages() { - queueClient.create(); - queueClient.sendMessage("test message 1"); - queueClient.sendMessage("test message 2"); - queueClient.sendMessage("test message 3"); - - Response propertiesResponse = queueClient.getPropertiesWithResponse(null, null); - assertEquals(200, propertiesResponse.getStatusCode()); - assertEquals(3, propertiesResponse.getValue().getApproximateMessagesCount()); - - assertEquals(204, queueClient.clearMessagesWithResponse(null, null).getStatusCode()); - - propertiesResponse = queueClient.getPropertiesWithResponse(null, null); - assertEquals(200, propertiesResponse.getStatusCode()); - assertEquals(0, propertiesResponse.getValue().getApproximateMessagesCount()); - } - - @Test - public void clearMessagesError() { - QueueStorageException exception = assertThrows(QueueStorageException.class, - () -> queueClient.clearMessagesWithResponse(null, null)); - QueueTestHelper.assertExceptionStatusCodeAndMessage(exception, 404, QueueErrorCode.QUEUE_NOT_FOUND); - } - - @Test - public void deleteMessage() { - queueClient.create(); - queueClient.sendMessage("test message 1"); - queueClient.sendMessage("test message 2"); - queueClient.sendMessage("test message 3"); - QueueMessageItem dequeueMsg = queueClient.receiveMessage(); - - Response propertiesResponse = queueClient.getPropertiesWithResponse(null, null); - assertEquals(200, propertiesResponse.getStatusCode()); - assertEquals(3, propertiesResponse.getValue().getApproximateMessagesCount()); - - assertEquals(204, queueClient.deleteMessageWithResponse(dequeueMsg.getMessageId(), dequeueMsg.getPopReceipt(), - null, null).getStatusCode()); - - propertiesResponse = queueClient.getPropertiesWithResponse(null, null); - assertEquals(200, propertiesResponse.getStatusCode()); - assertEquals(2, propertiesResponse.getValue().getApproximateMessagesCount()); - } - - @ParameterizedTest - @MethodSource("invalidArgsSupplier") - public void deleteMessageInvalidArgs(boolean messageId, boolean popReceipt, int statusCode, QueueErrorCode errMsg) { - queueClient.create(); - String expectMsg = "test message"; - queueClient.sendMessage(expectMsg); - QueueMessageItem messageItem = queueClient.receiveMessage(); - String deleteMessageId = messageId ? messageItem.getMessageId() : messageItem.getMessageId() + "Random"; - String deletePopReceipt = popReceipt ? messageItem.getPopReceipt() : messageItem.getPopReceipt() + "Random"; - - QueueStorageException exception = assertThrows(QueueStorageException.class, - () -> queueClient.deleteMessage(deleteMessageId, deletePopReceipt)); - QueueTestHelper.assertExceptionStatusCodeAndMessage(exception, statusCode, errMsg); - } - - @Test - public void updateMessage() { - String updateMsg = "Updated test message"; - queueClient.create(); - queueClient.sendMessage("test message before update"); - - QueueMessageItem dequeueMsg = queueClient.receiveMessage(); - - assertEquals(204, queueClient.updateMessageWithResponse(dequeueMsg.getMessageId(), dequeueMsg.getPopReceipt(), - updateMsg, Duration.ofSeconds(1), null, null).getStatusCode()); - - sleepIfRunningAgainstService(2000); - - assertEquals(updateMsg, queueClient.peekMessage().getMessageText()); - } - - @Test - public void updateMessageNoBody() { - String messageText = "test message before update"; - queueClient.create(); - queueClient.sendMessage(messageText); - - QueueMessageItem dequeueMsg = queueClient.receiveMessage(); - - assertEquals(204, queueClient.updateMessageWithResponse(dequeueMsg.getMessageId(), dequeueMsg.getPopReceipt(), - null, Duration.ofSeconds(1), null, null).getStatusCode()); - - sleepIfRunningAgainstService(2000); - - assertEquals(messageText, queueClient.peekMessage().getMessageText()); - } - - @Test - public void updateMessageNullDuration() { - String messageText = "test message before update"; - queueClient.create(); - queueClient.sendMessage(messageText); - - QueueMessageItem dequeueMsg = queueClient.receiveMessage(); - - assertEquals(204, queueClient.updateMessageWithResponse(dequeueMsg.getMessageId(), dequeueMsg.getPopReceipt(), - null, null, null, null).getStatusCode()); - - sleepIfRunningAgainstService(2000); - - assertEquals(messageText, queueClient.peekMessage().getMessageText()); - } - - @ParameterizedTest - @MethodSource("invalidArgsSupplier") - public void updateMessageInvalidArgs(boolean messageId, boolean popReceipt, int statusCode, QueueErrorCode errMsg) { - queueClient.create(); - String updateMsg = "Updated test message"; - queueClient.sendMessage("test message before update"); - QueueMessageItem messageItem = queueClient.receiveMessage(); - - String updateMessageId = messageId ? messageItem.getMessageId() : messageItem.getMessageId() + "Random"; - String updatePopReceipt = popReceipt ? messageItem.getPopReceipt() : messageItem.getPopReceipt() + "Random"; - - QueueStorageException exception = assertThrows(QueueStorageException.class, - () -> queueClient.updateMessage(updateMessageId, updatePopReceipt, updateMsg, Duration.ofSeconds(1))); - QueueTestHelper.assertExceptionStatusCodeAndMessage(exception, statusCode, errMsg); - } - - public static Stream invalidArgsSupplier() { - return Stream.of( - Arguments.of(true, false, 400, QueueErrorCode.INVALID_QUERY_PARAMETER_VALUE), - Arguments.of(false, true, 404, QueueErrorCode.MESSAGE_NOT_FOUND), - Arguments.of(false, false, 400, QueueErrorCode.INVALID_QUERY_PARAMETER_VALUE) - ); - } - - @Test - public void getQueueName() { - assertEquals(queueName, queueClient.getQueueName()); - } - - @Test - public void builderBearerTokenValidation() throws MalformedURLException { - URL url = new URL(queueClient.getQueueUrl()); - String endpoint = new URL("http", url.getHost(), url.getPort(), url.getFile()).toString(); - - assertThrows(IllegalArgumentException.class, () -> new QueueClientBuilder() - .credential(new DefaultAzureCredentialBuilder().build()) - .endpoint(endpoint) - .buildClient()); - } - - // This tests the policy is in the right place because if it were added per retry, it would be after the credentials - // and auth would fail because we changed a signed header. - @Test - public void perCallPolicy() { - QueueClient queueClient = queueBuilderHelper().addPolicy(getPerCallVersionPolicy()).buildClient(); - queueClient.create(); - - assertEquals("2017-11-09", queueClient.getPropertiesWithResponse(null, null).getHeaders() - .getValue("x-ms-version")); - } - - private QueueClient getBase64Client() { - return queueServiceBuilderHelper().messageEncoding(QueueMessageEncoding.BASE64).buildClient() - .getQueueClient(queueName); - } -} diff --git a/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueAsyncApiTests.java b/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueAsyncApiTests.java deleted file mode 100644 index 9e19235c622c5..0000000000000 --- a/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueAsyncApiTests.java +++ /dev/null @@ -1,761 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.storage.queue; - -import com.azure.core.util.BinaryData; -import com.azure.storage.common.StorageSharedKeyCredential; -import com.azure.storage.queue.models.PeekedMessageItem; -import com.azure.storage.queue.models.QueueAccessPolicy; -import com.azure.storage.queue.models.QueueErrorCode; -import com.azure.storage.queue.models.QueueMessageItem; -import com.azure.storage.queue.models.QueueSignedIdentifier; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.params.ParameterizedTest; -import org.junit.jupiter.params.provider.MethodSource; -import reactor.core.publisher.Mono; -import reactor.test.StepVerifier; - -import java.nio.charset.StandardCharsets; -import java.time.Duration; -import java.time.LocalDateTime; -import java.time.OffsetDateTime; -import java.time.ZoneOffset; -import java.util.ArrayList; -import java.util.Base64; -import java.util.Collections; -import java.util.List; -import java.util.Map; -import java.util.concurrent.atomic.AtomicReference; - -import static com.azure.core.test.utils.TestUtils.assertArraysEqual; -import static com.azure.storage.queue.QueueApiTests.CREATE_METADATA; -import static com.azure.storage.queue.QueueApiTests.TEST_METADATA; -import static com.azure.storage.queue.QueueTestHelper.assertAsyncResponseStatusCode; -import static com.azure.storage.queue.QueueTestHelper.assertExceptionStatusCodeAndMessage; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertFalse; -import static org.junit.jupiter.api.Assertions.assertNotNull; -import static org.junit.jupiter.api.Assertions.assertNull; - -public class QueueAsyncApiTests extends QueueTestBase { - private String queueName; - private QueueAsyncClient queueAsyncClient; - - @BeforeEach - public void setup() { - queueName = getRandomName(60); - primaryQueueServiceAsyncClient = queueServiceBuilderHelper().buildAsyncClient(); - queueAsyncClient = primaryQueueServiceAsyncClient.getQueueAsyncClient(queueName); - } - - @Test - public void getQueueUrl() { - String accountName = StorageSharedKeyCredential.fromConnectionString(getPrimaryConnectionString()) - .getAccountName(); - String expectURL = String.format("https://%s.queue.core.windows.net/%s", accountName, queueName); - - assertEquals(expectURL, queueAsyncClient.getQueueUrl()); - } - - @Test - public void ipBasedEndpoint() { - QueueAsyncClient queueAsyncClient = new QueueClientBuilder() - .connectionString(getPrimaryConnectionString()) - .endpoint("http://127.0.0.1:10001/devstoreaccount1/myqueue") - .buildAsyncClient(); - - assertEquals("devstoreaccount1", queueAsyncClient.getAccountName()); - assertEquals("myqueue", queueAsyncClient.getQueueName()); - } - - @Test - public void createQueueWithSharedKey() { - assertAsyncResponseStatusCode(queueAsyncClient.createWithResponse(null), 201); - } - - @Test - public void createIfNotExistsQueueWithSharedKey() { - assertAsyncResponseStatusCode(queueAsyncClient.createIfNotExistsWithResponse(null), 201); - } - - @Test - public void createIfNotExistsQueueWithSameMetadata() { - assertAsyncResponseStatusCode(queueAsyncClient.createIfNotExistsWithResponse(null), 201); - // if metadata is the same response code is 204 - assertAsyncResponseStatusCode(queueAsyncClient.createIfNotExistsWithResponse(null), 204); - } - - @Test - public void createIfNotExistsQueueWithConflictingMetadata() { - assertAsyncResponseStatusCode(queueAsyncClient.createIfNotExistsWithResponse(CREATE_METADATA), 201); - // if metadata is the different response code is 409 - assertAsyncResponseStatusCode(queueAsyncClient.createIfNotExistsWithResponse(TEST_METADATA), 409); - } - - @Test - public void deleteExistingQueue() { - queueAsyncClient.createWithResponse(null).block(); - assertAsyncResponseStatusCode(queueAsyncClient.deleteWithResponse(), 204); - } - - @Test - public void deleteQueueError() { - StepVerifier.create(queueAsyncClient.deleteWithResponse()) - .verifyErrorSatisfies(ex -> assertExceptionStatusCodeAndMessage(ex, 404, QueueErrorCode.QUEUE_NOT_FOUND)); - } - - @Test - public void deleteIfExistsQueue() { - queueAsyncClient.createWithResponse(null).block(); - assertAsyncResponseStatusCode(queueAsyncClient.deleteIfExistsWithResponse(), 204); - } - - @Test - public void deleteIfExistsQueueThatDoesNotExist() { - StepVerifier.create(queueAsyncClient.deleteIfExistsWithResponse()) - .assertNext(response -> { - assertEquals(404, response.getStatusCode()); - assertFalse(response.getValue()); - }) - .verifyComplete(); - } - - @Test - public void getProperties() { - queueAsyncClient.createWithResponse(TEST_METADATA).block(); - StepVerifier.create(queueAsyncClient.getPropertiesWithResponse()) - .assertNext(response -> { - assertEquals(200, response.getStatusCode()); - assertEquals(0, response.getValue().getApproximateMessagesCount()); - assertEquals(TEST_METADATA, response.getValue().getMetadata()); - }) - .verifyComplete(); - } - - @Test - public void getPropertiesError() { - StepVerifier.create(queueAsyncClient.getProperties()) - .verifyErrorSatisfies(ex -> assertExceptionStatusCodeAndMessage(ex, 404, QueueErrorCode.QUEUE_NOT_FOUND)); - } - - @ParameterizedTest - @MethodSource("com.azure.storage.queue.QueueApiTests#setAndClearMetadataSupplier") - public void setAndClearMetadata(Map create, Map set, - Map expectedCreate, Map expectedSet) { - queueAsyncClient.createWithResponse(create).block(); - - StepVerifier.create(queueAsyncClient.getPropertiesWithResponse()) - .assertNext(response -> { - assertEquals(200, response.getStatusCode()); - assertEquals(expectedCreate, response.getValue().getMetadata()); - }) - .verifyComplete(); - - assertAsyncResponseStatusCode(queueAsyncClient.setMetadataWithResponse(set), 204); - - StepVerifier.create(queueAsyncClient.getPropertiesWithResponse()) - .assertNext(response -> { - assertEquals(200, response.getStatusCode()); - assertEquals(expectedSet, response.getValue().getMetadata()); - }) - .verifyComplete(); - } - - @Test - public void setMetadataQueueError() { - StepVerifier.create(queueAsyncClient.setMetadataWithResponse(TEST_METADATA)) - .verifyErrorSatisfies(ex -> assertExceptionStatusCodeAndMessage(ex, 404, QueueErrorCode.QUEUE_NOT_FOUND)); - } - - @ParameterizedTest - @MethodSource("com.azure.storage.queue.QueueApiTests#setInvalidMetadataSupplier") - public void setInvalidMetadata(String invalidKey, int statusCode, QueueErrorCode errMessage) { - queueAsyncClient.create().block(); - StepVerifier.create(queueAsyncClient.setMetadataWithResponse(Collections.singletonMap(invalidKey, "value"))) - .verifyErrorSatisfies(ex -> assertExceptionStatusCodeAndMessage(ex, statusCode, errMessage)); - } - - @Test - public void getAccessPolicy() { - queueAsyncClient.create().block(); - StepVerifier.create(queueAsyncClient.getAccessPolicy()) - .expectNextCount(0) - .verifyComplete(); - } - - @Test - public void getAccessPolicyDoesError() { - StepVerifier.create(queueAsyncClient.getAccessPolicy()) - .verifyErrorSatisfies(ex -> assertExceptionStatusCodeAndMessage(ex, 404, QueueErrorCode.QUEUE_NOT_FOUND)); - } - - @Test - public void setAccessPolicy() { - queueAsyncClient.create().block(); - QueueAccessPolicy accessPolicy = new QueueAccessPolicy() - .setPermissions("raup") - .setStartsOn(OffsetDateTime.of(LocalDateTime.of(2000, 1, 1, 0, 0), ZoneOffset.UTC)) - .setExpiresOn(OffsetDateTime.of(LocalDateTime.of(2020, 1, 1, 0, 0), ZoneOffset.UTC)); - QueueSignedIdentifier permission = new QueueSignedIdentifier() - .setId("testpermission") - .setAccessPolicy(accessPolicy); - - assertAsyncResponseStatusCode(queueAsyncClient.setAccessPolicyWithResponse( - Collections.singletonList(permission)), 204); - StepVerifier.create(queueAsyncClient.getAccessPolicy()) - .assertNext(policy -> QueueTestHelper.assertPermissionsAreEqual(permission, policy)) - .verifyComplete(); - } - - @Test - public void setInvalidAccessPolicy() { - QueueAccessPolicy accessPolicy = new QueueAccessPolicy() - .setPermissions("r") - .setStartsOn(OffsetDateTime.of(LocalDateTime.of(2000, 1, 1, 0, 0), ZoneOffset.UTC)) - .setExpiresOn(OffsetDateTime.of(LocalDateTime.of(2020, 1, 1, 0, 0), ZoneOffset.UTC)); - QueueSignedIdentifier permission = new QueueSignedIdentifier() - .setId("theidofthispermissionislongerthanwhatisallowedbytheserviceandshouldfail") - .setAccessPolicy(accessPolicy); - queueAsyncClient.create().block(); - - StepVerifier.create(queueAsyncClient.setAccessPolicyWithResponse(Collections.singletonList(permission))) - .verifyErrorSatisfies(ex -> assertExceptionStatusCodeAndMessage(ex, 400, - QueueErrorCode.INVALID_XML_DOCUMENT)); - } - - @Test - public void setMultipleAccessPolicies() { - QueueAccessPolicy accessPolicy = new QueueAccessPolicy() - .setPermissions("r") - .setStartsOn(OffsetDateTime.of(LocalDateTime.of(2000, 1, 1, 0, 0), ZoneOffset.UTC)) - .setExpiresOn(OffsetDateTime.of(LocalDateTime.of(2020, 1, 1, 0, 0), ZoneOffset.UTC)); - List permissions = new ArrayList<>(); - for (int i = 0; i < 3; i++) { - permissions.add(new QueueSignedIdentifier() - .setId("policy" + i) - .setAccessPolicy(accessPolicy)); - } - queueAsyncClient.create().block(); - - assertAsyncResponseStatusCode(queueAsyncClient.setAccessPolicyWithResponse(permissions), 204); - StepVerifier.create(queueAsyncClient.getAccessPolicy()) - .assertNext(it -> QueueTestHelper.assertPermissionsAreEqual(permissions.get(0), it)) - .assertNext(it -> QueueTestHelper.assertPermissionsAreEqual(permissions.get(1), it)) - .assertNext(it -> QueueTestHelper.assertPermissionsAreEqual(permissions.get(2), it)) - .verifyComplete(); - } - - @Test - public void setTooManyAccessPolicies() { - QueueAccessPolicy accessPolicy = new QueueAccessPolicy() - .setPermissions("r") - .setStartsOn(OffsetDateTime.of(LocalDateTime.of(2000, 1, 1, 0, 0), ZoneOffset.UTC)) - .setExpiresOn(OffsetDateTime.of(LocalDateTime.of(2020, 1, 1, 0, 0), ZoneOffset.UTC)); - List permissions = new ArrayList<>(); - for (int i = 0; i < 6; i++) { - permissions.add(new QueueSignedIdentifier() - .setId("policy" + i) - .setAccessPolicy(accessPolicy)); - } - queueAsyncClient.create().block(); - - StepVerifier.create(queueAsyncClient.setAccessPolicyWithResponse(permissions)) - .verifyErrorSatisfies(ex -> assertExceptionStatusCodeAndMessage(ex, 400, - QueueErrorCode.INVALID_XML_DOCUMENT)); - } - - @Test - public void enqueueMessage() { - queueAsyncClient.create().block(); - String expectMsg = "test message"; - - assertAsyncResponseStatusCode(queueAsyncClient.sendMessageWithResponse(expectMsg, null, null), 201); - StepVerifier.create(queueAsyncClient.peekMessage()) - .assertNext(peekedMessageItem -> assertEquals(expectMsg, peekedMessageItem.getMessageText())) - .verifyComplete(); - } - - @Test - public void enqueueMessageBinaryData() { - queueAsyncClient.create().block(); - BinaryData expectMsg = BinaryData.fromString("test message"); - - assertAsyncResponseStatusCode(queueAsyncClient.sendMessageWithResponse(expectMsg, null, null), 201); - StepVerifier.create(queueAsyncClient.peekMessage()) - .assertNext(message -> assertArraysEqual(expectMsg.toBytes(), message.getBody().toBytes())) - .verifyComplete(); - } - - @Test - public void enqueueEmptyMessage() { - queueAsyncClient.create().block(); - - assertAsyncResponseStatusCode(queueAsyncClient.sendMessageWithResponse("", null, null), 201); - StepVerifier.create(queueAsyncClient.peekMessage()) - .assertNext(message -> assertNull(message.getMessageText())) - .verifyComplete(); - } - - @Test - public void enqueueTimeToLive() { - queueAsyncClient.create().block(); - - assertAsyncResponseStatusCode(queueAsyncClient.sendMessageWithResponse("test message", Duration.ofSeconds(0), - Duration.ofSeconds(2)), 201); - } - - @Test - public void enqueueMessageEncodedMessage() { - queueAsyncClient.create().block(); - QueueAsyncClient encodingQueueClient = queueServiceBuilderHelper().messageEncoding(QueueMessageEncoding.BASE64) - .buildAsyncClient().getQueueAsyncClient(queueName); - BinaryData expectMsg = BinaryData.fromString("test message"); - - assertAsyncResponseStatusCode(encodingQueueClient.sendMessageWithResponse(expectMsg, null, null), 201); - StepVerifier.create(queueAsyncClient.peekMessage()) - .assertNext(message -> assertEquals(Base64.getEncoder().encodeToString(expectMsg.toBytes()), - message.getBody().toString())) - .verifyComplete(); - } - - @Test - public void dequeueMessageFromEmptyQueue() { - queueAsyncClient.create().block(); - StepVerifier.create(queueAsyncClient.receiveMessage()).verifyComplete(); - } - - @Test - public void dequeueMessage() { - queueAsyncClient.create().block(); - String expectMsg = "test message"; - queueAsyncClient.sendMessage(expectMsg).block(); - - StepVerifier.create(queueAsyncClient.receiveMessage()) - .assertNext(message -> assertEquals(expectMsg, message.getMessageText())) - .verifyComplete(); - } - - @Test - public void dequeueEncodedMessage() { - queueAsyncClient.create().block(); - String expectMsg = "test message"; - String encodedMsg = Base64.getEncoder().encodeToString(expectMsg.getBytes(StandardCharsets.UTF_8)); - queueAsyncClient.sendMessage(encodedMsg).block(); - QueueAsyncClient encodingQueueClient = queueServiceBuilderHelper().messageEncoding(QueueMessageEncoding.BASE64) - .buildAsyncClient().getQueueAsyncClient(queueName); - - StepVerifier.create(encodingQueueClient.receiveMessage()) - .assertNext(message -> assertEquals(expectMsg, message.getBody().toString())) - .verifyComplete(); - } - - @Test - public void dequeueFailsWithoutHandler() { - queueAsyncClient.create().block(); - String expectMsg = "test message"; - queueAsyncClient.sendMessage(expectMsg).block(); - QueueAsyncClient encodingQueueClient = queueServiceBuilderHelper().messageEncoding(QueueMessageEncoding.BASE64) - .buildAsyncClient().getQueueAsyncClient(queueName); - - StepVerifier.create(encodingQueueClient.receiveMessage()).verifyError(IllegalArgumentException.class); - } - - @Test - public void dequeueWithHandler() { - queueAsyncClient.create().block(); - String expectMsg = "test message"; - String encodedMsg = Base64.getEncoder().encodeToString(expectMsg.getBytes(StandardCharsets.UTF_8)); - queueAsyncClient.sendMessage(expectMsg).block(); - queueAsyncClient.sendMessage(encodedMsg).block(); - AtomicReference badMessage = new AtomicReference<>(); - AtomicReference queueUrl = new AtomicReference<>(); - QueueAsyncClient encodingQueueClient = queueServiceBuilderHelper() - .messageEncoding(QueueMessageEncoding.BASE64) - .processMessageDecodingErrorAsync(failure -> { - badMessage.set(failure.getQueueMessageItem()); - queueUrl.set(failure.getQueueAsyncClient().getQueueUrl()); - return Mono.empty(); - }) - .buildAsyncClient().getQueueAsyncClient(queueName); - - StepVerifier.create(encodingQueueClient.receiveMessages(10)) - .assertNext(message -> { - assertEquals(expectMsg, message.getBody().toString()); - assertNotNull(badMessage.get()); - assertEquals(expectMsg, badMessage.get().getBody().toString()); - assertEquals(queueAsyncClient.getQueueUrl(), queueUrl.get()); - }) - .verifyComplete(); - } - - @Test - public void dequeueAndDeleteWithHandler() { - queueAsyncClient.create().block(); - String expectMsg = "test message"; - String encodedMsg = Base64.getEncoder().encodeToString(expectMsg.getBytes(StandardCharsets.UTF_8)); - queueAsyncClient.sendMessage(expectMsg).block(); - queueAsyncClient.sendMessage(encodedMsg).block(); - AtomicReference badMessage = new AtomicReference<>(); - QueueAsyncClient encodingQueueClient = queueServiceBuilderHelper() - .messageEncoding(QueueMessageEncoding.BASE64) - .processMessageDecodingErrorAsync(failure -> { - QueueMessageItem item = failure.getQueueMessageItem(); - badMessage.set(item); - return failure.getQueueAsyncClient().deleteMessage(item.getMessageId(), item.getPopReceipt()); - }) - .buildAsyncClient().getQueueAsyncClient(queueName); - - StepVerifier.create(encodingQueueClient.receiveMessages(10)) - .assertNext(message -> { - assertEquals(expectMsg, message.getBody().toString()); - assertNotNull(badMessage.get()); - assertEquals(expectMsg, badMessage.get().getBody().toString()); - }) - .verifyComplete(); - } - - @Test - public void dequeueAndDeleteWithSyncHandler() { - queueAsyncClient.create().block(); - String expectMsg = "test message"; - String encodedMsg = Base64.getEncoder().encodeToString(expectMsg.getBytes(StandardCharsets.UTF_8)); - queueAsyncClient.sendMessage(expectMsg).block(); - queueAsyncClient.sendMessage(encodedMsg).block(); - AtomicReference badMessage = new AtomicReference<>(); - QueueAsyncClient encodingQueueClient = queueServiceBuilderHelper() - .messageEncoding(QueueMessageEncoding.BASE64) - .processMessageDecodingError(failure -> { - QueueMessageItem item = failure.getQueueMessageItem(); - badMessage.set(item); - failure.getQueueClient().deleteMessage(item.getMessageId(), item.getPopReceipt()); - }) - .buildAsyncClient().getQueueAsyncClient(queueName); - - StepVerifier.create(encodingQueueClient.receiveMessages(10)) - .assertNext(message -> { - assertEquals(expectMsg, message.getBody().toString()); - assertNotNull(badMessage.get()); - assertEquals(expectMsg, badMessage.get().getBody().toString()); - }) - .verifyComplete(); - } - - @Test - public void dequeueWithHandlerError() { - queueAsyncClient.create().block(); - String expectMsg = "test message"; - String encodedMsg = Base64.getEncoder().encodeToString(expectMsg.getBytes(StandardCharsets.UTF_8)); - queueAsyncClient.sendMessage(expectMsg).block(); - queueAsyncClient.sendMessage(encodedMsg).block(); - QueueAsyncClient encodingQueueClient = queueServiceBuilderHelper() - .messageEncoding(QueueMessageEncoding.BASE64) - .processMessageDecodingErrorAsync(message -> { - throw new IllegalStateException("KABOOM"); - }) - .buildAsyncClient().getQueueAsyncClient(queueName); - - StepVerifier.create(encodingQueueClient.receiveMessages(10)).verifyError(IllegalStateException.class); - } - - @Test - public void dequeueMultipleMessages() { - queueAsyncClient.create().block(); - String expectMsg1 = "test message 1"; - String expectMsg2 = "test message 2"; - queueAsyncClient.sendMessage(expectMsg1).block(); - queueAsyncClient.sendMessage(expectMsg2).block(); - - StepVerifier.create(queueAsyncClient.receiveMessages(2)) - .assertNext(message -> assertEquals(expectMsg1, message.getMessageText())) - .assertNext(message -> assertEquals(expectMsg2, message.getMessageText())) - .verifyComplete(); - } - - @Test - public void dequeueTooManyMessages() { - queueAsyncClient.create().block(); - StepVerifier.create(queueAsyncClient.receiveMessages(33)).verifyErrorSatisfies(ex -> - assertExceptionStatusCodeAndMessage(ex, 400, QueueErrorCode.OUT_OF_RANGE_QUERY_PARAMETER_VALUE)); - } - - @Test - public void enqueueDequeueNonUtfMessage() { - queueAsyncClient.create().block(); - QueueAsyncClient encodingQueueClient = queueServiceBuilderHelper().messageEncoding(QueueMessageEncoding.BASE64) - .buildAsyncClient().getQueueAsyncClient(queueName); - byte[] content = new byte[]{(byte) 0xFF, 0x00}; // Not a valid UTF-8 byte sequence. - encodingQueueClient.sendMessage(BinaryData.fromBytes(content)).block(); - - StepVerifier.create(encodingQueueClient.receiveMessage()) - .assertNext(message -> assertArraysEqual(content, message.getBody().toBytes())) - .verifyComplete(); - } - - @Test - public void enqueuePeekNonUtfMessage() { - queueAsyncClient.create().block(); - QueueAsyncClient encodingQueueClient = queueServiceBuilderHelper().messageEncoding(QueueMessageEncoding.BASE64) - .buildAsyncClient().getQueueAsyncClient(queueName); - byte[] content = new byte[]{(byte) 0xFF, 0x00}; // Not a valid UTF-8 byte sequence. - encodingQueueClient.sendMessage(BinaryData.fromBytes(content)).block(); - - StepVerifier.create(encodingQueueClient.peekMessage()) - .assertNext(message -> assertArraysEqual(content, message.getBody().toBytes())) - .verifyComplete(); - } - - @Test - public void peekMessageFromEmptyQueue() { - queueAsyncClient.create().block(); - StepVerifier.create(queueAsyncClient.peekMessage()).verifyComplete(); - } - - @Test - public void peekMessage() { - queueAsyncClient.create().block(); - String expectMsg = "test message"; - queueAsyncClient.sendMessage(expectMsg).block(); - - StepVerifier.create(queueAsyncClient.peekMessage()) - .assertNext(message -> assertEquals(expectMsg, message.getMessageText())) - .verifyComplete(); - } - - @Test - public void peekEncodedMessage() { - queueAsyncClient.create().block(); - String expectMsg = "test message"; - String encodedMsg = Base64.getEncoder().encodeToString(expectMsg.getBytes(StandardCharsets.UTF_8)); - queueAsyncClient.sendMessage(encodedMsg).block(); - QueueAsyncClient encodingQueueClient = queueServiceBuilderHelper().messageEncoding(QueueMessageEncoding.BASE64) - .buildAsyncClient().getQueueAsyncClient(queueName); - - StepVerifier.create(encodingQueueClient.peekMessage()) - .assertNext(message -> assertEquals(expectMsg, message.getBody().toString())) - .verifyComplete(); - } - - @Test - public void peekFailsWithoutHandler() { - queueAsyncClient.create().block(); - queueAsyncClient.sendMessage("test message").block(); - QueueAsyncClient encodingQueueClient = queueServiceBuilderHelper().messageEncoding(QueueMessageEncoding.BASE64) - .buildAsyncClient().getQueueAsyncClient(queueName); - - StepVerifier.create(encodingQueueClient.peekMessage()).verifyError(IllegalArgumentException.class); - } - - @Test - public void peekWithHandler() { - queueAsyncClient.create().block(); - String expectMsg = "test message"; - String encodedMsg = Base64.getEncoder().encodeToString(expectMsg.getBytes(StandardCharsets.UTF_8)); - queueAsyncClient.sendMessage(expectMsg).block(); - queueAsyncClient.sendMessage(encodedMsg).block(); - AtomicReference badMessage = new AtomicReference<>(); - AtomicReference queueUrl = new AtomicReference<>(); - AtomicReference cause = new AtomicReference<>(); - QueueAsyncClient encodingQueueClient = queueServiceBuilderHelper() - .messageEncoding(QueueMessageEncoding.BASE64) - .processMessageDecodingErrorAsync(failure -> { - badMessage.set(failure.getPeekedMessageItem()); - queueUrl.set(failure.getQueueAsyncClient().getQueueUrl()); - cause.set(failure.getCause()); - return Mono.empty(); - }) - .buildAsyncClient().getQueueAsyncClient(queueName); - - StepVerifier.create(encodingQueueClient.peekMessages(10)) - .assertNext(message -> { - assertEquals(expectMsg, message.getBody().toString()); - assertNotNull(badMessage.get()); - assertEquals(expectMsg, badMessage.get().getBody().toString()); - assertEquals(queueAsyncClient.getQueueUrl(), queueUrl.get()); - assertNotNull(cause.get()); - }) - .verifyComplete(); - } - - @Test - public void peekWithSyncHandler() { - queueAsyncClient.create().block(); - String expectMsg = "test message"; - String encodedMsg = Base64.getEncoder().encodeToString(expectMsg.getBytes(StandardCharsets.UTF_8)); - queueAsyncClient.sendMessage(expectMsg).block(); - queueAsyncClient.sendMessage(encodedMsg).block(); - AtomicReference badMessage = new AtomicReference<>(); - AtomicReference cause = new AtomicReference<>(); - QueueAsyncClient encodingQueueClient = queueServiceBuilderHelper() - .messageEncoding(QueueMessageEncoding.BASE64) - .processMessageDecodingError(failure -> { - badMessage.set(failure.getPeekedMessageItem()); - cause.set(failure.getCause()); - // call some sync API - failure.getQueueClient().getProperties(); - }) - .buildAsyncClient().getQueueAsyncClient(queueName); - - StepVerifier.create(encodingQueueClient.peekMessages(10)) - .assertNext(peekedMessageItem -> { - assertEquals(expectMsg, peekedMessageItem.getBody().toString()); - assertNotNull(badMessage.get()); - assertEquals(expectMsg, badMessage.get().getBody().toString()); - assertNotNull(cause.get()); - }) - .verifyComplete(); - } - - @Test - public void peekWithHandlerException() { - queueAsyncClient.create().block(); - String expectMsg = "test message"; - String encodedMsg = Base64.getEncoder().encodeToString(expectMsg.getBytes(StandardCharsets.UTF_8)); - queueAsyncClient.sendMessage(expectMsg).block(); - queueAsyncClient.sendMessage(encodedMsg).block(); - QueueAsyncClient encodingQueueClient = queueServiceBuilderHelper() - .messageEncoding(QueueMessageEncoding.BASE64) - .processMessageDecodingErrorAsync(message -> { - throw new IllegalStateException("KABOOM"); - }) - .buildAsyncClient().getQueueAsyncClient(queueName); - - StepVerifier.create(encodingQueueClient.peekMessages(10)).verifyError(IllegalStateException.class); - } - - @Test - public void peekMultipleMessages() { - queueAsyncClient.create().block(); - String expectMsg1 = "test message 1"; - String expectMsg2 = "test message 2"; - queueAsyncClient.sendMessage(expectMsg1).block(); - queueAsyncClient.sendMessage(expectMsg2).block(); - - StepVerifier.create(queueAsyncClient.peekMessages(2)) - .assertNext(peekedMessageItem -> assertEquals(expectMsg1, peekedMessageItem.getMessageText())) - .assertNext(peekedMessageItem -> assertEquals(expectMsg2, peekedMessageItem.getMessageText())) - .verifyComplete(); - } - - @Test - public void peekTooManyMessages() { - queueAsyncClient.create().block(); - - StepVerifier.create(queueAsyncClient.peekMessages(33)).verifyErrorSatisfies(ex -> - assertExceptionStatusCodeAndMessage(ex, 400, QueueErrorCode.OUT_OF_RANGE_QUERY_PARAMETER_VALUE)); - } - - @Test - public void peekMessagesError() { - StepVerifier.create(queueAsyncClient.peekMessage()) - .verifyErrorSatisfies(ex -> assertExceptionStatusCodeAndMessage(ex, 404, QueueErrorCode.QUEUE_NOT_FOUND)); - } - - @Test - public void clearMessages() { - queueAsyncClient.create().block(); - queueAsyncClient.sendMessage("test message 1").block(); - queueAsyncClient.sendMessage("test message 2").block(); - queueAsyncClient.sendMessage("test message 3").block(); - - StepVerifier.create(queueAsyncClient.getPropertiesWithResponse()) - .assertNext(response -> { - assertEquals(200, response.getStatusCode()); - assertEquals(3, response.getValue().getApproximateMessagesCount()); - }) - .verifyComplete(); - - assertAsyncResponseStatusCode(queueAsyncClient.clearMessagesWithResponse(), 204); - - StepVerifier.create(queueAsyncClient.getPropertiesWithResponse()) - .assertNext(response -> { - assertEquals(200, response.getStatusCode()); - assertEquals(0, response.getValue().getApproximateMessagesCount()); - }) - .verifyComplete(); - } - - @Test - public void clearMessagesError() { - StepVerifier.create(queueAsyncClient.clearMessagesWithResponse()) - .verifyErrorSatisfies(ex -> assertExceptionStatusCodeAndMessage(ex, 404, QueueErrorCode.QUEUE_NOT_FOUND)); - } - - @Test - public void deleteMessage() { - queueAsyncClient.create().block(); - queueAsyncClient.sendMessage("test message 1").block(); - queueAsyncClient.sendMessage("test message 2").block(); - queueAsyncClient.sendMessage("test message 3").block(); - QueueMessageItem dequeueMsg = queueAsyncClient.receiveMessage().block(); - - StepVerifier.create(queueAsyncClient.getPropertiesWithResponse()) - .assertNext(response -> { - assertEquals(200, response.getStatusCode()); - assertEquals(3, response.getValue().getApproximateMessagesCount()); - }) - .verifyComplete(); - - assertAsyncResponseStatusCode(queueAsyncClient.deleteMessageWithResponse(dequeueMsg.getMessageId(), - dequeueMsg.getPopReceipt()), 204); - - StepVerifier.create(queueAsyncClient.getPropertiesWithResponse()) - .assertNext(response -> { - assertEquals(200, response.getStatusCode()); - assertEquals(2, response.getValue().getApproximateMessagesCount()); - }) - .verifyComplete(); - } - - @ParameterizedTest - @MethodSource("com.azure.storage.queue.QueueApiTests#invalidArgsSupplier") - public void deleteMessageInvalidArgs(boolean messageId, boolean popReceipt, int statusCode, QueueErrorCode errMsg) { - queueAsyncClient.create().block(); - String expectMsg = "test message"; - queueAsyncClient.sendMessage(expectMsg).block(); - QueueMessageItem message = queueAsyncClient.receiveMessage().block(); - String deleteMessageId = messageId ? message.getMessageId() : message.getMessageId() + "Random"; - String deletePopReceipt = popReceipt ? message.getPopReceipt() : message.getPopReceipt() + "Random"; - - StepVerifier.create(queueAsyncClient.deleteMessageWithResponse(deleteMessageId, deletePopReceipt)) - .verifyErrorSatisfies(ex -> assertExceptionStatusCodeAndMessage(ex, statusCode, errMsg)); - } - - @Test - public void updateMessage() { - String updateMsg = "Updated test message"; - queueAsyncClient.create().block(); - queueAsyncClient.sendMessage("test message before update").block(); - - QueueMessageItem dequeueMsg = queueAsyncClient.receiveMessage().block(); - - assertAsyncResponseStatusCode(queueAsyncClient.updateMessageWithResponse(dequeueMsg.getMessageId(), - dequeueMsg.getPopReceipt(), updateMsg, Duration.ofSeconds(1)), 204); - - StepVerifier.create(queueAsyncClient.peekMessage().delaySubscription(getMessageUpdateDelay(2000))) - .assertNext(peekedMessageItem -> assertEquals(updateMsg, peekedMessageItem.getMessageText())) - .verifyComplete(); - } - - @ParameterizedTest - @MethodSource("com.azure.storage.queue.QueueApiTests#invalidArgsSupplier") - public void updateMessageInvalidArgs(boolean messageId, boolean popReceipt, int statusCode, QueueErrorCode errMsg) { - queueAsyncClient.create().block(); - String updateMsg = "Updated test message"; - queueAsyncClient.sendMessage("test message before update").block(); - QueueMessageItem message = queueAsyncClient.receiveMessage().block(); - - String updateMessageId = messageId ? message.getMessageId() : message.getMessageId() + "Random"; - String updatePopReceipt = popReceipt ? message.getPopReceipt() : message.getPopReceipt() + "Random"; - - StepVerifier.create(queueAsyncClient.updateMessageWithResponse(updateMessageId, updatePopReceipt, updateMsg, - Duration.ofSeconds(1))) - .verifyErrorSatisfies(ex -> assertExceptionStatusCodeAndMessage(ex, statusCode, errMsg)); - } - - @Test - public void getQueueName() { - assertEquals(queueName, queueAsyncClient.getQueueName()); - } -} diff --git a/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueAysncAPITests.groovy b/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueAysncAPITests.groovy new file mode 100644 index 0000000000000..5c7077435ddea --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueAysncAPITests.groovy @@ -0,0 +1,912 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.queue + +import com.azure.core.util.BinaryData +import com.azure.storage.common.StorageSharedKeyCredential +import com.azure.storage.queue.models.PeekedMessageItem +import com.azure.storage.queue.models.QueueAccessPolicy +import com.azure.storage.queue.models.QueueErrorCode +import com.azure.storage.queue.models.QueueMessageItem +import com.azure.storage.queue.models.QueueSignedIdentifier +import reactor.core.publisher.Mono +import reactor.test.StepVerifier +import spock.lang.Ignore +import spock.lang.Unroll + +import java.nio.charset.StandardCharsets +import java.time.Duration +import java.time.LocalDateTime +import java.time.OffsetDateTime +import java.time.ZoneOffset + +class QueueAysncAPITests extends APISpec { + QueueAsyncClient queueAsyncClient + + static def testMetadata = Collections.singletonMap("metadata", "value") + static def createMetadata = Collections.singletonMap("metadata1", "value") + def queueName + + def setup() { + queueName = namer.getRandomName(60) + primaryQueueServiceAsyncClient = queueServiceBuilderHelper().buildAsyncClient() + queueAsyncClient = primaryQueueServiceAsyncClient.getQueueAsyncClient(queueName) + } + + def "Get queue URL"() { + given: + def accountName = StorageSharedKeyCredential.fromConnectionString(environment.primaryAccount.connectionString).getAccountName() + def expectURL = String.format("https://%s.queue.core.windows.net/%s", accountName, queueName) + + when: + def queueURL = queueAsyncClient.getQueueUrl() + + then: + expectURL == queueURL + } + + def "IP based endpoint"() { + when: + def queueAsyncClient = new QueueClientBuilder() + .connectionString(environment.primaryAccount.connectionString) + .endpoint("http://127.0.0.1:10001/devstoreaccount1/myqueue") + .buildAsyncClient() + + then: + queueAsyncClient.getAccountName() == "devstoreaccount1" + queueAsyncClient.getQueueName() == "myqueue" + } + + def "Create queue with shared key"() { + expect: + StepVerifier.create(queueAsyncClient.createWithResponse(null)).assertNext { + assert QueueTestHelper.assertResponseStatusCode(it, 201) } + .verifyComplete() + } + + // TODO: Will implement the test after introduce the sas token generator + @Ignore + def "Create queue with sas token"() { + + } + + def "Create if not exists queue with shared key"() { + expect: + StepVerifier.create(queueAsyncClient.createIfNotExistsWithResponse(null)).assertNext { + assert QueueTestHelper.assertResponseStatusCode(it, 201) } + .verifyComplete() + } + + def "Create if not exists queue with same metadata"() { + setup: + def initialResponse = queueAsyncClient.createIfNotExistsWithResponse(null).block() + + when: + def secondResponse = queueAsyncClient.createIfNotExistsWithResponse(null).block() + + then: + QueueTestHelper.assertResponseStatusCode(initialResponse, 201) + // if metadata is the same response code is 204 + QueueTestHelper.assertResponseStatusCode(secondResponse, 204) + } + + def "Create if not exists queue with conflicting metadata"() { + setup: + def initialResponse = queueAsyncClient.createIfNotExistsWithResponse(createMetadata).block() + + when: + def secondResponse = queueAsyncClient.createIfNotExistsWithResponse(testMetadata).block() + + then: + QueueTestHelper.assertResponseStatusCode(initialResponse, 201) + // if metadata is the same response code is 204 + QueueTestHelper.assertResponseStatusCode(secondResponse, 409) + } + + def "Delete exist queue"() { + given: + queueAsyncClient.createWithResponse(null).block() + when: + def deleteQueueVerifier = StepVerifier.create(queueAsyncClient.deleteWithResponse()) + then: + deleteQueueVerifier.assertNext { + assert QueueTestHelper.assertResponseStatusCode(it, 204) } + .verifyComplete() + } + + def "Delete queue error"() { + when: + def deleteQueueVerifier = StepVerifier.create(queueAsyncClient.deleteWithResponse()) + then: + deleteQueueVerifier.verifyErrorSatisfies { + assert QueueTestHelper.assertExceptionStatusCodeAndMessage(it, 404, QueueErrorCode.QUEUE_NOT_FOUND) + } + } + + def "Delete if exists queue"() { + given: + queueAsyncClient.createWithResponse(null).block() + when: + def deleteQueueVerifier = StepVerifier.create(queueAsyncClient.deleteIfExistsWithResponse()) + then: + deleteQueueVerifier.assertNext { + assert QueueTestHelper.assertResponseStatusCode(it, 204) } + .verifyComplete() + } + + def "Delete if exists queue that does not exist"() { + when: + def response = queueAsyncClient.deleteIfExistsWithResponse().block() + then: + response.getStatusCode() == 404 + !response.getValue() + } + + def "Get properties"() { + given: + queueAsyncClient.createWithResponse(testMetadata).block() + when: + def getPropertiesVerifier = StepVerifier.create(queueAsyncClient.getPropertiesWithResponse()) + then: + getPropertiesVerifier.assertNext { + assert QueueTestHelper.assertResponseStatusCode(it, 200) + assert it.getValue().getApproximateMessagesCount() == 0 + assert testMetadata == it.getValue().getMetadata() + }.verifyComplete() + } + + def "Get properties error"() { + when: + def getPropertiesVerifier = StepVerifier.create(queueAsyncClient.getProperties()) + then: + getPropertiesVerifier.verifyErrorSatisfies { + assert QueueTestHelper.assertExceptionStatusCodeAndMessage(it, 404, QueueErrorCode.QUEUE_NOT_FOUND) + } + } + + @Unroll + def "Set and clear metadata"() { + given: + queueAsyncClient.createWithResponse(matadataInCreate).block() + when: + def getPropertiesVerifierBefore = StepVerifier.create(queueAsyncClient.getPropertiesWithResponse()) + def setMetadataVerifier = StepVerifier.create(queueAsyncClient.setMetadataWithResponse(metadataInSet)) + def getPropertiesVerifierAfter = StepVerifier.create(queueAsyncClient.getPropertiesWithResponse()) + then: + getPropertiesVerifierBefore.assertNext { + assert QueueTestHelper.assertResponseStatusCode(it, 200) + assert expectMetadataInCreate == it.getValue().getMetadata() + }.verifyComplete() + setMetadataVerifier.assertNext { + assert QueueTestHelper.assertResponseStatusCode(it, 204) } + .verifyComplete() + getPropertiesVerifierAfter.assertNext { + assert QueueTestHelper.assertResponseStatusCode(it, 200) + assert expectMetadataInSet == it.getValue().metadata + }.verifyComplete() + where: + matadataInCreate | metadataInSet | expectMetadataInCreate | expectMetadataInSet + null | testMetadata | Collections.emptyMap() | testMetadata + createMetadata | testMetadata | createMetadata | testMetadata + createMetadata | null | createMetadata | Collections.emptyMap() + testMetadata | testMetadata | testMetadata | testMetadata + null | null | Collections.emptyMap() | Collections.emptyMap() + } + + def "Set metadata queue error"() { + when: + def setMetadataVerifier = StepVerifier.create(queueAsyncClient.setMetadataWithResponse(testMetadata)) + then: + setMetadataVerifier.verifyErrorSatisfies { + assert QueueTestHelper.assertExceptionStatusCodeAndMessage(it, 404, QueueErrorCode.QUEUE_NOT_FOUND) + } + } + + @Unroll + def "Set invalid meta"() { + given: + def invalidMetadata = Collections.singletonMap(invalidKey, "value") + queueAsyncClient.create().block() + when: + def setMetadataVerifier = StepVerifier.create(queueAsyncClient.setMetadataWithResponse(invalidMetadata)) + then: + setMetadataVerifier.verifyErrorSatisfies { + assert QueueTestHelper.assertExceptionStatusCodeAndMessage(it, statusCode, errMessage) + } + where: + invalidKey | statusCode | errMessage + "invalid-meta" | 400 | QueueErrorCode.INVALID_METADATA + "12345" | 400 | QueueErrorCode.INVALID_METADATA + "" | 400 | QueueErrorCode.EMPTY_METADATA_KEY + } + + def "Get access policy"() { + given: + queueAsyncClient.create().block() + when: + def getAccessPolicyVerifier = StepVerifier.create(queueAsyncClient.getAccessPolicy()) + then: + getAccessPolicyVerifier + .expectNextCount(0) + .verifyComplete() + } + + def "Get access policy does error"() { + when: + def getAccessPolicyVerifier = StepVerifier.create(queueAsyncClient.getAccessPolicy()) + then: + getAccessPolicyVerifier.verifyErrorSatisfies { + assert QueueTestHelper.assertExceptionStatusCodeAndMessage(it, 404, QueueErrorCode.QUEUE_NOT_FOUND) + } + } + + def "Set access policy"() { + given: + queueAsyncClient.create().block() + def accessPolicy = new QueueAccessPolicy() + .setPermissions("raup") + .setStartsOn(OffsetDateTime.of(LocalDateTime.of(2000, 1, 1, 0, 0), ZoneOffset.UTC)) + .setExpiresOn(OffsetDateTime.of(LocalDateTime.of(2020, 1, 1, 0, 0), ZoneOffset.UTC)) + def permission = new QueueSignedIdentifier() + .setId("testpermission") + .setAccessPolicy(accessPolicy) + when: + def setAccessPolicyVerifier = StepVerifier.create(queueAsyncClient.setAccessPolicyWithResponse(Collections.singletonList(permission))) + def getAccessPolicyVerifier = StepVerifier.create(queueAsyncClient.getAccessPolicy()) + then: + setAccessPolicyVerifier.assertNext { + assert QueueTestHelper.assertResponseStatusCode(it, 204) + }.verifyComplete() + getAccessPolicyVerifier.assertNext { + assert QueueTestHelper.assertPermissionsAreEqual(permission, it) + }.verifyComplete() + } + + def "Set invalid access policy"() { + given: + def accessPolicy = new QueueAccessPolicy() + .setPermissions("r") + .setStartsOn(OffsetDateTime.of(LocalDateTime.of(2000, 1, 1, 0, 0), ZoneOffset.UTC)) + .setExpiresOn(OffsetDateTime.of(LocalDateTime.of(2020, 1, 1, 0, 0), ZoneOffset.UTC)) + + def permission = new QueueSignedIdentifier() + .setId("theidofthispermissionislongerthanwhatisallowedbytheserviceandshouldfail") + .setAccessPolicy(accessPolicy) + queueAsyncClient.create().block() + when: + def setAccessPolicyVerifier = StepVerifier.create(queueAsyncClient.setAccessPolicyWithResponse(Collections.singletonList(permission))) + then: + setAccessPolicyVerifier.verifyErrorSatisfies { + assert QueueTestHelper.assertExceptionStatusCodeAndMessage(it, 400, QueueErrorCode.INVALID_XML_DOCUMENT) + } + } + + def "Set multiple access policies"() { + given: + def accessPolicy = new QueueAccessPolicy() + .setPermissions("r") + .setStartsOn(OffsetDateTime.of(LocalDateTime.of(2000, 1, 1, 0, 0), ZoneOffset.UTC)) + .setExpiresOn(OffsetDateTime.of(LocalDateTime.of(2020, 1, 1, 0, 0), ZoneOffset.UTC)) + + def permissions = new ArrayList() + for (int i = 0; i < 3; i++) { + permissions.add(new QueueSignedIdentifier() + .setId("policy" + i) + .setAccessPolicy(accessPolicy)) + } + queueAsyncClient.create().block() + when: + def setAccessPolicyVerifier = StepVerifier.create(queueAsyncClient.setAccessPolicyWithResponse(permissions)) + def getAccessPolicyVerifier = StepVerifier.create(queueAsyncClient.getAccessPolicy()) + then: + setAccessPolicyVerifier.assertNext { + assert QueueTestHelper.assertResponseStatusCode(it, 204) + }.verifyComplete() + getAccessPolicyVerifier.assertNext { + assert QueueTestHelper.assertPermissionsAreEqual(permissions[0], it) + }.assertNext { + assert QueueTestHelper.assertPermissionsAreEqual(permissions[1], it) + }.assertNext { + assert QueueTestHelper.assertPermissionsAreEqual(permissions[2], it) + }.verifyComplete() + } + + def "Set too many access policies"() { + given: + def accessPolicy = new QueueAccessPolicy() + .setPermissions("r") + .setStartsOn(OffsetDateTime.of(LocalDateTime.of(2000, 1, 1, 0, 0), ZoneOffset.UTC)) + .setExpiresOn(OffsetDateTime.of(LocalDateTime.of(2020, 1, 1, 0, 0), ZoneOffset.UTC)) + + def permissions = new ArrayList() + for (int i = 0; i < 6; i++) { + permissions.add(new QueueSignedIdentifier() + .setId("policy" + i) + .setAccessPolicy(accessPolicy)) + } + queueAsyncClient.create().block() + when: + def setAccessPolicyVerifier = StepVerifier.create(queueAsyncClient.setAccessPolicyWithResponse(permissions)) + then: + setAccessPolicyVerifier.verifyErrorSatisfies { + assert QueueTestHelper.assertExceptionStatusCodeAndMessage(it, 400, QueueErrorCode.INVALID_XML_DOCUMENT) + } + } + + def "Enqueue message"() { + given: + queueAsyncClient.create().block() + def expectMsg = "test message" + when: + def enqueueMsgVerifier = StepVerifier.create(queueAsyncClient.sendMessageWithResponse(expectMsg, null, null)) + def peekMsgVerifier = StepVerifier.create(queueAsyncClient.peekMessage()) + then: + enqueueMsgVerifier.assertNext { + assert QueueTestHelper.assertResponseStatusCode(it, 201) + }.verifyComplete() + peekMsgVerifier.assertNext { + assert expectMsg == it.getMessageText() + }.verifyComplete() + } + + def "Enqueue message binary data"() { + given: + queueAsyncClient.create().block() + def expectMsg = BinaryData.fromString("test message") + when: + def enqueueMsgVerifier = StepVerifier.create(queueAsyncClient.sendMessageWithResponse(expectMsg, null, null)) + def peekMsgVerifier = StepVerifier.create(queueAsyncClient.peekMessage()) + then: + enqueueMsgVerifier.assertNext { + assert QueueTestHelper.assertResponseStatusCode(it, 201) + }.verifyComplete() + peekMsgVerifier.assertNext { + assert expectMsg.toBytes() == it.getBody().toBytes() + }.verifyComplete() + } + + def "Enqueue empty message"() { + given: + queueAsyncClient.create().block() + when: + def enqueueMsgVerifier = StepVerifier.create(queueAsyncClient.sendMessageWithResponse("", null, null)) + def peekMsgVerifier = StepVerifier.create(queueAsyncClient.peekMessage()) + then: + enqueueMsgVerifier.assertNext { + assert QueueTestHelper.assertResponseStatusCode(it, 201) + }.verifyComplete() + peekMsgVerifier.assertNext { + assert it.getMessageText() == null + }.verifyComplete() + } + + def "Enqueue time to live"() { + given: + queueAsyncClient.create().block() + when: + def enqueueMsgVerifier = StepVerifier.create(queueAsyncClient.sendMessageWithResponse("test message", + Duration.ofSeconds(0), Duration.ofSeconds(2))) + then: + enqueueMsgVerifier.assertNext { + assert QueueTestHelper.assertResponseStatusCode(it, 201) + }.verifyComplete() + } + + def "Enqueue message encoded message"() { + given: + queueAsyncClient.create().block() + def encodingQueueClient = queueServiceBuilderHelper().messageEncoding(QueueMessageEncoding.BASE64).buildAsyncClient().getQueueAsyncClient(queueName) + def expectMsg = BinaryData.fromString("test message") + when: + def enqueueMsgVerifier = StepVerifier.create(encodingQueueClient.sendMessageWithResponse(expectMsg, null, null)) + def peekMsgVerifier = StepVerifier.create(queueAsyncClient.peekMessage()) + then: + enqueueMsgVerifier.assertNext { + assert QueueTestHelper.assertResponseStatusCode(it, 201) + }.verifyComplete() + peekMsgVerifier.assertNext { + assert Base64.getEncoder().encodeToString(expectMsg.toBytes()) == it.getBody().toString() + }.verifyComplete() + } + + def "Dequeue message from empty queue"() { + given: + queueAsyncClient.create().block() + + when: + def dequeueMsgVerifier = StepVerifier.create(queueAsyncClient.receiveMessage()) + + then: + dequeueMsgVerifier.verifyComplete() + } + + def "Dequeue message"() { + given: + queueAsyncClient.create().block() + def expectMsg = "test message" + queueAsyncClient.sendMessage(expectMsg).block() + when: + def dequeueMsgVerifier = StepVerifier.create(queueAsyncClient.receiveMessage()) + then: + dequeueMsgVerifier.assertNext { + assert expectMsg == it.getMessageText() + }.verifyComplete() + } + + def "Dequeue encoded message"() { + given: + queueAsyncClient.create().block() + def expectMsg = "test message" + def encodedMsg = Base64.getEncoder().encodeToString(expectMsg.getBytes(StandardCharsets.UTF_8)) + queueAsyncClient.sendMessage(encodedMsg).block() + def encodingQueueClient = queueServiceBuilderHelper().messageEncoding(QueueMessageEncoding.BASE64).buildAsyncClient().getQueueAsyncClient(queueName) + when: + def dequeueMsgVerifier = StepVerifier.create(encodingQueueClient.receiveMessage()) + then: + dequeueMsgVerifier.assertNext { + assert expectMsg == it.getBody().toString() + }.verifyComplete() + } + + def "Dequeue fails without handler"() { + given: + queueAsyncClient.create().block() + def expectMsg = "test message" + queueAsyncClient.sendMessage(expectMsg).block() + def encodingQueueClient = queueServiceBuilderHelper().messageEncoding(QueueMessageEncoding.BASE64).buildAsyncClient().getQueueAsyncClient(queueName) + when: + def dequeueMsgVerifier = StepVerifier.create(encodingQueueClient.receiveMessage()) + then: + dequeueMsgVerifier.verifyError(IllegalArgumentException.class) + } + + def "Dequeue with handler"() { + given: + queueAsyncClient.create().block() + def expectMsg = "test message" + def encodedMsg = Base64.getEncoder().encodeToString(expectMsg.getBytes(StandardCharsets.UTF_8)) + queueAsyncClient.sendMessage(expectMsg).block() + queueAsyncClient.sendMessage(encodedMsg).block() + QueueMessageItem badMessage = null + String queueUrl = null + def encodingQueueClient = queueServiceBuilderHelper() + .messageEncoding(QueueMessageEncoding.BASE64) + .processMessageDecodingErrorAsync({ failure -> + badMessage = failure.getQueueMessageItem() + queueUrl = failure.getQueueAsyncClient().getQueueUrl() + return Mono.empty() + }) + .buildAsyncClient().getQueueAsyncClient(queueName) + when: + def dequeueMsgVerifier = StepVerifier.create(encodingQueueClient.receiveMessages(10)) + then: + dequeueMsgVerifier.assertNext { + assert expectMsg == it.getBody().toString() + assert badMessage != null + assert badMessage.getBody().toString() == expectMsg + assert queueUrl == queueAsyncClient.getQueueUrl() + }.verifyComplete() + } + + def "Dequeue and delete with handler"() { + given: + queueAsyncClient.create().block() + def expectMsg = "test message" + def encodedMsg = Base64.getEncoder().encodeToString(expectMsg.getBytes(StandardCharsets.UTF_8)) + queueAsyncClient.sendMessage(expectMsg).block() + queueAsyncClient.sendMessage(encodedMsg).block() + QueueMessageItem badMessage = null + def encodingQueueClient = queueServiceBuilderHelper() + .messageEncoding(QueueMessageEncoding.BASE64) + .processMessageDecodingErrorAsync({ failure -> + badMessage = failure.getQueueMessageItem() + return failure.getQueueAsyncClient().deleteMessage(badMessage.getMessageId(), badMessage.getPopReceipt()) + }) + .buildAsyncClient().getQueueAsyncClient(queueName) + when: + def dequeueMsgVerifier = StepVerifier.create(encodingQueueClient.receiveMessages(10)) + then: + dequeueMsgVerifier.assertNext { + assert expectMsg == it.getBody().toString() + assert badMessage != null + assert badMessage.getBody().toString() == expectMsg + }.verifyComplete() + } + + def "Dequeue and delete with sync handler"() { + given: + queueAsyncClient.create().block() + def expectMsg = "test message" + def encodedMsg = Base64.getEncoder().encodeToString(expectMsg.getBytes(StandardCharsets.UTF_8)) + queueAsyncClient.sendMessage(expectMsg).block() + queueAsyncClient.sendMessage(encodedMsg).block() + QueueMessageItem badMessage = null + def encodingQueueClient = queueServiceBuilderHelper() + .messageEncoding(QueueMessageEncoding.BASE64) + .processMessageDecodingError({ failure -> + badMessage = failure.getQueueMessageItem() + failure.getQueueClient().deleteMessage(badMessage.getMessageId(), badMessage.getPopReceipt()) + }) + .buildAsyncClient().getQueueAsyncClient(queueName) + when: + def dequeueMsgVerifier = StepVerifier.create(encodingQueueClient.receiveMessages(10)) + then: + dequeueMsgVerifier.assertNext { + assert expectMsg == it.getBody().toString() + assert badMessage != null + assert badMessage.getBody().toString() == expectMsg + }.verifyComplete() + } + + def "Dequeue with handler error"() { + given: + queueAsyncClient.create().block() + def expectMsg = "test message" + def encodedMsg = Base64.getEncoder().encodeToString(expectMsg.getBytes(StandardCharsets.UTF_8)) + queueAsyncClient.sendMessage(expectMsg).block() + queueAsyncClient.sendMessage(encodedMsg).block() + def encodingQueueClient = queueServiceBuilderHelper() + .messageEncoding(QueueMessageEncoding.BASE64) + .processMessageDecodingErrorAsync({ message -> + throw new IllegalStateException("KABOOM") + }) + .buildAsyncClient().getQueueAsyncClient(queueName) + when: + def dequeueMsgVerifier = StepVerifier.create(encodingQueueClient.receiveMessages(10)) + then: + dequeueMsgVerifier.verifyError(IllegalStateException.class) + } + + def "Dequeue multiple messages"() { + given: + queueAsyncClient.create().block() + def expectMsg1 = "test message 1" + def expectMsg2 = "test message 2" + queueAsyncClient.sendMessage(expectMsg1).block() + queueAsyncClient.sendMessage(expectMsg2).block() + when: + def dequeueMsgVerifier = StepVerifier.create(queueAsyncClient.receiveMessages(2)) + then: + dequeueMsgVerifier.assertNext { + assert expectMsg1 == it.getMessageText() + }.assertNext { + assert expectMsg2 == it.getMessageText() + }.verifyComplete() + } + + def "Dequeue too many message"() { + given: + queueAsyncClient.create().block() + when: + def dequeueMsgVerifier = StepVerifier.create(queueAsyncClient.receiveMessages(33)) + then: + dequeueMsgVerifier.verifyErrorSatisfies { + assert QueueTestHelper.assertExceptionStatusCodeAndMessage(it, 400, QueueErrorCode.OUT_OF_RANGE_QUERY_PARAMETER_VALUE) + } + } + + def "Enqueue Dequeue non-UTF message"() { + given: + queueAsyncClient.create().block() + def encodingQueueClient = queueServiceBuilderHelper().messageEncoding(QueueMessageEncoding.BASE64).buildAsyncClient().getQueueAsyncClient(queueName) + byte[] content = [ 0xFF, 0x00 ]; // Not a valid UTF-8 byte sequence. + encodingQueueClient.sendMessage(BinaryData.fromBytes(content)).block() + + when: + def dequeueMsgVerifier = StepVerifier.create(encodingQueueClient.receiveMessage()) + then: + dequeueMsgVerifier.assertNext { + assert content == it.getBody().toBytes() + }.verifyComplete() + } + + def "Enqueue Peek non-UTF message"() { + given: + queueAsyncClient.create().block() + def encodingQueueClient = queueServiceBuilderHelper().messageEncoding(QueueMessageEncoding.BASE64).buildAsyncClient().getQueueAsyncClient(queueName) + byte[] content = [ 0xFF, 0x00 ]; // Not a valid UTF-8 byte sequence. + encodingQueueClient.sendMessage(BinaryData.fromBytes(content)).block() + + when: + def dequeueMsgVerifier = StepVerifier.create(encodingQueueClient.peekMessage()) + then: + dequeueMsgVerifier.assertNext { + assert content == it.getBody().toBytes() + }.verifyComplete() + } + + def "Peek message from empty queue"() { + given: + queueAsyncClient.create().block() + when: + def peekMsgVerifier = StepVerifier.create(queueAsyncClient.peekMessage()) + then: + peekMsgVerifier.verifyComplete() + } + + def "Peek message"() { + given: + queueAsyncClient.create().block() + def expectMsg = "test message" + queueAsyncClient.sendMessage(expectMsg).block() + when: + def peekMsgVerifier = StepVerifier.create(queueAsyncClient.peekMessage()) + then: + peekMsgVerifier.assertNext { + assert expectMsg == it.getMessageText() + }.verifyComplete() + } + + def "Peek encoded message"() { + given: + queueAsyncClient.create().block() + def expectMsg = "test message" + def encodedMsg = Base64.getEncoder().encodeToString(expectMsg.getBytes(StandardCharsets.UTF_8)) + queueAsyncClient.sendMessage(encodedMsg).block() + def encodingQueueClient = queueServiceBuilderHelper().messageEncoding(QueueMessageEncoding.BASE64).buildAsyncClient().getQueueAsyncClient(queueName) + when: + def peekMsgVerifier = StepVerifier.create(encodingQueueClient.peekMessage()) + then: + peekMsgVerifier.assertNext { + assert expectMsg == it.getBody().toString() + }.verifyComplete() + } + + def "Peek fails without handler"() { + given: + queueAsyncClient.create().block() + def expectMsg = "test message" + queueAsyncClient.sendMessage(expectMsg).block() + def encodingQueueClient = queueServiceBuilderHelper().messageEncoding(QueueMessageEncoding.BASE64).buildAsyncClient().getQueueAsyncClient(queueName) + when: + def peekMsgVerifier = StepVerifier.create(encodingQueueClient.peekMessage()) + then: + peekMsgVerifier.verifyError(IllegalArgumentException.class) + } + + def "Peek with handler"() { + given: + queueAsyncClient.create().block() + def expectMsg = "test message" + def encodedMsg = Base64.getEncoder().encodeToString(expectMsg.getBytes(StandardCharsets.UTF_8)) + queueAsyncClient.sendMessage(expectMsg).block() + queueAsyncClient.sendMessage(encodedMsg).block() + PeekedMessageItem badMessage = null + String queueUrl = null + Exception cause = null + def encodingQueueClient = queueServiceBuilderHelper() + .messageEncoding(QueueMessageEncoding.BASE64) + .processMessageDecodingErrorAsync({ failure -> + badMessage = failure.getPeekedMessageItem() + queueUrl = failure.getQueueAsyncClient().getQueueUrl() + cause = failure.getCause() + return Mono.empty() + }) + .buildAsyncClient().getQueueAsyncClient(queueName) + when: + def peekMsgVerifier = StepVerifier.create(encodingQueueClient.peekMessages(10)) + then: + peekMsgVerifier.assertNext { + assert expectMsg == it.getBody().toString() + assert badMessage != null + assert badMessage.getBody().toString() == expectMsg + assert queueUrl == queueAsyncClient.getQueueUrl() + assert cause != null + }.verifyComplete() + } + + def "Peek with sync handler"() { + given: + queueAsyncClient.create().block() + def expectMsg = "test message" + def encodedMsg = Base64.getEncoder().encodeToString(expectMsg.getBytes(StandardCharsets.UTF_8)) + queueAsyncClient.sendMessage(expectMsg).block() + queueAsyncClient.sendMessage(encodedMsg).block() + PeekedMessageItem badMessage = null + Exception cause = null + def encodingQueueClient = queueServiceBuilderHelper() + .messageEncoding(QueueMessageEncoding.BASE64) + .processMessageDecodingError({ failure -> + badMessage = failure.getPeekedMessageItem() + cause = failure.getCause() + // call some sync API + failure.getQueueClient().getProperties() + }) + .buildAsyncClient().getQueueAsyncClient(queueName) + when: + def peekMsgVerifier = StepVerifier.create(encodingQueueClient.peekMessages(10)) + then: + peekMsgVerifier.assertNext { + assert expectMsg == it.getBody().toString() + assert badMessage != null + assert badMessage.getBody().toString() == expectMsg + assert cause != null + }.verifyComplete() + } + + def "Peek with handler exception"() { + given: + queueAsyncClient.create().block() + def expectMsg = "test message" + def encodedMsg = Base64.getEncoder().encodeToString(expectMsg.getBytes(StandardCharsets.UTF_8)) + queueAsyncClient.sendMessage(expectMsg).block() + queueAsyncClient.sendMessage(encodedMsg).block() + def encodingQueueClient = queueServiceBuilderHelper() + .messageEncoding(QueueMessageEncoding.BASE64) + .processMessageDecodingErrorAsync({ message -> + throw new IllegalStateException("KABOOM") + }) + .buildAsyncClient().getQueueAsyncClient(queueName) + when: + def peekMsgVerifier = StepVerifier.create(encodingQueueClient.peekMessages(10)) + then: + peekMsgVerifier.verifyError(IllegalStateException.class) + } + + def "Peek multiple messages"() { + given: + queueAsyncClient.create().block() + def expectMsg1 = "test message 1" + def expectMsg2 = "test message 2" + queueAsyncClient.sendMessage(expectMsg1).block() + queueAsyncClient.sendMessage(expectMsg2).block() + when: + def peekMsgVerifier = StepVerifier.create(queueAsyncClient.peekMessages(2)) + then: + peekMsgVerifier.assertNext { + assert expectMsg1 == it.getMessageText() + }.assertNext { + assert expectMsg2 == it.getMessageText() + }.verifyComplete() + } + + def "Peek too many message"() { + given: + queueAsyncClient.create().block() + when: + def peekMsgVerifier = StepVerifier.create(queueAsyncClient.peekMessages(33)) + then: + peekMsgVerifier.verifyErrorSatisfies { + assert QueueTestHelper.assertExceptionStatusCodeAndMessage(it, 400, QueueErrorCode.OUT_OF_RANGE_QUERY_PARAMETER_VALUE) + } + } + + def "Peek messages error"() { + when: + def peekMsgVerifier = StepVerifier.create(queueAsyncClient.peekMessage()) + then: + peekMsgVerifier.verifyErrorSatisfies { + assert QueueTestHelper.assertExceptionStatusCodeAndMessage(it, 404, QueueErrorCode.QUEUE_NOT_FOUND) + } + } + + def "Clear messages"() { + given: + queueAsyncClient.create().block() + queueAsyncClient.sendMessage("test message 1").block() + queueAsyncClient.sendMessage("test message 2").block() + queueAsyncClient.sendMessage("test message 3").block() + when: + def getPropertiesVerifier = StepVerifier.create(queueAsyncClient.getPropertiesWithResponse()) + def clearMsgVerifier = StepVerifier.create(queueAsyncClient.clearMessagesWithResponse()) + def getPropertiesAfterVerifier = StepVerifier.create(queueAsyncClient.getPropertiesWithResponse()) + then: + getPropertiesVerifier.assertNext { + assert QueueTestHelper.assertResponseStatusCode(it, 200) + assert it.getValue().getApproximateMessagesCount() == 3 + }.verifyComplete() + clearMsgVerifier.assertNext { + assert QueueTestHelper.assertResponseStatusCode(it, 204) + }.verifyComplete() + getPropertiesAfterVerifier.assertNext { + assert QueueTestHelper.assertResponseStatusCode(it, 200) + assert it.getValue().getApproximateMessagesCount() == 0 + }.verifyComplete() + } + + def "Clear messages error"() { + when: + def clearMsgVerifier = StepVerifier.create(queueAsyncClient.clearMessagesWithResponse()) + then: + clearMsgVerifier.verifyErrorSatisfies { + assert QueueTestHelper.assertExceptionStatusCodeAndMessage(it, 404, QueueErrorCode.QUEUE_NOT_FOUND) + } + } + + def "Delete message"() { + given: + queueAsyncClient.create().block() + queueAsyncClient.sendMessage("test message 1").block() + queueAsyncClient.sendMessage("test message 2").block() + queueAsyncClient.sendMessage("test message 3").block() + def dequeueMsg = queueAsyncClient.receiveMessage().block() + when: + def getPropertiesVerifier = StepVerifier.create(queueAsyncClient.getPropertiesWithResponse()) + def deleteMsgVerifier = StepVerifier.create(queueAsyncClient.deleteMessageWithResponse(dequeueMsg.getMessageId(), dequeueMsg.getPopReceipt())) + def getPropertiesAfterVerifier = StepVerifier.create(queueAsyncClient.getPropertiesWithResponse()) + then: + getPropertiesVerifier.assertNext { + assert QueueTestHelper.assertResponseStatusCode(it, 200) + assert it.getValue().getApproximateMessagesCount() == 3 + + }.verifyComplete() + deleteMsgVerifier.assertNext { + assert QueueTestHelper.assertResponseStatusCode(it, 204) + }.verifyComplete() + getPropertiesAfterVerifier.assertNext { + assert QueueTestHelper.assertResponseStatusCode(it, 200) + assert it.getValue().getApproximateMessagesCount() == 2 + }.verifyComplete() + } + + @Unroll + def "Delete message invalid args"() { + given: + queueAsyncClient.create().block() + def expectMsg = "test message" + queueAsyncClient.sendMessage(expectMsg).block() + QueueMessageItem queueMessageItem = queueAsyncClient.receiveMessage().block() + when: + def deleteMessageId = messageId ? queueMessageItem.getMessageId() : queueMessageItem.getMessageId() + "Random" + def deletePopReceipt = popReceipt ? queueMessageItem.getPopReceipt() : queueMessageItem.getPopReceipt() + "Random" + def deleteMsgVerifier = StepVerifier.create(queueAsyncClient.deleteMessageWithResponse(deleteMessageId, deletePopReceipt)) + then: + deleteMsgVerifier.verifyErrorSatisfies { + assert QueueTestHelper.assertExceptionStatusCodeAndMessage(it, statusCode, errMsg) + } + where: + messageId | popReceipt | statusCode | errMsg + true | false | 400 | QueueErrorCode.INVALID_QUERY_PARAMETER_VALUE + false | true | 404 | QueueErrorCode.MESSAGE_NOT_FOUND + false | false | 400 | QueueErrorCode.INVALID_QUERY_PARAMETER_VALUE + } + + def "Update message"() { + given: + def updateMsg = "Updated test message" + queueAsyncClient.create().block() + queueAsyncClient.sendMessage("test message before update").block() + + def dequeueMsg = queueAsyncClient.receiveMessage().block() + when: + def updateMsgVerifier = StepVerifier.create(queueAsyncClient.updateMessageWithResponse( + dequeueMsg.getMessageId(), dequeueMsg.getPopReceipt(), updateMsg, Duration.ofSeconds(1))) + def peekMsgVerifier = StepVerifier.create(queueAsyncClient.peekMessage() + .delaySubscription(getMessageUpdateDelay(2000))) + then: + updateMsgVerifier.assertNext { + assert QueueTestHelper.assertResponseStatusCode(it, 204) + }.verifyComplete() + peekMsgVerifier.assertNext { + assert updateMsg == it.getMessageText() + }.verifyComplete() + } + + @Unroll + def "Update message invalid args"() { + given: + queueAsyncClient.create().block() + def updateMsg = "Updated test message" + queueAsyncClient.sendMessage("test message before update").block() + def dequeueMessage = queueAsyncClient.receiveMessage().block() + when: + def updateMessageId = messageId ? dequeueMessage.getMessageId() : dequeueMessage.getMessageId() + "Random" + def updatePopReceipt = popReceipt ? dequeueMessage.getPopReceipt() : dequeueMessage.getPopReceipt() + "Random" + def updateMsgVerifier = StepVerifier.create(queueAsyncClient.updateMessageWithResponse(updateMessageId, updatePopReceipt, updateMsg, Duration.ofSeconds(1))) + then: + updateMsgVerifier.verifyErrorSatisfies { + assert QueueTestHelper.assertExceptionStatusCodeAndMessage(it, statusCode, errMsg) + } + where: + messageId | popReceipt | statusCode | errMsg + true | false | 400 | QueueErrorCode.INVALID_QUERY_PARAMETER_VALUE + false | true | 404 | QueueErrorCode.MESSAGE_NOT_FOUND + false | false | 400 | QueueErrorCode.INVALID_QUERY_PARAMETER_VALUE + } + + def "Get Queue Name"() { + expect: + queueName == queueAsyncClient.getQueueName() + } +} diff --git a/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueSASTests.groovy b/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueSASTests.groovy new file mode 100644 index 0000000000000..fe374ff0ba229 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueSASTests.groovy @@ -0,0 +1,458 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.queue + +import com.azure.core.credential.AzureSasCredential +import com.azure.storage.common.sas.AccountSasPermission +import com.azure.storage.common.sas.AccountSasResourceType +import com.azure.storage.common.sas.AccountSasService +import com.azure.storage.common.sas.AccountSasSignatureValues +import com.azure.storage.common.sas.SasProtocol +import com.azure.storage.common.StorageSharedKeyCredential +import com.azure.storage.common.test.shared.extensions.LiveOnly +import com.azure.storage.queue.models.QueueAccessPolicy +import com.azure.storage.queue.models.QueueSignedIdentifier +import com.azure.storage.queue.models.QueueStorageException +import com.azure.storage.queue.models.SendMessageResult +import com.azure.storage.queue.sas.QueueSasPermission +import com.azure.storage.queue.sas.QueueServiceSasSignatureValues +import spock.lang.Unroll + +import java.time.Duration +import java.time.temporal.ChronoUnit + +class QueueSASTests extends APISpec { + + QueueClient queueClient + + def setup() { + primaryQueueServiceClient = queueServiceBuilderHelper().buildClient() + queueClient = primaryQueueServiceClient.getQueueClient(namer.getRandomName(60)) + } + + @Unroll + def "QueueSASPermission parse"() { + when: + def perms = QueueSasPermission.parse(permString) + + then: + perms.hasReadPermission() == read + perms.hasAddPermission() == add + perms.hasUpdatePermission() == update + perms.hasProcessPermission() == process + + where: + permString || read | add | update | process + "r" || true | false | false | false + "a" || false | true | false | false + "u" || false | false | true | false + "p" || false | false | false | true + "raup" || true | true | true | true + "apru" || true | true | true | true + "rap" || true | true | false | true + "ur" || true | false | true | false + } + + @Unroll + def "QueueSASPermission toString"() { + setup: + def perms = new QueueSasPermission() + .setReadPermission(read) + .setAddPermission(add) + .setUpdatePermission(update) + .setProcessPermission(process) + + expect: + perms.toString() == expectedString + + where: + read | add | update | process || expectedString + true | false | false | false || "r" + false | true | false | false || "a" + false | false | true | false || "u" + false | false | false | true || "p" + true | false | true | false || "ru" + true | true | true | true || "raup" + } + + def "QueueSASPermission parse IA"() { + when: + QueueSasPermission.parse("rwaq") + + then: + thrown(IllegalArgumentException) + } + + def "queueServiceSAS canonicalizedResource"() { + setup: + def queueName = queueClient.getQueueName() + + when: + def serviceSASSignatureValues = new QueueServiceSasSignatureValues().setQueueName(queueName) + + then: + serviceSASSignatureValues.getQueueName() == queueName + } + + def "QueueSAS enqueue dequeue with permissions"() { + setup: + queueClient.create() + SendMessageResult resp = queueClient.sendMessage("test") + + def permissions = new QueueSasPermission() + .setReadPermission(true) + .setAddPermission(true) + .setProcessPermission(true) + def startTime = namer.getUtcNow().minusDays(1) + def expiryTime = namer.getUtcNow().plusDays(1) + def sasProtocol = SasProtocol.HTTPS_HTTP + + when: + def credential = StorageSharedKeyCredential.fromConnectionString(environment.primaryAccount.connectionString) + def sasPermissions = new QueueServiceSasSignatureValues() + .setPermissions(permissions) + .setExpiryTime(expiryTime) + .setStartTime(startTime) + .setProtocol(sasProtocol) + .setQueueName(queueClient.getQueueName()) + .generateSasQueryParameters(credential) + .encode() + + def clientPermissions = queueBuilderHelper() + .endpoint(queueClient.getQueueUrl()) + .queueName(queueClient.getQueueName()) + .sasToken(sasPermissions) + .buildClient() + clientPermissions.sendMessage("sastest") + def dequeueMsgIterPermissions = clientPermissions.receiveMessages(2).iterator() + + then: + notThrown(QueueStorageException) + "test" == dequeueMsgIterPermissions.next().getMessageText() + "sastest" == dequeueMsgIterPermissions.next().getMessageText() + + when: + clientPermissions.updateMessage(resp.getMessageId(), resp.getPopReceipt(), "testing", Duration.ofHours(1)) + + then: + thrown(QueueStorageException) + } + + def "QueueSAS update delete with permissions"() { + setup: + queueClient.create() + SendMessageResult resp = queueClient.sendMessage("test") + + def permissions = new QueueSasPermission() + .setReadPermission(true) + .setAddPermission(true) + .setProcessPermission(true) + .setUpdatePermission(true) + def startTime = namer.getUtcNow().minusDays(1) + def expiryTime = namer.getUtcNow().plusDays(1) + def sasProtocol = SasProtocol.HTTPS_HTTP + + when: + def credential = StorageSharedKeyCredential.fromConnectionString(environment.primaryAccount.connectionString) + def sasPermissions = new QueueServiceSasSignatureValues() + .setPermissions(permissions) + .setExpiryTime(expiryTime) + .setStartTime(startTime) + .setProtocol(sasProtocol) + .setQueueName(queueClient.getQueueName()) + .generateSasQueryParameters(credential) + .encode() + + def clientPermissions = queueBuilderHelper() + .endpoint(queueClient.getQueueUrl()) + .queueName(queueClient.getQueueName()) + .sasToken(sasPermissions) + .buildClient() + clientPermissions.updateMessage(resp.getMessageId(), resp.getPopReceipt(), "testing", Duration.ZERO) + def dequeueMsgIterPermissions = clientPermissions.receiveMessages(1).iterator() + + then: + notThrown(QueueStorageException) + "testing" == dequeueMsgIterPermissions.next().getMessageText() + + when: + clientPermissions.delete() + + then: + thrown(QueueStorageException) + } + + // NOTE: Serializer for set access policy keeps milliseconds + def "QueueSAS enqueue dequeue with identifier"() { + setup: + queueClient.create() + queueClient.sendMessage("test") + + def permissions = new QueueSasPermission() + .setReadPermission(true) + .setAddPermission(true) + .setUpdatePermission(true) + .setProcessPermission(true) + def expiryTime = namer.getUtcNow().plusDays(1).truncatedTo(ChronoUnit.SECONDS) + def startTime = namer.getUtcNow().minusDays(1).truncatedTo(ChronoUnit.SECONDS) + + QueueSignedIdentifier identifier = new QueueSignedIdentifier() + .setId(namer.getRandomUuid()) + .setAccessPolicy(new QueueAccessPolicy().setPermissions(permissions.toString()) + .setExpiresOn(expiryTime).setStartsOn(startTime)) + queueClient.setAccessPolicy(Arrays.asList(identifier)) + + // Wait 30 seconds as it may take time for the access policy to take effect. + sleepIfLive(30000) + + when: + def credential = StorageSharedKeyCredential.fromConnectionString(environment.primaryAccount.connectionString) + def sasIdentifier = new QueueServiceSasSignatureValues() + .setIdentifier(identifier.getId()) + .setQueueName(queueClient.getQueueName()) + .generateSasQueryParameters(credential) + .encode() + + def clientBuilder = queueBuilderHelper() + def clientIdentifier = clientBuilder + .endpoint(queueClient.getQueueUrl()) + .queueName(queueClient.getQueueName()) + .sasToken(sasIdentifier) + .buildClient() + clientIdentifier.sendMessage("sastest") + def dequeueMsgIterIdentifier = clientIdentifier.receiveMessages(2).iterator() + + then: + notThrown(QueueStorageException) + "test" == dequeueMsgIterIdentifier.next().getMessageText() + "sastest" == dequeueMsgIterIdentifier.next().getMessageText() + } + + def "AccountSAS create delete queue"() { + def service = new AccountSasService() + .setQueueAccess(true) + def resourceType = new AccountSasResourceType() + .setContainer(true) + .setService(true) + .setObject(true) + def permissions = new AccountSasPermission() + .setReadPermission(true) + .setCreatePermission(true) + .setDeletePermission(true) + def expiryTime = namer.getUtcNow().plusDays(1) + + when: + def credential = StorageSharedKeyCredential.fromConnectionString(environment.primaryAccount.connectionString) + def sasValues = new AccountSasSignatureValues(expiryTime, permissions, service, resourceType) + def sas = queueServiceBuilderHelper() + .endpoint(primaryQueueServiceClient.getQueueServiceUrl()) + .credential(credential) + .buildClient() + .generateAccountSas(sasValues) + + def scBuilder = queueServiceBuilderHelper() + scBuilder.endpoint(primaryQueueServiceClient.getQueueServiceUrl()) + .sasToken(sas) + def sc = scBuilder.buildClient() + def queueName = namer.getRandomName(60) + sc.createQueue(queueName) + + then: + notThrown(QueueStorageException) + + when: + sc.deleteQueue(queueName) + + then: + notThrown(QueueStorageException) + } + + def "AccountSAS list queues"() { + def service = new AccountSasService() + .setQueueAccess(true) + def resourceType = new AccountSasResourceType() + .setContainer(true) + .setService(true) + .setObject(true) + def permissions = new AccountSasPermission() + .setListPermission(true) + def expiryTime = namer.getUtcNow().plusDays(1) + + when: + def credential = StorageSharedKeyCredential.fromConnectionString(environment.primaryAccount.connectionString) + def sasValues = new AccountSasSignatureValues(expiryTime, permissions, service, resourceType) + def sas = queueServiceBuilderHelper() + .endpoint(primaryQueueServiceClient.getQueueServiceUrl()) + .credential(credential) + .buildClient() + .generateAccountSas(sasValues) + + def scBuilder = queueServiceBuilderHelper() + scBuilder.endpoint(primaryQueueServiceClient.getQueueServiceUrl()) + .sasToken(sas) + def sc = scBuilder.buildClient() + + sc.listQueues() + + then: + notThrown(QueueStorageException) + } + + def "AccountSAS network on endpoint"() { + setup: + def service = new AccountSasService() + .setQueueAccess(true) + def resourceType = new AccountSasResourceType() + .setContainer(true) + .setService(true) + .setObject(true) + def permissions = new AccountSasPermission() + .setReadPermission(true) + .setCreatePermission(true) + .setWritePermission(true) + .setListPermission(true) + .setDeletePermission(true) + def expiryTime = namer.getUtcNow().plusDays(1) + + def credential = StorageSharedKeyCredential.fromConnectionString(environment.primaryAccount.connectionString) + def sasValues = new AccountSasSignatureValues(expiryTime, permissions, service, resourceType) + def sas = queueServiceBuilderHelper() + .endpoint(primaryQueueServiceClient.getQueueServiceUrl()) + .credential(credential) + .buildClient() + .generateAccountSas(sasValues) + + def queueName = namer.getRandomName(60) + + when: + def sc = getServiceClientBuilder(null, primaryQueueServiceClient.getQueueServiceUrl() + "?" + sas, null).buildClient() + sc.createQueue(queueName) + + def qc = getQueueClientBuilder(primaryQueueServiceClient.getQueueServiceUrl() + "/" + queueName + "?" + sas).buildClient() + qc.delete() + + then: + notThrown(Exception) + } + + /* + Ensures that we don't break the functionality of the deprecated means of generating an AccountSas. + Only run in live mode because recordings would frequently get messed up when we update recordings to new sas version + */ + @LiveOnly + def "Account sas deprecated"() { + def service = new AccountSasService() + .setQueueAccess(true) + def resourceType = new AccountSasResourceType() + .setContainer(true) + .setService(true) + .setObject(true) + def permissions = new AccountSasPermission() + .setReadPermission(true) + .setCreatePermission(true) + .setDeletePermission(true) + def expiryTime = namer.getUtcNow().plusDays(1) + + when: + def credential = StorageSharedKeyCredential.fromConnectionString(environment.primaryAccount.connectionString) + def sas = new AccountSasSignatureValues() + .setServices(service.toString()) + .setResourceTypes(resourceType.toString()) + .setPermissions(permissions) + .setExpiryTime(expiryTime) + .generateSasQueryParameters(credential) + .encode() + + def scBuilder = queueServiceBuilderHelper() + scBuilder.endpoint(primaryQueueServiceClient.getQueueServiceUrl()) + .sasToken(sas) + def sc = scBuilder.buildClient() + def queueName = namer.getRandomName(60) + sc.createQueue(queueName) + + then: + notThrown(QueueStorageException) + + when: + sc.deleteQueue(queueName) + + then: + notThrown(QueueStorageException) + } + + def "can use sas to authenticate"() { + setup: + def service = new AccountSasService() + .setQueueAccess(true) + def resourceType = new AccountSasResourceType() + .setContainer(true) + .setService(true) + .setObject(true) + def permissions = new AccountSasPermission() + .setReadPermission(true) + def expiryTime = namer.getUtcNow().plusDays(1) + def sasValues = new AccountSasSignatureValues(expiryTime, permissions, service, resourceType) + def sas = primaryQueueServiceClient.generateAccountSas(sasValues) + + queueClient.create() + + when: + instrument(new QueueClientBuilder() + .endpoint(queueClient.getQueueUrl()) + .sasToken(sas)) + .buildClient() + .getProperties() + + then: + noExceptionThrown() + + when: + instrument(new QueueClientBuilder() + .endpoint(queueClient.getQueueUrl()) + .credential(new AzureSasCredential(sas))) + .buildClient() + .getProperties() + + then: + noExceptionThrown() + + when: + instrument(new QueueClientBuilder() + .endpoint(queueClient.getQueueUrl() + "?" + sas)) + .buildClient() + .getProperties() + + then: + noExceptionThrown() + + when: + instrument(new QueueServiceClientBuilder() + .endpoint(queueClient.getQueueUrl()) + .sasToken(sas)) + .buildClient() + .getProperties() + + then: + noExceptionThrown() + + when: + instrument(new QueueServiceClientBuilder() + .endpoint(queueClient.getQueueUrl()) + .credential(new AzureSasCredential(sas))) + .buildClient() + .getProperties() + + then: + noExceptionThrown() + + when: + instrument(new QueueServiceClientBuilder() + .endpoint(queueClient.getQueueUrl() + "?" + sas)) + .buildClient() + .getProperties() + + then: + noExceptionThrown() + } +} diff --git a/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueSasClientTests.groovy b/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueSasClientTests.groovy new file mode 100644 index 0000000000000..ee7e7bc5619df --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueSasClientTests.groovy @@ -0,0 +1,215 @@ +package com.azure.storage.queue + +import com.azure.storage.common.sas.AccountSasPermission +import com.azure.storage.common.sas.AccountSasResourceType +import com.azure.storage.common.sas.AccountSasService +import com.azure.storage.common.sas.AccountSasSignatureValues +import com.azure.storage.common.sas.SasProtocol +import com.azure.storage.queue.models.QueueAccessPolicy +import com.azure.storage.queue.models.QueueSignedIdentifier +import com.azure.storage.queue.models.QueueStorageException +import com.azure.storage.queue.sas.QueueSasPermission +import com.azure.storage.queue.sas.QueueServiceSasSignatureValues + +import java.time.Duration +import java.time.temporal.ChronoUnit + +class QueueSasClientTests extends APISpec { + + QueueClient sasClient + def resp + + def setup() { + primaryQueueServiceClient = queueServiceBuilderHelper().buildClient() + sasClient = primaryQueueServiceClient.getQueueClient(namer.getRandomName(50)) + sasClient.create() + resp = sasClient.sendMessage("test") + } + + QueueServiceSasSignatureValues generateValues(QueueSasPermission permission) { + return new QueueServiceSasSignatureValues(namer.getUtcNow().plusDays(1), permission) + .setStartTime(namer.getUtcNow().minusDays(1)) + .setProtocol(SasProtocol.HTTPS_HTTP) + } + + def "QueueSAS enqueue with perm"() { + setup: + def permissions = new QueueSasPermission() + .setReadPermission(true) + .setAddPermission(true) + .setProcessPermission(true) + def sasValues = generateValues(permissions) + + when: + def sasPermissions = sasClient.generateSas(sasValues) + + def clientPermissions = queueBuilderHelper() + .endpoint(sasClient.getQueueUrl()) + .queueName(sasClient.getQueueName()) + .sasToken(sasPermissions) + .buildClient() + clientPermissions.sendMessage("sastest") + def dequeueMsgIterPermissions = clientPermissions.receiveMessages(2).iterator() + + then: + notThrown(QueueStorageException) + "test" == dequeueMsgIterPermissions.next().getMessageText() + "sastest" == dequeueMsgIterPermissions.next().getMessageText() + + when: + clientPermissions.updateMessage(resp.getMessageId(), resp.getPopReceipt(), "testing", Duration.ofHours(1)) + + then: + thrown(QueueStorageException) + } + + def "QueueSAS update with perm"() { + setup: + def permissions = new QueueSasPermission() + .setReadPermission(true) + .setAddPermission(true) + .setProcessPermission(true) + .setUpdatePermission(true) + def sasValues = generateValues(permissions) + + when: + def sasPermissions = sasClient.generateSas(sasValues) + + def clientPermissions = queueBuilderHelper() + .endpoint(sasClient.getQueueUrl()) + .queueName(sasClient.getQueueName()) + .sasToken(sasPermissions) + .buildClient() + clientPermissions.updateMessage(resp.getMessageId(), resp.getPopReceipt(), "testing", Duration.ZERO) + def dequeueMsgIterPermissions = clientPermissions.receiveMessages(1).iterator() + + then: + notThrown(QueueStorageException) + "testing" == dequeueMsgIterPermissions.next().getMessageText() + + when: + clientPermissions.delete() + + then: + thrown(QueueStorageException) + } + + // NOTE: Serializer for set access policy keeps milliseconds + def "QueueSAS enqueue with id"() { + setup: + + def permissions = new QueueSasPermission() + .setReadPermission(true) + .setAddPermission(true) + .setUpdatePermission(true) + .setProcessPermission(true) + def expiryTime = namer.getUtcNow().plusDays(1).truncatedTo(ChronoUnit.SECONDS) + def startTime = namer.getUtcNow().minusDays(1).truncatedTo(ChronoUnit.SECONDS) + + QueueSignedIdentifier identifier = new QueueSignedIdentifier() + .setId(namer.getRandomUuid()) + .setAccessPolicy(new QueueAccessPolicy().setPermissions(permissions.toString()) + .setExpiresOn(expiryTime).setStartsOn(startTime)) + sasClient.setAccessPolicy(Arrays.asList(identifier)) + + // Wait 30 seconds as it may take time for the access policy to take effect. + sleepIfLive(30000) + + when: + def sasValues = new QueueServiceSasSignatureValues(identifier.getId()) + + def sasIdentifier = sasClient.generateSas(sasValues) + + def clientBuilder = queueBuilderHelper() + def clientIdentifier = clientBuilder + .endpoint(sasClient.getQueueUrl()) + .queueName(sasClient.getQueueName()) + .sasToken(sasIdentifier) + .buildClient() + clientIdentifier.sendMessage("sastest") + def dequeueMsgIterIdentifier = clientIdentifier.receiveMessages(2).iterator() + + then: + notThrown(QueueStorageException) + "test" == dequeueMsgIterIdentifier.next().getMessageText() + "sastest" == dequeueMsgIterIdentifier.next().getMessageText() + } + + def "AccountSAS create queue"() { + def service = new AccountSasService() + .setQueueAccess(true) + def resourceType = new AccountSasResourceType() + .setContainer(true) + .setService(true) + .setObject(true) + def permissions = new AccountSasPermission() + .setReadPermission(true) + .setCreatePermission(true) + .setDeletePermission(true) + def expiryTime = namer.getUtcNow().plusDays(1) + + when: + def sasValues = new AccountSasSignatureValues(expiryTime, permissions, service, resourceType) + def sas = primaryQueueServiceClient.generateAccountSas(sasValues) + + def scBuilder = queueServiceBuilderHelper() + scBuilder.endpoint(primaryQueueServiceClient.getQueueServiceUrl()) + .sasToken(sas) + def sc = scBuilder.buildClient() + def queueName = namer.getRandomName(50) + sc.createQueue(queueName) + + then: + notThrown(QueueStorageException) + + when: + sc.deleteQueue(queueName) + + then: + notThrown(QueueStorageException) + } + + def "AccountSAS list queues"() { + def service = new AccountSasService() + .setQueueAccess(true) + def resourceType = new AccountSasResourceType() + .setContainer(true) + .setService(true) + .setObject(true) + def permissions = new AccountSasPermission() + .setListPermission(true) + def expiryTime = namer.getUtcNow().plusDays(1) + + when: + def sasValues = new AccountSasSignatureValues(expiryTime, permissions, service, resourceType) + def sas = primaryQueueServiceClient.generateAccountSas(sasValues) + + def scBuilder = queueServiceBuilderHelper() + scBuilder.endpoint(primaryQueueServiceClient.getQueueServiceUrl()) + .sasToken(sas) + def sc = scBuilder.buildClient() + + sc.listQueues() + + then: + notThrown(QueueStorageException) + } + + /** + * If this test fails it means that non-deprecated string to sign has new components. + * In that case we should hardcode version used for deprecated string to sign like we did for blobs. + */ + def "Remember about string to sign deprecation"() { + setup: + def client = queueBuilderHelper().credential(environment.primaryAccount.credential).buildClient() + def values = new QueueServiceSasSignatureValues(namer.getUtcNow(), new QueueSasPermission()) + values.setQueueName(client.getQueueName()) + + when: + def deprecatedStringToSign = values.generateSasQueryParameters(environment.primaryAccount.credential).encode() + def stringToSign = client.generateSas(values) + + then: + deprecatedStringToSign == stringToSign + } +} diff --git a/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueSasClientTests.java b/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueSasClientTests.java deleted file mode 100644 index 55f456415b25b..0000000000000 --- a/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueSasClientTests.java +++ /dev/null @@ -1,190 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.storage.queue; - -import com.azure.storage.common.sas.AccountSasPermission; -import com.azure.storage.common.sas.AccountSasResourceType; -import com.azure.storage.common.sas.AccountSasService; -import com.azure.storage.common.sas.AccountSasSignatureValues; -import com.azure.storage.common.sas.SasProtocol; -import com.azure.storage.queue.models.QueueAccessPolicy; -import com.azure.storage.queue.models.QueueMessageItem; -import com.azure.storage.queue.models.QueueSignedIdentifier; -import com.azure.storage.queue.models.QueueStorageException; -import com.azure.storage.queue.models.SendMessageResult; -import com.azure.storage.queue.sas.QueueSasPermission; -import com.azure.storage.queue.sas.QueueServiceSasSignatureValues; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; - -import java.time.Duration; -import java.time.OffsetDateTime; -import java.time.temporal.ChronoUnit; -import java.util.Arrays; -import java.util.Iterator; - -import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertThrows; - -public class QueueSasClientTests extends QueueTestBase { - private QueueClient sasClient; - private SendMessageResult resp; - - @BeforeEach - public void setup() { - primaryQueueServiceClient = queueServiceBuilderHelper().buildClient(); - sasClient = primaryQueueServiceClient.getQueueClient(getRandomName(50)); - sasClient.create(); - resp = sasClient.sendMessage("test"); - } - - private QueueServiceSasSignatureValues generateValues(QueueSasPermission permission) { - return new QueueServiceSasSignatureValues(testResourceNamer.now().plusDays(1), permission) - .setStartTime(testResourceNamer.now().minusDays(1)) - .setProtocol(SasProtocol.HTTPS_HTTP); - } - - @Test - public void queueSasEnqueueWithPerm() { - QueueSasPermission permissions = new QueueSasPermission() - .setReadPermission(true) - .setAddPermission(true) - .setProcessPermission(true); - QueueServiceSasSignatureValues sasValues = generateValues(permissions); - - QueueClient clientPermissions = queueBuilderHelper() - .endpoint(sasClient.getQueueUrl()) - .queueName(sasClient.getQueueName()) - .sasToken(sasClient.generateSas(sasValues)) - .buildClient(); - clientPermissions.sendMessage("sastest"); - - Iterator dequeueMsgIterPermissions = clientPermissions.receiveMessages(2).iterator(); - assertEquals("test", dequeueMsgIterPermissions.next().getMessageText()); - assertEquals("sastest", dequeueMsgIterPermissions.next().getMessageText()); - - assertThrows(QueueStorageException.class, () -> clientPermissions.updateMessage(resp.getMessageId(), - resp.getPopReceipt(), "testing", Duration.ofHours(1))); - } - - @Test - public void queueSasUpdateWithPerm() { - QueueSasPermission permissions = new QueueSasPermission() - .setReadPermission(true) - .setAddPermission(true) - .setProcessPermission(true) - .setUpdatePermission(true); - QueueServiceSasSignatureValues sasValues = generateValues(permissions); - - QueueClient clientPermissions = queueBuilderHelper() - .endpoint(sasClient.getQueueUrl()) - .queueName(sasClient.getQueueName()) - .sasToken(sasClient.generateSas(sasValues)) - .buildClient(); - - clientPermissions.updateMessage(resp.getMessageId(), resp.getPopReceipt(), "testing", Duration.ZERO); - - Iterator dequeueMsgIterPermissions = clientPermissions.receiveMessages(1).iterator(); - assertEquals("testing", dequeueMsgIterPermissions.next().getMessageText()); - - assertThrows(QueueStorageException.class, clientPermissions::delete); - } - - // NOTE: Serializer for set access policy keeps milliseconds - @Test - public void queueSasEnqueueWithId() { - QueueSasPermission permissions = new QueueSasPermission() - .setReadPermission(true) - .setAddPermission(true) - .setUpdatePermission(true) - .setProcessPermission(true); - OffsetDateTime expiryTime = testResourceNamer.now().plusDays(1).truncatedTo(ChronoUnit.SECONDS); - OffsetDateTime startTime = testResourceNamer.now().minusDays(1).truncatedTo(ChronoUnit.SECONDS); - - QueueSignedIdentifier identifier = new QueueSignedIdentifier() - .setId(testResourceNamer.randomUuid()) - .setAccessPolicy(new QueueAccessPolicy().setPermissions(permissions.toString()) - .setExpiresOn(expiryTime).setStartsOn(startTime)); - sasClient.setAccessPolicy(Arrays.asList(identifier)); - - // Wait 30 seconds as it may take time for the access policy to take effect. - sleepIfRunningAgainstService(30000); - - QueueServiceSasSignatureValues sasValues = new QueueServiceSasSignatureValues(identifier.getId()); - - QueueClient clientIdentifier = queueBuilderHelper() - .endpoint(sasClient.getQueueUrl()) - .queueName(sasClient.getQueueName()) - .sasToken(sasClient.generateSas(sasValues)) - .buildClient(); - clientIdentifier.sendMessage("sastest"); - - Iterator dequeueMsgIterIdentifier = clientIdentifier.receiveMessages(2).iterator(); - assertEquals("test", dequeueMsgIterIdentifier.next().getMessageText()); - assertEquals("sastest", dequeueMsgIterIdentifier.next().getMessageText()); - } - - @Test - public void accountSasCreateQueue() { - AccountSasService service = new AccountSasService().setQueueAccess(true); - AccountSasResourceType resourceType = new AccountSasResourceType() - .setContainer(true) - .setService(true) - .setObject(true); - AccountSasPermission permissions = new AccountSasPermission() - .setReadPermission(true) - .setCreatePermission(true) - .setDeletePermission(true); - - AccountSasSignatureValues sasValues = new AccountSasSignatureValues(testResourceNamer.now().plusDays(1), - permissions, service, resourceType); - - QueueServiceClient sc = queueServiceBuilderHelper() - .endpoint(primaryQueueServiceClient.getQueueServiceUrl()) - .sasToken(primaryQueueServiceClient.generateAccountSas(sasValues)) - .buildClient(); - - String queueName = getRandomName(50); - assertDoesNotThrow(() -> sc.createQueue(queueName)); - assertDoesNotThrow(() -> sc.deleteQueue(queueName)); - } - - @Test - public void accountSasListQueues() { - AccountSasService service = new AccountSasService().setQueueAccess(true); - AccountSasResourceType resourceType = new AccountSasResourceType() - .setContainer(true) - .setService(true) - .setObject(true); - AccountSasPermission permissions = new AccountSasPermission().setListPermission(true); - AccountSasSignatureValues sasValues = new AccountSasSignatureValues(testResourceNamer.now().plusDays(1), - permissions, service, resourceType); - - QueueServiceClient sc = queueServiceBuilderHelper() - .endpoint(primaryQueueServiceClient.getQueueServiceUrl()) - .sasToken(primaryQueueServiceClient.generateAccountSas(sasValues)) - .buildClient(); - - assertDoesNotThrow(() -> sc.listQueues().iterator().hasNext()); - } - - /** - * If this test fails it means that non-deprecated string to sign has new components. In that case we should - * hardcode version used for deprecated string to sign like we did for blobs. - */ - @Test - public void rememberAboutStringToSignDeprecation() { - QueueClient client = queueBuilderHelper().credential(ENVIRONMENT.getPrimaryAccount().getCredential()) - .buildClient(); - QueueServiceSasSignatureValues values = new QueueServiceSasSignatureValues(testResourceNamer.now(), - new QueueSasPermission()); - values.setQueueName(client.getQueueName()); - - String deprecatedStringToSign = values.generateSasQueryParameters(ENVIRONMENT.getPrimaryAccount() - .getCredential()).encode(); - - assertEquals(deprecatedStringToSign, client.generateSas(values)); - } -} diff --git a/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueSasTests.java b/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueSasTests.java deleted file mode 100644 index 14dc080d8fea7..0000000000000 --- a/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueSasTests.java +++ /dev/null @@ -1,403 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.storage.queue; - -import com.azure.core.credential.AzureSasCredential; -import com.azure.core.test.TestMode; -import com.azure.storage.common.StorageSharedKeyCredential; -import com.azure.storage.common.sas.AccountSasPermission; -import com.azure.storage.common.sas.AccountSasResourceType; -import com.azure.storage.common.sas.AccountSasService; -import com.azure.storage.common.sas.AccountSasSignatureValues; -import com.azure.storage.common.sas.SasProtocol; -import com.azure.storage.queue.models.QueueAccessPolicy; -import com.azure.storage.queue.models.QueueMessageItem; -import com.azure.storage.queue.models.QueueSignedIdentifier; -import com.azure.storage.queue.models.QueueStorageException; -import com.azure.storage.queue.models.SendMessageResult; -import com.azure.storage.queue.sas.QueueSasPermission; -import com.azure.storage.queue.sas.QueueServiceSasSignatureValues; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.params.ParameterizedTest; -import org.junit.jupiter.params.provider.Arguments; -import org.junit.jupiter.params.provider.MethodSource; - -import java.time.Duration; -import java.time.OffsetDateTime; -import java.time.temporal.ChronoUnit; -import java.util.Arrays; -import java.util.Iterator; -import java.util.stream.Stream; - -import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertThrows; - -public class QueueSasTests extends QueueTestBase { - private QueueClient queueClient; - - @BeforeEach - public void setup() { - primaryQueueServiceClient = queueServiceBuilderHelper().buildClient(); - queueClient = primaryQueueServiceClient.getQueueClient(getRandomName(60)); - } - - @ParameterizedTest - @MethodSource("queueSasPermissionParseSupplier") - public void queueSasPermissionParse(String permString, boolean read, boolean add, boolean update, boolean process) { - QueueSasPermission perms = QueueSasPermission.parse(permString); - - assertEquals(read, perms.hasReadPermission()); - assertEquals(add, perms.hasAddPermission()); - assertEquals(update, perms.hasUpdatePermission()); - assertEquals(process, perms.hasProcessPermission()); - } - - private static Stream queueSasPermissionParseSupplier() { - return Stream.of( - Arguments.of("r", true, false, false, false), - Arguments.of("a", false, true, false, false), - Arguments.of("u", false, false, true, false), - Arguments.of("p", false, false, false, true), - Arguments.of("raup", true, true, true, true), - Arguments.of("apru", true, true, true, true), - Arguments.of("rap", true, true, false, true), - Arguments.of("ur", true, false, true, false) - ); - } - - @ParameterizedTest - @MethodSource("queueSasPermissionStringSupplier") - public void queueSasPermissionString(boolean read, boolean add, boolean update, boolean process, String expected) { - QueueSasPermission perms = new QueueSasPermission() - .setReadPermission(read) - .setAddPermission(add) - .setUpdatePermission(update) - .setProcessPermission(process); - - assertEquals(expected, perms.toString()); - } - - private static Stream queueSasPermissionStringSupplier() { - return Stream.of( - Arguments.of(true, false, false, false, "r"), - Arguments.of(false, true, false, false, "a"), - Arguments.of(false, false, true, false, "u"), - Arguments.of(false, false, false, true, "p"), - Arguments.of(true, false, true, false, "ru"), - Arguments.of(true, true, true, true, "raup") - ); - } - - @Test - public void queueSasPermissionParseIA() { - assertThrows(IllegalArgumentException.class, () -> QueueSasPermission.parse("rwag")); - } - - @Test - public void queueServiceSasCanonicalizedResource() { - String queueName = queueClient.getQueueName(); - - assertEquals(queueName, new QueueServiceSasSignatureValues().setQueueName(queueName).getQueueName()); - } - - @Test - public void queueSasEnqueueDequeueWithPermissions() { - queueClient.create(); - SendMessageResult resp = queueClient.sendMessage("test"); - - QueueSasPermission permissions = new QueueSasPermission() - .setReadPermission(true) - .setAddPermission(true) - .setProcessPermission(true); - StorageSharedKeyCredential credential = - StorageSharedKeyCredential.fromConnectionString(getPrimaryConnectionString()); - String sasPermissions = new QueueServiceSasSignatureValues() - .setPermissions(permissions) - .setStartTime(testResourceNamer.now().minusDays(1)) - .setExpiryTime(testResourceNamer.now().plusDays(1)) - .setProtocol(SasProtocol.HTTPS_HTTP) - .setQueueName(queueClient.getQueueName()) - .generateSasQueryParameters(credential) - .encode(); - - QueueClient clientPermissions = queueBuilderHelper() - .endpoint(queueClient.getQueueUrl()) - .queueName(queueClient.getQueueName()) - .sasToken(sasPermissions) - .buildClient(); - clientPermissions.sendMessage("sastest"); - - Iterator dequeueMsgIterPermissions = clientPermissions.receiveMessages(2).iterator(); - assertEquals("test", dequeueMsgIterPermissions.next().getMessageText()); - assertEquals("sastest", dequeueMsgIterPermissions.next().getMessageText()); - - assertThrows(QueueStorageException.class, () -> clientPermissions.updateMessage(resp.getMessageId(), - resp.getPopReceipt(), "testing", Duration.ofHours(1))); - } - - @Test - public void queueSasUpdateDeleteWithPermissions() { - queueClient.create(); - SendMessageResult resp = queueClient.sendMessage("test"); - - QueueSasPermission permissions = new QueueSasPermission() - .setReadPermission(true) - .setAddPermission(true) - .setProcessPermission(true) - .setUpdatePermission(true); - - StorageSharedKeyCredential credential = - StorageSharedKeyCredential.fromConnectionString(getPrimaryConnectionString()); - String sasPermissions = new QueueServiceSasSignatureValues() - .setPermissions(permissions) - .setStartTime(testResourceNamer.now().minusDays(1)) - .setExpiryTime(testResourceNamer.now().plusDays(1)) - .setProtocol(SasProtocol.HTTPS_HTTP) - .setQueueName(queueClient.getQueueName()) - .generateSasQueryParameters(credential) - .encode(); - - QueueClient clientPermissions = queueBuilderHelper() - .endpoint(queueClient.getQueueUrl()) - .queueName(queueClient.getQueueName()) - .sasToken(sasPermissions) - .buildClient(); - clientPermissions.updateMessage(resp.getMessageId(), resp.getPopReceipt(), "testing", Duration.ZERO); - - Iterator dequeueMsgIterPermissions = clientPermissions.receiveMessages(1).iterator(); - assertEquals("testing", dequeueMsgIterPermissions.next().getMessageText()); - - assertThrows(QueueStorageException.class, clientPermissions::delete); - } - - // NOTE: Serializer for set access policy keeps milliseconds - @Test - public void queueSasEnqueueDequeueWithIdentifier() { - queueClient.create(); - queueClient.sendMessage("test"); - - QueueSasPermission permissions = new QueueSasPermission() - .setReadPermission(true) - .setAddPermission(true) - .setUpdatePermission(true) - .setProcessPermission(true); - OffsetDateTime expiryTime = testResourceNamer.now().plusDays(1).truncatedTo(ChronoUnit.SECONDS); - OffsetDateTime startTime = testResourceNamer.now().minusDays(1).truncatedTo(ChronoUnit.SECONDS); - - QueueSignedIdentifier identifier = new QueueSignedIdentifier() - .setId(testResourceNamer.randomUuid()) - .setAccessPolicy(new QueueAccessPolicy().setPermissions(permissions.toString()) - .setExpiresOn(expiryTime).setStartsOn(startTime)); - queueClient.setAccessPolicy(Arrays.asList(identifier)); - - // Wait 30 seconds as it may take time for the access policy to take effect. - sleepIfRunningAgainstService(30000); - - StorageSharedKeyCredential credential = - StorageSharedKeyCredential.fromConnectionString(getPrimaryConnectionString()); - String sasIdentifier = new QueueServiceSasSignatureValues() - .setIdentifier(identifier.getId()) - .setQueueName(queueClient.getQueueName()) - .generateSasQueryParameters(credential) - .encode(); - - QueueClient clientIdentifier = queueBuilderHelper() - .endpoint(queueClient.getQueueUrl()) - .queueName(queueClient.getQueueName()) - .sasToken(sasIdentifier) - .buildClient(); - clientIdentifier.sendMessage("sastest"); - - Iterator dequeueMsgIterIdentifier = clientIdentifier.receiveMessages(2).iterator(); - assertEquals("test", dequeueMsgIterIdentifier.next().getMessageText()); - assertEquals("sastest", dequeueMsgIterIdentifier.next().getMessageText()); - } - - @Test - public void accountSasCreateDeleteQueue() { - AccountSasService service = new AccountSasService().setQueueAccess(true); - AccountSasResourceType resourceType = new AccountSasResourceType() - .setContainer(true) - .setService(true) - .setObject(true); - AccountSasPermission permissions = new AccountSasPermission() - .setReadPermission(true) - .setCreatePermission(true) - .setDeletePermission(true); - - StorageSharedKeyCredential credential = - StorageSharedKeyCredential.fromConnectionString(getPrimaryConnectionString()); - AccountSasSignatureValues sasValues = new AccountSasSignatureValues(testResourceNamer.now().plusDays(1), - permissions, service, resourceType); - String sas = queueServiceBuilderHelper() - .endpoint(primaryQueueServiceClient.getQueueServiceUrl()) - .credential(credential) - .buildClient() - .generateAccountSas(sasValues); - - QueueServiceClient sc = queueServiceBuilderHelper() - .endpoint(primaryQueueServiceClient.getQueueServiceUrl()) - .sasToken(sas) - .buildClient(); - String queueName = getRandomName(60); - - assertDoesNotThrow(() -> sc.createQueue(queueName)); - assertDoesNotThrow(() -> sc.deleteQueue(queueName)); - } - - @Test - public void accountSasListQueues() { - AccountSasService service = new AccountSasService().setQueueAccess(true); - AccountSasResourceType resourceType = new AccountSasResourceType() - .setContainer(true) - .setService(true) - .setObject(true); - AccountSasPermission permissions = new AccountSasPermission().setListPermission(true); - - StorageSharedKeyCredential credential = - StorageSharedKeyCredential.fromConnectionString(getPrimaryConnectionString()); - AccountSasSignatureValues sasValues = new AccountSasSignatureValues(testResourceNamer.now().plusDays(1), - permissions, service, resourceType); - String sas = queueServiceBuilderHelper() - .endpoint(primaryQueueServiceClient.getQueueServiceUrl()) - .credential(credential) - .buildClient() - .generateAccountSas(sasValues); - - QueueServiceClient sc = queueServiceBuilderHelper() - .endpoint(primaryQueueServiceClient.getQueueServiceUrl()) - .sasToken(sas) - .buildClient(); - - assertDoesNotThrow(() -> sc.listQueues().iterator().hasNext()); - } - - @Test - public void accountSasNetworkOnEndpoint() { - AccountSasService service = new AccountSasService().setQueueAccess(true); - AccountSasResourceType resourceType = new AccountSasResourceType() - .setContainer(true) - .setService(true) - .setObject(true); - AccountSasPermission permissions = new AccountSasPermission() - .setReadPermission(true) - .setCreatePermission(true) - .setWritePermission(true) - .setListPermission(true) - .setDeletePermission(true); - - StorageSharedKeyCredential credential = - StorageSharedKeyCredential.fromConnectionString(getPrimaryConnectionString()); - AccountSasSignatureValues sasValues = new AccountSasSignatureValues(testResourceNamer.now().plusDays(1), - permissions, service, resourceType); - String sas = queueServiceBuilderHelper() - .endpoint(primaryQueueServiceClient.getQueueServiceUrl()) - .credential(credential) - .buildClient() - .generateAccountSas(sasValues); - - String queueName = getRandomName(60); - - assertDoesNotThrow(() -> - getServiceClientBuilder(null, primaryQueueServiceClient.getQueueServiceUrl() + "?" + sas) - .buildClient() - .createQueue(queueName)); - - assertDoesNotThrow(() -> - getQueueClientBuilder(primaryQueueServiceClient.getQueueServiceUrl() + "/" + queueName + "?" + sas) - .buildClient() - .delete()); - } - - /* - Ensures that we don't break the functionality of the deprecated means of generating an AccountSas. - Only run in live mode because recordings would frequently get messed up when we update recordings to new sas version - */ - @Test - public void accountSasDeprecated() { - if (getTestMode() != TestMode.LIVE) { - return; - } - - AccountSasService service = new AccountSasService().setQueueAccess(true); - AccountSasResourceType resourceType = new AccountSasResourceType() - .setContainer(true) - .setService(true) - .setObject(true); - AccountSasPermission permissions = new AccountSasPermission() - .setReadPermission(true) - .setCreatePermission(true) - .setDeletePermission(true); - - StorageSharedKeyCredential credential = - StorageSharedKeyCredential.fromConnectionString(getPrimaryConnectionString()); - String sas = new AccountSasSignatureValues() - .setServices(service.toString()) - .setResourceTypes(resourceType.toString()) - .setPermissions(permissions) - .setExpiryTime(testResourceNamer.now().plusDays(1)) - .generateSasQueryParameters(credential) - .encode(); - - QueueServiceClient sc = queueServiceBuilderHelper() - .endpoint(primaryQueueServiceClient.getQueueServiceUrl()) - .sasToken(sas) - .buildClient(); - String queueName = getRandomName(60); - - assertDoesNotThrow(() -> sc.createQueue(queueName)); - assertDoesNotThrow(() -> sc.deleteQueue(queueName)); - } - - @Test - public void canUseSasToAuthenticate() { - AccountSasService service = new AccountSasService().setQueueAccess(true); - AccountSasResourceType resourceType = new AccountSasResourceType() - .setContainer(true) - .setService(true) - .setObject(true); - AccountSasPermission permissions = new AccountSasPermission().setReadPermission(true); - AccountSasSignatureValues sasValues = new AccountSasSignatureValues(testResourceNamer.now().plusDays(1), - permissions, service, resourceType); - String sas = primaryQueueServiceClient.generateAccountSas(sasValues); - - queueClient.create(); - - assertDoesNotThrow(() -> instrument(new QueueClientBuilder() - .endpoint(queueClient.getQueueUrl()) - .sasToken(sas)) - .buildClient() - .getProperties()); - - assertDoesNotThrow(() -> instrument(new QueueClientBuilder() - .endpoint(queueClient.getQueueUrl()) - .credential(new AzureSasCredential(sas))) - .buildClient() - .getProperties()); - - assertDoesNotThrow(() -> instrument(new QueueClientBuilder() - .endpoint(queueClient.getQueueUrl() + "?" + sas)) - .buildClient() - .getProperties()); - - assertDoesNotThrow(() -> instrument(new QueueServiceClientBuilder() - .endpoint(queueClient.getQueueUrl()) - .sasToken(sas)) - .buildClient() - .getProperties()); - - assertDoesNotThrow(() -> instrument(new QueueServiceClientBuilder() - .endpoint(queueClient.getQueueUrl()) - .credential(new AzureSasCredential(sas))) - .buildClient() - .getProperties()); - - assertDoesNotThrow(() -> instrument(new QueueServiceClientBuilder() - .endpoint(queueClient.getQueueUrl() + "?" + sas)) - .buildClient() - .getProperties()); - } -} diff --git a/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueServiceAPITests.groovy b/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueServiceAPITests.groovy new file mode 100644 index 0000000000000..ed326abddd709 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueServiceAPITests.groovy @@ -0,0 +1,238 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.queue + +import com.azure.identity.DefaultAzureCredentialBuilder +import com.azure.storage.queue.models.QueueAnalyticsLogging +import com.azure.storage.queue.models.QueueErrorCode +import com.azure.storage.queue.models.QueueItem +import com.azure.storage.queue.models.QueueMetrics +import com.azure.storage.queue.models.QueueRetentionPolicy +import com.azure.storage.queue.models.QueueServiceProperties +import com.azure.storage.queue.models.QueuesSegmentOptions +import com.azure.storage.queue.models.QueueStorageException +import spock.lang.ResourceLock +import spock.lang.Unroll + +class QueueServiceAPITests extends APISpec { + + def setup() { + primaryQueueServiceClient = queueServiceBuilderHelper().buildClient() + } + + def "Get queue client"() { + given: + def queueClient = primaryQueueServiceClient.getQueueClient(namer.getRandomName(60)) + + expect: + queueClient instanceof QueueClient + } + + def "Create queue"() { + when: + def queueClientResponse = primaryQueueServiceClient.createQueueWithResponse(namer.getRandomName(60), null, null, null) + def enqueueMessageResponse = queueClientResponse.getValue().sendMessageWithResponse("Testing service client creating a queue", null, null, null,null) + + then: + QueueTestHelper.assertResponseStatusCode(queueClientResponse, 201) + QueueTestHelper.assertResponseStatusCode(enqueueMessageResponse, 201) + } + + @Unroll + def "Create queue with invalid name"() { + when: + primaryQueueServiceClient.createQueue(queueName) + + then: + def e = thrown(QueueStorageException) + QueueTestHelper.assertExceptionStatusCodeAndMessage(e, statusCode, errMesage) + + where: + queueName | statusCode | errMesage + "a_b" | 400 | QueueErrorCode.INVALID_RESOURCE_NAME + "-ab" | 400 | QueueErrorCode.INVALID_RESOURCE_NAME + "a--b" | 400 | QueueErrorCode.INVALID_RESOURCE_NAME + "Abc" | 400 | QueueErrorCode.INVALID_RESOURCE_NAME + "ab" | 400 | QueueErrorCode.OUT_OF_RANGE_INPUT + "verylong" * 8 | 400 | QueueErrorCode.OUT_OF_RANGE_INPUT + } + + def "Create null"() { + when: + primaryQueueServiceClient.createQueue(null) + + then: + thrown(NullPointerException) + } + + @Unroll + def "Create queue maxOverload"() { + when: + def queueClientResponse = primaryQueueServiceClient.createQueueWithResponse(namer.getRandomName(60), metadata,null, null) + def enqueueMessageResponse = queueClientResponse.getValue().sendMessageWithResponse("Testing service client creating a queue", null, null, null, null) + + then: + QueueTestHelper.assertResponseStatusCode(queueClientResponse, 201) + QueueTestHelper.assertResponseStatusCode(enqueueMessageResponse, 201) + + where: + metadata | _ + null | _ + Collections.singletonMap("metadata", "value") | _ + Collections.singletonMap("metadata", "va@lue") | _ + } + + def "Create queue with invalid metadata"() { + given: + def queueName = namer.getRandomName(16) + + when: + primaryQueueServiceClient.createQueueWithResponse(queueName, Collections.singletonMap("metadata!", "value"), null, null) + + then: + def e = thrown(QueueStorageException) + QueueTestHelper.assertExceptionStatusCodeAndMessage(e, 400, QueueErrorCode.INVALID_METADATA) + } + + def "Delete queue"() { + given: + def queueName = namer.getRandomName(60) + + when: + def queueClient = primaryQueueServiceClient.createQueue(queueName) + def deleteQueueResponse = primaryQueueServiceClient.deleteQueueWithResponse(queueName, null, null) + queueClient.sendMessage("Expecting exception as queue has been deleted.") + + then: + QueueTestHelper.assertResponseStatusCode(deleteQueueResponse, 204) + def e = thrown(QueueStorageException) + QueueTestHelper.assertExceptionStatusCodeAndMessage(e, 404, QueueErrorCode.QUEUE_NOT_FOUND) + } + + def "Delete queue error"() { + when: + primaryQueueServiceClient.deleteQueueWithResponse(namer.getRandomName(60), null, null) + + then: + def e = thrown(QueueStorageException) + QueueTestHelper.assertExceptionStatusCodeAndMessage(e, 404, QueueErrorCode.QUEUE_NOT_FOUND) + } + + @Unroll + def "List queues"() { + given: + def prefix = namer.getResourcePrefix() + "q" + def queueName = namer.getRandomName(prefix,50) + LinkedList testQueues = new LinkedList<>() + for (int i = 0; i < 3; i++) { + String version = Integer.toString(i) + QueueItem queue = new QueueItem().setName(queueName + version) + .setMetadata(Collections.singletonMap("metadata" + version, "value" + version)) + testQueues.add(queue) + primaryQueueServiceClient.createQueueWithResponse(queue.getName(), queue.getMetadata(), null, null) + } + + when: + def queueListIter = primaryQueueServiceClient.listQueues(options.setPrefix(prefix), null, null) + then: + queueListIter.each { + QueueTestHelper.assertQueuesAreEqual(it, testQueues.pop()) + primaryQueueServiceClient.deleteQueue(it.getName()) + } + testQueues.size() == 0 + + where: + options | _ + new QueuesSegmentOptions() | _ + new QueuesSegmentOptions().setMaxResultsPerPage(2) | _ + new QueuesSegmentOptions().setIncludeMetadata(true) | _ + } + + def "List queues max results by page"() { + given: + def options = new QueuesSegmentOptions().setPrefix(namer.getResourcePrefix()) + def queueName = namer.getRandomName(60) + LinkedList testQueues = new LinkedList<>() + for (int i = 0; i < 3; i++) { + String version = Integer.toString(i) + QueueItem queue = new QueueItem().setName(queueName + version) + testQueues.add(queue) + primaryQueueServiceClient.createQueueWithResponse(queue.getName(), null, null, null) + } + + when: + def queueListIter = primaryQueueServiceClient.listQueues(options, null, null).iterableByPage(2).iterator() + + then: + for (def page : queueListIter) { + page.value.size() <= 2 + } + } + + def "List empty queues"() { + expect: + // Queue was never made with the prefix, should expect no queues to be listed. + !primaryQueueServiceClient.listQueues(new QueuesSegmentOptions().setPrefix(namer.getResourcePrefix()), null, null).iterator().hasNext() + } + + @ResourceLock("ServiceProperties") + def "Get and set properties"() { + given: + def originalProperties = primaryQueueServiceClient.getProperties() + def retentionPolicy = new QueueRetentionPolicy().setEnabled(true) + .setDays(3) + def logging = new QueueAnalyticsLogging().setVersion("1.0") + .setDelete(true) + .setWrite(true) + .setRetentionPolicy(retentionPolicy) + def metrics = new QueueMetrics().setEnabled(true) + .setIncludeApis(false) + .setRetentionPolicy(retentionPolicy) + .setVersion("1.0") + def updatedProperties = new QueueServiceProperties().setAnalyticsLogging(logging) + .setHourMetrics(metrics) + .setMinuteMetrics(metrics) + .setCors(new ArrayList<>()) + + when: + def getResponseBefore = primaryQueueServiceClient.getProperties() + def setResponse = primaryQueueServiceClient.setPropertiesWithResponse(updatedProperties, null, null) + def getResponseAfter = primaryQueueServiceClient.getProperties() + + then: + QueueTestHelper.assertQueueServicePropertiesAreEqual(originalProperties, getResponseBefore) + QueueTestHelper.assertResponseStatusCode(setResponse, 202) + QueueTestHelper.assertQueueServicePropertiesAreEqual(updatedProperties, getResponseAfter) + } + + + def "Builder bearer token validation"() { + setup: + URL url = new URL(primaryQueueServiceClient.getQueueServiceUrl()) + String endpoint = new URL("http", url.getHost(), url.getPort(), url.getFile()).toString() + def builder = new QueueServiceClientBuilder() + .credential(new DefaultAzureCredentialBuilder().build()) + .endpoint(endpoint) + + when: + builder.buildClient() + + then: + thrown(IllegalArgumentException) + } + + // This tests the policy is in the right place because if it were added per retry, it would be after the credentials and auth would fail because we changed a signed header. + def "Per call policy"() { + given: + def queueClient = queueServiceBuilderHelper() + .addPolicy(getPerCallVersionPolicy()).buildClient() + + when: + def response = queueClient.getPropertiesWithResponse(null, null) + + then: + notThrown(QueueStorageException) + response.getHeaders().getValue("x-ms-version") == "2017-11-09" + } +} diff --git a/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueServiceApiTests.java b/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueServiceApiTests.java deleted file mode 100644 index c3163fd65c185..0000000000000 --- a/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueServiceApiTests.java +++ /dev/null @@ -1,228 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.storage.queue; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.Response; -import com.azure.identity.DefaultAzureCredentialBuilder; -import com.azure.storage.queue.models.QueueAnalyticsLogging; -import com.azure.storage.queue.models.QueueErrorCode; -import com.azure.storage.queue.models.QueueItem; -import com.azure.storage.queue.models.QueueMetrics; -import com.azure.storage.queue.models.QueueRetentionPolicy; -import com.azure.storage.queue.models.QueueServiceProperties; -import com.azure.storage.queue.models.QueueStorageException; -import com.azure.storage.queue.models.QueuesSegmentOptions; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.parallel.ResourceLock; -import org.junit.jupiter.params.ParameterizedTest; -import org.junit.jupiter.params.provider.Arguments; -import org.junit.jupiter.params.provider.MethodSource; - -import java.net.MalformedURLException; -import java.net.URL; -import java.util.ArrayList; -import java.util.Collections; -import java.util.LinkedList; -import java.util.Map; -import java.util.stream.Stream; - -import static com.azure.storage.queue.QueueTestHelper.assertQueueServicePropertiesAreEqual; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertFalse; -import static org.junit.jupiter.api.Assertions.assertInstanceOf; -import static org.junit.jupiter.api.Assertions.assertThrows; -import static org.junit.jupiter.api.Assertions.assertTrue; - -public class QueueServiceApiTests extends QueueTestBase { - @BeforeEach - public void setup() { - primaryQueueServiceClient = queueServiceBuilderHelper().buildClient(); - } - - @Test - public void getQueueClient() { - assertInstanceOf(QueueClient.class, primaryQueueServiceClient.getQueueClient(getRandomName(60))); - } - - @Test - public void createQueue() { - Response response = - primaryQueueServiceClient.createQueueWithResponse(getRandomName(60), null, null, null); - assertEquals(201, response.getStatusCode()); - assertEquals(201, response.getValue().sendMessageWithResponse("Testing service client creating a queue", null, - null, null, null).getStatusCode()); - } - - @ParameterizedTest - @MethodSource("createQueueWithInvalidNameSupplier") - public void createQueueWithInvalidName(String queueName, int statusCode, QueueErrorCode errMessage) { - QueueStorageException exception = assertThrows(QueueStorageException.class, - () -> primaryQueueServiceClient.createQueue(queueName)); - QueueTestHelper.assertExceptionStatusCodeAndMessage(exception, statusCode, errMessage); - } - - public static Stream createQueueWithInvalidNameSupplier() { - String veryLong = "verylong"; - for (int i = 0; i < 3; i++) { - veryLong += veryLong; - } - return Stream.of( - Arguments.of("a_b", 400, QueueErrorCode.INVALID_RESOURCE_NAME), - Arguments.of("-ab", 400, QueueErrorCode.INVALID_RESOURCE_NAME), - Arguments.of("a--b", 400, QueueErrorCode.INVALID_RESOURCE_NAME), - Arguments.of("Abc", 400, QueueErrorCode.INVALID_RESOURCE_NAME), - Arguments.of("ab", 400, QueueErrorCode.OUT_OF_RANGE_INPUT), - Arguments.of(veryLong, 400, QueueErrorCode.OUT_OF_RANGE_INPUT) - ); - } - - @Test - public void createNull() { - assertThrows(NullPointerException.class, () -> primaryQueueServiceClient.createQueue(null)); - } - - @ParameterizedTest - @MethodSource("createQueueMaxOverloadSupplier") - public void createQueueMaxOverload(Map metadata) { - Response response = primaryQueueServiceClient.createQueueWithResponse(getRandomName(60), metadata, - null, null); - assertEquals(201, response.getStatusCode()); - assertEquals(201, response.getValue().sendMessageWithResponse("Testing service client creating a queue", null, - null, null, null).getStatusCode()); - } - - public static Stream> createQueueMaxOverloadSupplier() { - return Stream.of(null, Collections.singletonMap("metadata", "value"), - Collections.singletonMap("metadata", "va@lue")); - } - - @Test - public void createQueueWithInvalidMetadata() { - QueueStorageException exception = assertThrows(QueueStorageException.class, () -> primaryQueueServiceClient - .createQueueWithResponse(getRandomName(16), Collections.singletonMap("metadata!", "value"), null, null)); - QueueTestHelper.assertExceptionStatusCodeAndMessage(exception, 400, QueueErrorCode.INVALID_METADATA); - } - - @Test - public void deleteQueue() { - String queueName = getRandomName(60); - QueueClient queueClient = primaryQueueServiceClient.createQueue(queueName); - - assertEquals(204, primaryQueueServiceClient.deleteQueueWithResponse(queueName, null, null).getStatusCode()); - - QueueStorageException exception = assertThrows(QueueStorageException.class, - () -> queueClient.sendMessage("Expecting exception as queue has been deleted.")); - QueueTestHelper.assertExceptionStatusCodeAndMessage(exception, 404, QueueErrorCode.QUEUE_NOT_FOUND); - } - - @Test - public void deleteQueueError() { - QueueStorageException exception = assertThrows(QueueStorageException.class, - () -> primaryQueueServiceClient.deleteQueueWithResponse(getRandomName(60), null, null)); - QueueTestHelper.assertExceptionStatusCodeAndMessage(exception, 404, QueueErrorCode.QUEUE_NOT_FOUND); - } - - @ParameterizedTest - @MethodSource("listQueuesSupplier") - public void listQueues(QueuesSegmentOptions options) { - String prefix = this.prefix + "q"; - String queueName = getRandomName(prefix, 50); - LinkedList testQueues = new LinkedList<>(); - for (int i = 0; i < 3; i++) { - String version = Integer.toString(i); - QueueItem queue = new QueueItem().setName(queueName + version) - .setMetadata(Collections.singletonMap("metadata" + version, "value" + version)); - testQueues.add(queue); - primaryQueueServiceClient.createQueueWithResponse(queue.getName(), queue.getMetadata(), null, null); - } - - PagedIterable queueListIter = primaryQueueServiceClient.listQueues(options.setPrefix(prefix), null, - null); - - queueListIter.forEach(it -> { - QueueTestHelper.assertQueuesAreEqual(testQueues.pop(), it); - primaryQueueServiceClient.deleteQueue(it.getName()); - }); - - assertEquals(0, testQueues.size()); - } - - public static Stream listQueuesSupplier() { - return Stream.of(new QueuesSegmentOptions(), new QueuesSegmentOptions().setMaxResultsPerPage(2), - new QueuesSegmentOptions().setIncludeMetadata(true)); - } - - @Test - public void listQueuesMaxResultsByPage() { - QueuesSegmentOptions options = new QueuesSegmentOptions().setPrefix(prefix); - String queueName = getRandomName(60); - for (int i = 0; i < 3; i++) { - primaryQueueServiceClient.createQueueWithResponse(queueName + i, null, null, null); - } - - Iterable> queueListIter = primaryQueueServiceClient.listQueues(options, null, null) - .iterableByPage(2); - - for (PagedResponse page : queueListIter) { - assertTrue(page.getValue().size() <= 2, "Expected page size to be less than or equal to 2."); - } - } - - @Test - public void listEmptyQueues() { - // Queue was never made with the prefix, should expect no queues to be listed. - assertFalse(primaryQueueServiceClient.listQueues(new QueuesSegmentOptions().setPrefix(prefix), null, null) - .iterator().hasNext()); - } - - @ResourceLock("ServiceProperties") - @Test - public void getAndSetProperties() { - QueueServiceProperties originalProperties = primaryQueueServiceClient.getProperties(); - QueueRetentionPolicy retentionPolicy = new QueueRetentionPolicy().setEnabled(true).setDays(3); - QueueAnalyticsLogging logging = new QueueAnalyticsLogging().setVersion("1.0") - .setDelete(true) - .setWrite(true) - .setRetentionPolicy(retentionPolicy); - QueueMetrics metrics = new QueueMetrics().setEnabled(true) - .setIncludeApis(false) - .setRetentionPolicy(retentionPolicy) - .setVersion("1.0"); - QueueServiceProperties updatedProperties = new QueueServiceProperties().setAnalyticsLogging(logging) - .setHourMetrics(metrics) - .setMinuteMetrics(metrics) - .setCors(new ArrayList<>()); - - assertQueueServicePropertiesAreEqual(originalProperties, primaryQueueServiceClient.getProperties()); - assertEquals(202, primaryQueueServiceClient.setPropertiesWithResponse(updatedProperties, null, null) - .getStatusCode()); - assertQueueServicePropertiesAreEqual(updatedProperties, primaryQueueServiceClient.getProperties()); - primaryQueueServiceClient.setProperties(originalProperties); - } - - - @Test - public void builderBearerTokenValidation() throws MalformedURLException { - URL url = new URL(primaryQueueServiceClient.getQueueServiceUrl()); - String endpoint = new URL("http", url.getHost(), url.getPort(), url.getFile()).toString(); - QueueServiceClientBuilder builder = new QueueServiceClientBuilder() - .credential(new DefaultAzureCredentialBuilder().build()) - .endpoint(endpoint); - - assertThrows(IllegalArgumentException.class, builder::buildClient); - } - - // This tests the policy is in the right place because if it were added per retry, it would be after the credentials and auth would fail because we changed a signed header. - @Test - public void perCallPolicy() { - QueueServiceClient serviceClient = queueServiceBuilderHelper() - .addPolicy(getPerCallVersionPolicy()).buildClient(); - - assertEquals("2017-11-09", serviceClient.getPropertiesWithResponse(null, null).getHeaders() - .getValue("x-ms-version")); - } -} diff --git a/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueServiceAsyncAPITests.groovy b/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueServiceAsyncAPITests.groovy new file mode 100644 index 0000000000000..7c5ad112bd871 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueServiceAsyncAPITests.groovy @@ -0,0 +1,200 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.queue + +import com.azure.storage.queue.models.QueueAnalyticsLogging +import com.azure.storage.queue.models.QueueErrorCode +import com.azure.storage.queue.models.QueueItem +import com.azure.storage.queue.models.QueueMetrics +import com.azure.storage.queue.models.QueueRetentionPolicy +import com.azure.storage.queue.models.QueueServiceProperties +import com.azure.storage.queue.models.QueuesSegmentOptions +import reactor.test.StepVerifier +import spock.lang.ResourceLock +import spock.lang.Unroll + +class QueueServiceAsyncAPITests extends APISpec { + + def setup() { + primaryQueueServiceAsyncClient = queueServiceBuilderHelper().buildAsyncClient() + } + + def "Get queue client"() { + given: + def queueAsyncClient = primaryQueueServiceAsyncClient.getQueueAsyncClient(namer.getRandomName(60)) + expect: + queueAsyncClient instanceof QueueAsyncClient + } + + def "Create queue"() { + given: + def queueName = namer.getRandomName(60) + expect: + StepVerifier.create(primaryQueueServiceAsyncClient.createQueueWithResponse(queueName, null)).assertNext { + assert QueueTestHelper.assertResponseStatusCode(it, 201) + }.verifyComplete() + StepVerifier.create(primaryQueueServiceAsyncClient.getQueueAsyncClient(queueName).sendMessageWithResponse("Testing service client creating a queue", null, null)) + .assertNext { + assert QueueTestHelper.assertResponseStatusCode(it, 201) + }.verifyComplete() + } + + @Unroll + def "Create queue with invalid name"() { + when: + def createQueueVerifier = StepVerifier.create(primaryQueueServiceAsyncClient.createQueue(queueName)) + then: + createQueueVerifier.verifyErrorSatisfies { + assert QueueTestHelper.assertExceptionStatusCodeAndMessage(it, statusCode, errMesage) + } + where: + queueName | statusCode | errMesage + "a_b" | 400 | QueueErrorCode.INVALID_RESOURCE_NAME + "-ab" | 400 | QueueErrorCode.INVALID_RESOURCE_NAME + "a--b" | 400 | QueueErrorCode.INVALID_RESOURCE_NAME + "Abc" | 400 | QueueErrorCode.INVALID_RESOURCE_NAME + "ab" | 400 | QueueErrorCode.OUT_OF_RANGE_INPUT + "verylong" * 8 | 400 | QueueErrorCode.OUT_OF_RANGE_INPUT + } + + def "Create null"() { + when: + primaryQueueServiceAsyncClient.createQueue(null).block() + then: + thrown(NullPointerException) + } + + @Unroll + def "Create queue maxOverload"() { + given: + def queueName = namer.getRandomName(60) + when: + def createQueueVerifier = StepVerifier.create(primaryQueueServiceAsyncClient.createQueueWithResponse(queueName, metadata)) + def enqueueMessageVerifier = StepVerifier.create(primaryQueueServiceAsyncClient.getQueueAsyncClient(queueName) + .sendMessageWithResponse("Testing service client creating a queue", null, null)) + then: + createQueueVerifier.assertNext { + assert QueueTestHelper.assertResponseStatusCode(it, 201) + }.verifyComplete() + enqueueMessageVerifier.assertNext { + assert QueueTestHelper.assertResponseStatusCode(it, 201) + }.verifyComplete() + + + where: + metadata | _ + null | _ + Collections.singletonMap("metadata", "value") | _ + Collections.singletonMap("metadata", "va@lue") | _ + } + + def "Create queue with invalid metadata"() { + given: + def queueName = namer.getRandomName(60) + when: + def createQueueVerifier = StepVerifier.create(primaryQueueServiceAsyncClient.createQueueWithResponse(queueName, Collections.singletonMap("metadata!", "value"))) + then: + createQueueVerifier.verifyErrorSatisfies { + assert QueueTestHelper.assertExceptionStatusCodeAndMessage(it, 400, QueueErrorCode.INVALID_METADATA) + } + } + + def "Delete queue"() { + given: + def queueName = namer.getRandomName(60) + primaryQueueServiceAsyncClient.createQueue(queueName).block() + when: + def deleteQueueVerifier = StepVerifier.create(primaryQueueServiceAsyncClient.deleteQueueWithResponse(queueName)) + def enqueueMessageVerifier = StepVerifier.create(primaryQueueServiceAsyncClient.getQueueAsyncClient(queueName) + .sendMessageWithResponse("Expecting exception as queue has been deleted.", null, null)) + then: + deleteQueueVerifier.assertNext { + assert QueueTestHelper.assertResponseStatusCode(it, 204) + }.verifyComplete() + enqueueMessageVerifier.verifyErrorSatisfies { + assert QueueTestHelper.assertExceptionStatusCodeAndMessage(it, 404, QueueErrorCode.QUEUE_NOT_FOUND) + } + } + + def "Delete queue error"() { + when: + def deleteQueueVerifier = StepVerifier.create(primaryQueueServiceAsyncClient.deleteQueueWithResponse(namer.getRandomName(16))) + then: + deleteQueueVerifier.verifyErrorSatisfies { + assert QueueTestHelper.assertExceptionStatusCodeAndMessage(it, 404, QueueErrorCode.QUEUE_NOT_FOUND) + } + } + + @Unroll + def "List queues"() { + given: + def queueName = namer.getRandomName(60) + LinkedList testQueues = new LinkedList<>() + for (int i = 0; i < 3; i++) { + String version = Integer.toString(i) + QueueItem queue = new QueueItem().setName(queueName + version) + .setMetadata(Collections.singletonMap("metadata" + version, "value" + version)) + testQueues.add(queue) + primaryQueueServiceAsyncClient.createQueueWithResponse(queue.getName(), queue.getMetadata()).block() + } + when: + def queueListVerifier = StepVerifier.create(primaryQueueServiceAsyncClient.listQueues(options.setPrefix(namer.getResourcePrefix()))) + then: + queueListVerifier.assertNext { + assert QueueTestHelper.assertQueuesAreEqual(it, testQueues.pop()) + }.assertNext { + assert QueueTestHelper.assertQueuesAreEqual(it, testQueues.pop()) + }.assertNext { + assert QueueTestHelper.assertQueuesAreEqual(it, testQueues.pop()) + }.verifyComplete() + where: + options | _ + new QueuesSegmentOptions() | _ + new QueuesSegmentOptions().setMaxResultsPerPage(2) | _ + new QueuesSegmentOptions().setIncludeMetadata(true) | _ + } + + def "List empty queues"() { + expect: + // Queue was never made with the prefix, should expect no queues to be listed. + StepVerifier.create(primaryQueueServiceAsyncClient.listQueues(new QueuesSegmentOptions().setPrefix(namer.getResourcePrefix()))) + .expectNextCount(0) + .verifyComplete() + } + + @ResourceLock("ServiceProperties") + def "Get and set properties"() { + given: + def originalProperties = primaryQueueServiceAsyncClient.getProperties().block() + def retentionPolicy = new QueueRetentionPolicy().setEnabled(true) + .setDays(3) + def logging = new QueueAnalyticsLogging().setVersion("1.0") + .setDelete(true) + .setWrite(true) + .setRetentionPolicy(retentionPolicy) + def metrics = new QueueMetrics().setEnabled(true) + .setIncludeApis(false) + .setRetentionPolicy(retentionPolicy) + .setVersion("1.0") + def updatedProperties = new QueueServiceProperties().setAnalyticsLogging(logging) + .setHourMetrics(metrics) + .setMinuteMetrics(metrics) + .setCors(new ArrayList<>()) + when: + def getPropertiesBeforeVerifier = StepVerifier.create(primaryQueueServiceAsyncClient.getProperties()) + def setPropertiesVerifier = StepVerifier.create(primaryQueueServiceAsyncClient.setPropertiesWithResponse(updatedProperties)) + def getPropertiesAfterVerifier = StepVerifier.create(primaryQueueServiceAsyncClient.getProperties()) + then: + getPropertiesBeforeVerifier.assertNext { + assert QueueTestHelper.assertQueueServicePropertiesAreEqual(originalProperties, it) + }.verifyComplete() + setPropertiesVerifier.assertNext { + assert QueueTestHelper.assertResponseStatusCode(it, 202) + }.verifyComplete() + + getPropertiesAfterVerifier.assertNext { + assert QueueTestHelper.assertQueueServicePropertiesAreEqual(updatedProperties, it) + }.verifyComplete() + } +} diff --git a/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueServiceAsyncApiTests.java b/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueServiceAsyncApiTests.java deleted file mode 100644 index f64d58847fd17..0000000000000 --- a/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueServiceAsyncApiTests.java +++ /dev/null @@ -1,157 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.storage.queue; - -import com.azure.storage.queue.models.QueueAnalyticsLogging; -import com.azure.storage.queue.models.QueueErrorCode; -import com.azure.storage.queue.models.QueueItem; -import com.azure.storage.queue.models.QueueMetrics; -import com.azure.storage.queue.models.QueueRetentionPolicy; -import com.azure.storage.queue.models.QueueServiceProperties; -import com.azure.storage.queue.models.QueuesSegmentOptions; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.parallel.ResourceLock; -import org.junit.jupiter.params.ParameterizedTest; -import org.junit.jupiter.params.provider.MethodSource; -import reactor.test.StepVerifier; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.LinkedList; -import java.util.Map; - -import static com.azure.storage.queue.QueueTestHelper.assertAsyncResponseStatusCode; -import static com.azure.storage.queue.QueueTestHelper.assertExceptionStatusCodeAndMessage; -import static com.azure.storage.queue.QueueTestHelper.assertQueueServicePropertiesAreEqual; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertInstanceOf; -import static org.junit.jupiter.api.Assertions.assertThrows; - -public class QueueServiceAsyncApiTests extends QueueTestBase { - @BeforeEach - public void setup() { - primaryQueueServiceAsyncClient = queueServiceBuilderHelper().buildAsyncClient(); - } - - @Test - public void getQueueClient() { - assertInstanceOf(QueueAsyncClient.class, primaryQueueServiceAsyncClient.getQueueAsyncClient(getRandomName(60))); - } - - @Test - public void createQueue() { - String queueName = getRandomName(60); - - assertAsyncResponseStatusCode(primaryQueueServiceAsyncClient.createQueueWithResponse(queueName, null), 201); - assertAsyncResponseStatusCode(primaryQueueServiceAsyncClient.getQueueAsyncClient(queueName) - .sendMessageWithResponse("Testing service client creating a queue", null, null), 201); - } - - - @ParameterizedTest - @MethodSource("com.azure.storage.queue.QueueServiceApiTests#createQueueWithInvalidNameSupplier") - public void createQueueWithInvalidName(String queueName, int statusCode, QueueErrorCode errMessage) { - StepVerifier.create(primaryQueueServiceAsyncClient.createQueue(queueName)) - .verifyErrorSatisfies(ex -> assertExceptionStatusCodeAndMessage(ex, statusCode, errMessage)); - } - - @Test - public void createNull() { - assertThrows(NullPointerException.class, () -> primaryQueueServiceAsyncClient.createQueue(null).block()); - } - - @ParameterizedTest - @MethodSource("com.azure.storage.queue.QueueServiceApiTests#createQueueMaxOverloadSupplier") - public void createQueueMaxOverload(Map metadata) { - String queueName = getRandomName(60); - - assertAsyncResponseStatusCode(primaryQueueServiceAsyncClient.createQueueWithResponse(queueName, metadata), 201); - assertAsyncResponseStatusCode(primaryQueueServiceAsyncClient.getQueueAsyncClient(queueName) - .sendMessageWithResponse("Testing service client creating a queue", null, null), 201); - } - - @Test - public void createQueueWithInvalidMetadata() { - StepVerifier.create(primaryQueueServiceAsyncClient.createQueueWithResponse(getRandomName(60), - Collections.singletonMap("metadata!", "value"))) - .verifyErrorSatisfies(ex -> assertExceptionStatusCodeAndMessage(ex, 400, QueueErrorCode.INVALID_METADATA)); - } - - @Test - public void deleteQueue() { - String queueName = getRandomName(60); - primaryQueueServiceAsyncClient.createQueue(queueName).block(); - - assertAsyncResponseStatusCode(primaryQueueServiceAsyncClient.deleteQueueWithResponse(queueName), 204); - StepVerifier.create(primaryQueueServiceAsyncClient.getQueueAsyncClient(queueName) - .sendMessageWithResponse("Expecting exception as queue has been deleted.", null, null)) - .verifyErrorSatisfies(ex -> assertExceptionStatusCodeAndMessage(ex, 404, QueueErrorCode.QUEUE_NOT_FOUND)); - } - - @Test - public void deleteQueueError() { - StepVerifier.create(primaryQueueServiceAsyncClient.deleteQueueWithResponse(getRandomName(16))) - .verifyErrorSatisfies(ex -> assertExceptionStatusCodeAndMessage(ex, 404, QueueErrorCode.QUEUE_NOT_FOUND)); - } - - @ParameterizedTest - @MethodSource("com.azure.storage.queue.QueueServiceApiTests#listQueuesSupplier") - public void listQueues(QueuesSegmentOptions options) { - String queueName = getRandomName(60); - LinkedList testQueues = new LinkedList<>(); - for (int i = 0; i < 3; i++) { - QueueItem queue = new QueueItem().setName(queueName + i) - .setMetadata(Collections.singletonMap("metadata" + i, "value" + i)); - testQueues.add(queue); - primaryQueueServiceAsyncClient.createQueueWithResponse(queue.getName(), queue.getMetadata()).block(); - } - - StepVerifier.create(primaryQueueServiceAsyncClient.listQueues(options.setPrefix(prefix))) - .thenConsumeWhile(queueItem -> { - QueueTestHelper.assertQueuesAreEqual(testQueues.pop(), queueItem); - return true; - }).verifyComplete(); - assertEquals(0, testQueues.size()); - } - - @Test - public void listEmptyQueues() { - // Queue was never made with the prefix, should expect no queues to be listed. - StepVerifier.create(primaryQueueServiceAsyncClient.listQueues(new QueuesSegmentOptions().setPrefix(prefix))) - .expectNextCount(0) - .verifyComplete(); - } - - @ResourceLock("ServiceProperties") - @Test - public void getAndSetProperties() { - QueueServiceProperties originalProperties = primaryQueueServiceAsyncClient.getProperties().block(); - QueueRetentionPolicy retentionPolicy = new QueueRetentionPolicy().setEnabled(true).setDays(3); - QueueAnalyticsLogging logging = new QueueAnalyticsLogging().setVersion("1.0") - .setDelete(true) - .setWrite(true) - .setRetentionPolicy(retentionPolicy); - QueueMetrics metrics = new QueueMetrics().setEnabled(true) - .setIncludeApis(false) - .setRetentionPolicy(retentionPolicy) - .setVersion("1.0"); - QueueServiceProperties updatedProperties = new QueueServiceProperties().setAnalyticsLogging(logging) - .setHourMetrics(metrics) - .setMinuteMetrics(metrics) - .setCors(new ArrayList<>()); - - StepVerifier.create(primaryQueueServiceAsyncClient.getProperties()) - .assertNext(properties -> assertQueueServicePropertiesAreEqual(originalProperties, properties)) - .verifyComplete(); - - assertAsyncResponseStatusCode(primaryQueueServiceAsyncClient.setPropertiesWithResponse(updatedProperties), 202); - - StepVerifier.create(primaryQueueServiceAsyncClient.getProperties()) - .assertNext(properties -> assertQueueServicePropertiesAreEqual(updatedProperties, properties)) - .verifyComplete(); - - primaryQueueServiceAsyncClient.setProperties(originalProperties).block(); - } -} diff --git a/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueServiceVersionTest.groovy b/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueServiceVersionTest.groovy new file mode 100644 index 0000000000000..334e87c734eac --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueServiceVersionTest.groovy @@ -0,0 +1,13 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.queue + +import com.azure.storage.common.test.shared.ServiceVersionSpec + +class QueueServiceVersionTest extends ServiceVersionSpec { + @Override + protected Class getServiceVersionClass() { + return QueueServiceVersion.class + } +} diff --git a/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueServiceVersionTests.java b/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueServiceVersionTests.java deleted file mode 100644 index 6df82d276440a..0000000000000 --- a/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueServiceVersionTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.storage.queue; - -import com.azure.storage.common.implementation.Constants; -import com.azure.storage.common.test.shared.DevopsPipeline; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.condition.DisabledIf; - -import static org.junit.jupiter.api.Assertions.assertEquals; - -public class QueueServiceVersionTests { - @DisabledIf("doNotRun") - @Test - public void getLatestPointsToLatest() { - QueueServiceVersion[] values = QueueServiceVersion.values(); - assertEquals(values[values.length - 1], QueueServiceVersion.getLatest()); - } - - @DisabledIf("doNotRun") - @Test - public void sasVersionShouldMatchLastWhenWeRelease() { - assertEquals(Constants.SAS_SERVICE_VERSION, QueueServiceVersion.getLatest().getVersion()); - } - - @DisabledIf("doNotRun") - @Test - public void headerVersionShouldMatchLastWhenWeRelease() { - assertEquals(Constants.HeaderConstants.TARGET_STORAGE_VERSION, QueueServiceVersion.getLatest().getVersion()); - } - - static boolean doNotRun() { - return DevopsPipeline.getInstance().map(it -> !it.releasesToMavenCentral()).orElse(true); - } -} diff --git a/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueTestBase.java b/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueTestBase.java deleted file mode 100644 index efaffdcd8fb8d..0000000000000 --- a/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueTestBase.java +++ /dev/null @@ -1,207 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.storage.queue; - -import com.azure.core.client.traits.HttpTrait; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpPipelineCallContext; -import com.azure.core.http.HttpPipelineNextPolicy; -import com.azure.core.http.HttpPipelinePosition; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.netty.NettyAsyncHttpClientBuilder; -import com.azure.core.http.okhttp.OkHttpAsyncHttpClientBuilder; -import com.azure.core.http.policy.HttpPipelinePolicy; -import com.azure.core.test.TestMode; -import com.azure.core.test.TestProxyTestBase; -import com.azure.core.test.models.CustomMatcher; -import com.azure.core.test.models.TestProxySanitizer; -import com.azure.core.test.models.TestProxySanitizerType; -import com.azure.core.util.Context; -import com.azure.core.util.ServiceVersion; -import com.azure.storage.common.StorageSharedKeyCredential; -import com.azure.storage.common.test.shared.ServiceVersionValidationPolicy; -import com.azure.storage.common.test.shared.TestEnvironment; -import com.azure.storage.queue.models.QueuesSegmentOptions; -import okhttp3.ConnectionPool; -import reactor.core.publisher.Mono; - -import java.lang.reflect.Method; -import java.nio.charset.StandardCharsets; -import java.time.Duration; -import java.util.Arrays; -import java.util.Collections; -import java.util.Locale; -import java.util.concurrent.TimeUnit; -import java.util.zip.CRC32; - -/** - * Base class for Azure Storage Queue tests. - */ -public class QueueTestBase extends TestProxyTestBase { - protected static final TestEnvironment ENVIRONMENT = TestEnvironment.getInstance(); - private static final HttpClient NETTY_HTTP_CLIENT = new NettyAsyncHttpClientBuilder().build(); - private static final HttpClient OK_HTTP_CLIENT = new OkHttpAsyncHttpClientBuilder() - .connectionPool(new ConnectionPool(50, 5, TimeUnit.MINUTES)) - .build(); - - protected String prefix; - - // Clients for API tests - protected QueueServiceClient primaryQueueServiceClient; - protected QueueServiceAsyncClient primaryQueueServiceAsyncClient; - - @Override - public void beforeTest() { - super.beforeTest(); - prefix = getCrc32(testContextManager.getTestPlaybackRecordingName()); - - if (getTestMode() != TestMode.LIVE) { - interceptorManager.addSanitizers( - Collections.singletonList(new TestProxySanitizer("sig=(.*)", "REDACTED", TestProxySanitizerType.URL))); - } - - // Ignore changes to the order of query parameters and wholly ignore the 'sv' (service version) query parameter - // in SAS tokens. - // TODO (alzimmer): Once all Storage libraries are migrated to test proxy move this into the common parent. - interceptorManager.addMatchers(Arrays.asList(new CustomMatcher() - .setQueryOrderingIgnored(true) - .setIgnoredQueryParameters(Arrays.asList("sv")))); - } - - private static String getCrc32(String input) { - CRC32 crc32 = new CRC32(); - crc32.update(input.getBytes(StandardCharsets.UTF_8)); - return String.format(Locale.US, "%08X", crc32.getValue()).toLowerCase(); - } - - - /** - * Clean up the test queues and messages for the account. - */ - @Override - protected void afterTest() { - super.afterTest(); - if (getTestMode() == TestMode.PLAYBACK) { - return; - } - - QueueServiceClient cleanupQueueServiceClient = new QueueServiceClientBuilder() - .connectionString(getPrimaryConnectionString()) - .buildClient(); - - cleanupQueueServiceClient.listQueues(new QueuesSegmentOptions().setPrefix(prefix), null, Context.NONE) - .forEach(queueItem -> cleanupQueueServiceClient.deleteQueue(queueItem.getName())); - } - - protected String getRandomName(int length) { - return getRandomName(prefix, length); - } - - protected String getRandomName(String prefix, int length) { - return testResourceNamer.randomName(prefix, length); - } - - protected QueueServiceClientBuilder queueServiceBuilderHelper() { - return instrument(new QueueServiceClientBuilder()).connectionString(getPrimaryConnectionString()); - } - - protected QueueClientBuilder queueBuilderHelper() { - return instrument(new QueueClientBuilder()) - .connectionString(getPrimaryConnectionString()) - .queueName(getRandomName(60)); - } - - protected QueueServiceClientBuilder getServiceClientBuilder(StorageSharedKeyCredential credential, String endpoint, - HttpPipelinePolicy... policies) { - QueueServiceClientBuilder builder = new QueueServiceClientBuilder() - .endpoint(endpoint); - - for (HttpPipelinePolicy policy : policies) { - builder.addPolicy(policy); - } - - instrument(builder); - - if (credential != null) { - builder.credential(credential); - } - - return builder; - } - - protected QueueClientBuilder getQueueClientBuilder(String endpoint) { - return instrument(new QueueClientBuilder()).endpoint(endpoint); - } - - protected Duration getMessageUpdateDelay(long liveMillis) { - return (getTestMode() == TestMode.PLAYBACK) ? Duration.ofMillis(10) : Duration.ofMillis(liveMillis); - } - - protected HttpPipelinePolicy getPerCallVersionPolicy() { - return new HttpPipelinePolicy() { - @Override - public Mono process(HttpPipelineCallContext context, HttpPipelineNextPolicy next) { - context.getHttpRequest().setHeader("x-ms-version", "2017-11-09"); - return next.process(); - } - - @Override - public HttpPipelinePosition getPipelinePosition() { - return HttpPipelinePosition.PER_CALL; - } - }; - } - - @SuppressWarnings("unchecked") - protected , E extends Enum> T instrument(T builder) { - // Groovy style reflection. All our builders follow this pattern. - builder.httpClient(getHttpClient()); - - if (interceptorManager.isRecordMode()) { - builder.addPolicy(interceptorManager.getRecordPolicy()); - } - - if (ENVIRONMENT.getServiceVersion() != null) { - try { - Method serviceVersionMethod = Arrays.stream(builder.getClass().getDeclaredMethods()) - .filter(method -> "serviceVersion".equals(method.getName()) - && method.getParameterCount() == 1 - && ServiceVersion.class.isAssignableFrom(method.getParameterTypes()[0])) - .findFirst() - .orElseThrow(() -> new RuntimeException("Unable to find serviceVersion method for builder: " - + builder.getClass())); - Class serviceVersionClass = (Class) serviceVersionMethod.getParameterTypes()[0]; - ServiceVersion serviceVersion = (ServiceVersion) Enum.valueOf(serviceVersionClass, - ENVIRONMENT.getServiceVersion()); - serviceVersionMethod.invoke(builder, serviceVersion); - builder.addPolicy(new ServiceVersionValidationPolicy(serviceVersion.getVersion())); - } catch (ReflectiveOperationException ex) { - throw new RuntimeException(ex); - } - } - - builder.httpLogOptions(QueueServiceClientBuilder.getDefaultHttpLogOptions()); - - return builder; - } - - protected HttpClient getHttpClient() { - if (ENVIRONMENT.getTestMode() != TestMode.PLAYBACK) { - switch (ENVIRONMENT.getHttpClientType()) { - case NETTY: - return NETTY_HTTP_CLIENT; - case OK_HTTP: - return OK_HTTP_CLIENT; - default: - throw new IllegalArgumentException("Unknown http client type: " + ENVIRONMENT.getHttpClientType()); - } - } else { - return interceptorManager.getPlaybackClient(); - } - } - - protected String getPrimaryConnectionString() { - return ENVIRONMENT.getPrimaryAccount().getConnectionString(); - } -} diff --git a/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueTestHelper.groovy b/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueTestHelper.groovy new file mode 100644 index 0000000000000..6b99441c47868 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueTestHelper.groovy @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.queue + +import com.azure.core.http.rest.Response +import com.azure.core.util.CoreUtils +import com.azure.core.util.Configuration +import com.azure.storage.queue.models.QueueAnalyticsLogging +import com.azure.storage.queue.models.QueueCorsRule +import com.azure.storage.queue.models.QueueErrorCode +import com.azure.storage.queue.models.QueueItem +import com.azure.storage.queue.models.QueueMetrics +import com.azure.storage.queue.models.QueueRetentionPolicy +import com.azure.storage.queue.models.QueueServiceProperties +import com.azure.storage.queue.models.QueueSignedIdentifier +import com.azure.storage.queue.models.QueueStorageException + +import java.time.Duration + +class QueueTestHelper { + static boolean assertResponseStatusCode(Response response, int expectedStatusCode) { + return expectedStatusCode == response.getStatusCode() + } + + static boolean assertExceptionStatusCodeAndMessage(Throwable throwable, int expectedStatusCode, QueueErrorCode errMessage) { + return throwable instanceof QueueStorageException && + ((QueueStorageException) throwable).getStatusCode() == expectedStatusCode && + ((QueueStorageException) throwable).getErrorCode() == errMessage + } + + static boolean assertQueuesAreEqual(QueueItem expected, QueueItem actual) { + if (expected == null) { + return actual == null + } else { + if (!Objects.equals(expected.getName(), actual.getName())) { + return false + } + if (expected.getMetadata() != null && !CoreUtils.isNullOrEmpty(actual.getMetadata())) { + return expected.getMetadata() == actual.getMetadata() + } + return true + } + } + + static boolean assertQueueServicePropertiesAreEqual(QueueServiceProperties expected, QueueServiceProperties actual) { + if (expected == null) { + return actual == null + } else { + return assertMetricsAreEqual(expected.getHourMetrics(), actual.getHourMetrics()) && + assertMetricsAreEqual(expected.getMinuteMetrics(), actual.getMinuteMetrics()) && + assertLoggingAreEqual(expected.getAnalyticsLogging(), actual.getAnalyticsLogging()) && + assertCorsAreEqual(expected.getCors(), actual.getCors()) + } + } + + static boolean assertMetricsAreEqual(QueueMetrics expected, QueueMetrics actual) { + if (expected == null) { + return actual == null + } else { + return Objects.equals(expected.isEnabled(), actual.isEnabled()) && + Objects.equals(expected.isIncludeApis(), actual.isIncludeApis()) && + Objects.equals(expected.getVersion(), actual.getVersion()) && + assertRetentionPoliciesAreEqual(expected.getRetentionPolicy(), actual.getRetentionPolicy()) + } + } + + static boolean assertLoggingAreEqual(QueueAnalyticsLogging expected, QueueAnalyticsLogging actual) { + if (expected == null) { + return actual == null + } else { + return Objects.equals(expected.isRead(), actual.isRead()) && + Objects.equals(expected.isWrite(), actual.isWrite()) && + Objects.equals(expected.isDelete(), actual.isDelete()) && + Objects.equals(expected.getVersion(), actual.getVersion()) && + assertRetentionPoliciesAreEqual(expected.getRetentionPolicy(), actual.getRetentionPolicy()) + } + } + + static boolean assertRetentionPoliciesAreEqual(QueueRetentionPolicy expected, QueueRetentionPolicy actual) { + if (expected == null) { + return actual == null + } else { + return Objects.equals(expected.getDays(), actual.getDays()) && + Objects.equals(expected.isEnabled(), actual.isEnabled()) + } + } + + static boolean assertCorsAreEqual(List expected, List actual) { + if (expected == null) { + return actual == null + } else { + if (expected.size() != actual.size()) { + return false + } + for (int i = 0; i < expected.size(); i++) { + if (!assertCorRulesAreEqual(expected.get(i), actual.get(i))) { + return false + } + } + return true + } + } + + static boolean assertCorRulesAreEqual(QueueCorsRule expected, QueueCorsRule actual) { + if (expected == null) { + return actual == null + } else { + return Objects.equals(expected.getAllowedHeaders(), actual.getAllowedHeaders()) && + Objects.equals(expected.getAllowedMethods(), actual.getAllowedMethods()) && + Objects.equals(expected.getAllowedOrigins(), actual.getAllowedOrigins()) && + Objects.equals(expected.getMaxAgeInSeconds(), actual.getMaxAgeInSeconds()) + } + } + + static boolean assertPermissionsAreEqual(QueueSignedIdentifier expected, QueueSignedIdentifier actual) { + if (expected == null) { + return actual == null + } + if (expected.getAccessPolicy() == null) { + return actual.getAccessPolicy() == null + } + return Objects.equals(expected.getId(), actual.getId()) && + Objects.equals(expected.getAccessPolicy().getPermissions(), actual.getAccessPolicy().getPermissions()) && + Objects.equals(expected.getAccessPolicy().getStartsOn(), actual.getAccessPolicy().getStartsOn()) && + Objects.equals(expected.getAccessPolicy().getExpiresOn(), actual.getAccessPolicy().getExpiresOn()) + } + + static void sleepInRecord(Duration time) { + String azureTestMode = Configuration.getGlobalConfiguration().get("AZURE_TEST_MODE") + if (!"PLAYBACK".equalsIgnoreCase(azureTestMode)) { + sleep(time) + } + } + + private static void sleep(Duration time) { + try { + Thread.sleep(time.toMillis()) + } catch (InterruptedException ignored) { + // Ignore the error + } + } +} diff --git a/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueTestHelper.java b/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueTestHelper.java deleted file mode 100644 index 0fa8413215fd5..0000000000000 --- a/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueTestHelper.java +++ /dev/null @@ -1,148 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.storage.queue; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.CoreUtils; -import com.azure.storage.queue.models.QueueAnalyticsLogging; -import com.azure.storage.queue.models.QueueCorsRule; -import com.azure.storage.queue.models.QueueErrorCode; -import com.azure.storage.queue.models.QueueItem; -import com.azure.storage.queue.models.QueueMetrics; -import com.azure.storage.queue.models.QueueRetentionPolicy; -import com.azure.storage.queue.models.QueueServiceProperties; -import com.azure.storage.queue.models.QueueSignedIdentifier; -import com.azure.storage.queue.models.QueueStorageException; -import org.junit.jupiter.api.function.Executable; -import reactor.core.publisher.Mono; -import reactor.test.StepVerifier; - -import java.util.List; -import java.util.stream.Collectors; - -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertInstanceOf; -import static org.junit.jupiter.api.Assertions.assertNull; -import static org.junit.jupiter.api.Assertions.assertThrows; - -public class QueueTestHelper { - static Response assertResponseStatusCode(Response response, int expectedStatusCode) { - assertEquals(expectedStatusCode, response.getStatusCode()); - return response; - } - - static void assertAsyncResponseStatusCode(Mono> response, int expectedStatusCode) { - StepVerifier.create(response) - .assertNext(r -> assertEquals(expectedStatusCode, r.getStatusCode())) - .verifyComplete(); - } - - static QueueStorageException throwsStorageException(Executable executable) { - return assertThrows(QueueStorageException.class, executable); - } - - static void assertExceptionStatusCodeAndMessage(Throwable throwable, int expectedStatusCode, - QueueErrorCode errMessage) { - QueueStorageException exception = assertInstanceOf(QueueStorageException.class, throwable); - assertEquals(expectedStatusCode, exception.getStatusCode()); - assertEquals(errMessage, exception.getErrorCode()); - } - - static void assertQueuesAreEqual(QueueItem expected, QueueItem actual) { - if (expected == null) { - assertNull(actual); - } else { - assertEquals(expected.getName(), actual.getName()); - if (expected.getMetadata() != null && !CoreUtils.isNullOrEmpty(actual.getMetadata())) { - assertEquals(expected.getMetadata(), actual.getMetadata()); - } - } - } - - static void assertQueueServicePropertiesAreEqual(QueueServiceProperties expected, QueueServiceProperties actual) { - if (expected == null) { - assertNull(actual); - } else { - assertMetricsAreEqual(expected.getHourMetrics(), actual.getHourMetrics()); - assertMetricsAreEqual(expected.getMinuteMetrics(), actual.getMinuteMetrics()); - assertLoggingAreEqual(expected.getAnalyticsLogging(), actual.getAnalyticsLogging()); - assertCorsAreEqual(expected.getCors(), actual.getCors()); - } - } - - static void assertMetricsAreEqual(QueueMetrics expected, QueueMetrics actual) { - if (expected == null) { - assertNull(actual); - } else { - assertEquals(expected.isEnabled(), actual.isEnabled()); - assertEquals(expected.isIncludeApis(), actual.isIncludeApis()); - assertEquals(expected.getVersion(), actual.getVersion()); - assertRetentionPoliciesAreEqual(expected.getRetentionPolicy(), actual.getRetentionPolicy()); - } - } - - static void assertLoggingAreEqual(QueueAnalyticsLogging expected, QueueAnalyticsLogging actual) { - if (expected == null) { - assertNull(actual); - } else { - assertEquals(expected.isRead(), actual.isRead()); - assertEquals(expected.isWrite(), actual.isWrite()); - assertEquals(expected.isDelete(), actual.isDelete()); - assertEquals(expected.getVersion(), actual.getVersion()); - assertRetentionPoliciesAreEqual(expected.getRetentionPolicy(), actual.getRetentionPolicy()); - } - } - - static void assertRetentionPoliciesAreEqual(QueueRetentionPolicy expected, QueueRetentionPolicy actual) { - if (expected == null) { - assertNull(actual); - } else { - assertEquals(expected.getDays(), actual.getDays()); - assertEquals(expected.isEnabled(), actual.isEnabled()); - } - } - - static void assertCorsAreEqual(List expected, List actual) { - if (expected == null) { - assertNull(actual); - } else { - assertEquals(expected.size(), actual.size()); - for (int i = 0; i < expected.size(); i++) { - assertCorRulesAreEqual(expected.get(i), actual.get(i)); - } - } - } - - static void assertCorRulesAreEqual(QueueCorsRule expected, QueueCorsRule actual) { - if (expected == null) { - assertNull(actual); - } else { - assertEquals(expected.getAllowedHeaders(), actual.getAllowedHeaders()); - assertEquals(expected.getAllowedMethods(), actual.getAllowedMethods()); - assertEquals(expected.getAllowedOrigins(), actual.getAllowedOrigins()); - assertEquals(expected.getMaxAgeInSeconds(), actual.getMaxAgeInSeconds()); - } - } - - static void assertPermissionsAreEqual(QueueSignedIdentifier expected, QueueSignedIdentifier actual) { - if (expected == null) { - assertNull(actual); - return; - } - - if (expected.getAccessPolicy() == null) { - assertNull(actual.getAccessPolicy()); - } else { - assertEquals(expected.getId(), actual.getId()); - assertEquals(expected.getAccessPolicy().getPermissions(), actual.getAccessPolicy().getPermissions()); - assertEquals(expected.getAccessPolicy().getStartsOn(), actual.getAccessPolicy().getStartsOn()); - assertEquals(expected.getAccessPolicy().getExpiresOn(), actual.getAccessPolicy().getExpiresOn()); - } - } - - static List pagedResponseToList(PagedIterable response) { - return response.stream().collect(Collectors.toList()); - } -} diff --git a/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueUserAgentPropertiesTest.groovy b/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueUserAgentPropertiesTest.groovy new file mode 100644 index 0000000000000..57c874d792537 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueUserAgentPropertiesTest.groovy @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.queue; + +import com.azure.core.util.CoreUtils +import com.azure.core.util.UserAgentProperties +import spock.lang.Specification + +class QueueUserAgentPropertiesTest extends Specification { + + def "User agent properties not null"() { + given: + Map properties = CoreUtils.getProperties("azure-storage-queue.properties") + expect: + properties.get("name") == "azure-storage-queue" + properties.get("version").matches("(\\d)+.(\\d)+.(\\d)+([-a-zA-Z0-9.])*") + } +} diff --git a/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueUserAgentPropertiesTests.java b/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueUserAgentPropertiesTests.java deleted file mode 100644 index 433bc6b5fafc9..0000000000000 --- a/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueUserAgentPropertiesTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.storage.queue; - -import com.azure.core.util.CoreUtils; -import org.junit.jupiter.api.Test; - -import java.util.Map; - -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertTrue; - -public class QueueUserAgentPropertiesTests { - @Test - public void userAgentPropertiesNotNull() { - Map properties = CoreUtils.getProperties("azure-storage-queue.properties"); - - assertEquals("azure-storage-queue", properties.get("name")); - assertTrue(properties.get("version").matches("(\\d)+.(\\d)+.(\\d)+([-a-zA-Z0-9.])*"), - "Expected 'version' property to match pattern '(\\d)+.(\\d)+.(\\d)+([-a-zA-Z0-9.])*'."); - } -} diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/AzuriteTestsAzuriteURLConstructingQueueClientWithConnectionString[0].json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/AzuriteTestsAzuriteURLConstructingQueueClientWithConnectionString[0].json new file mode 100644 index 0000000000000..ba5f37f8f8555 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/AzuriteTestsAzuriteURLConstructingQueueClientWithConnectionString[0].json @@ -0,0 +1,4 @@ +{ + "networkCallRecords" : [ ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/AzuriteTestsAzuriteURLConstructingQueueClientWithConnectionString[1].json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/AzuriteTestsAzuriteURLConstructingQueueClientWithConnectionString[1].json new file mode 100644 index 0000000000000..ba5f37f8f8555 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/AzuriteTestsAzuriteURLConstructingQueueClientWithConnectionString[1].json @@ -0,0 +1,4 @@ +{ + "networkCallRecords" : [ ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/AzuriteTestsAzuriteURLConstructingQueueClientWithCredential[0].json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/AzuriteTestsAzuriteURLConstructingQueueClientWithCredential[0].json new file mode 100644 index 0000000000000..ba5f37f8f8555 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/AzuriteTestsAzuriteURLConstructingQueueClientWithCredential[0].json @@ -0,0 +1,4 @@ +{ + "networkCallRecords" : [ ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/AzuriteTestsAzuriteURLConstructingQueueClientWithCredential[1].json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/AzuriteTestsAzuriteURLConstructingQueueClientWithCredential[1].json new file mode 100644 index 0000000000000..ba5f37f8f8555 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/AzuriteTestsAzuriteURLConstructingQueueClientWithCredential[1].json @@ -0,0 +1,4 @@ +{ + "networkCallRecords" : [ ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/AzuriteTestsAzuriteURLConstructingQueueClientWithDefaultAzureCredential[0].json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/AzuriteTestsAzuriteURLConstructingQueueClientWithDefaultAzureCredential[0].json new file mode 100644 index 0000000000000..ba5f37f8f8555 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/AzuriteTestsAzuriteURLConstructingQueueClientWithDefaultAzureCredential[0].json @@ -0,0 +1,4 @@ +{ + "networkCallRecords" : [ ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/AzuriteTestsAzuriteURLConstructingQueueClientWithDefaultAzureCredential[1].json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/AzuriteTestsAzuriteURLConstructingQueueClientWithDefaultAzureCredential[1].json new file mode 100644 index 0000000000000..ba5f37f8f8555 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/AzuriteTestsAzuriteURLConstructingQueueClientWithDefaultAzureCredential[1].json @@ -0,0 +1,4 @@ +{ + "networkCallRecords" : [ ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/AzuriteTestsAzuriteURLConstructingServiceClientWithConnectionString[0].json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/AzuriteTestsAzuriteURLConstructingServiceClientWithConnectionString[0].json new file mode 100644 index 0000000000000..ba5f37f8f8555 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/AzuriteTestsAzuriteURLConstructingServiceClientWithConnectionString[0].json @@ -0,0 +1,4 @@ +{ + "networkCallRecords" : [ ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/AzuriteTestsAzuriteURLConstructingServiceClientWithConnectionString[1].json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/AzuriteTestsAzuriteURLConstructingServiceClientWithConnectionString[1].json new file mode 100644 index 0000000000000..ba5f37f8f8555 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/AzuriteTestsAzuriteURLConstructingServiceClientWithConnectionString[1].json @@ -0,0 +1,4 @@ +{ + "networkCallRecords" : [ ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/AzuriteTestsAzuriteURLConstructingServiceClientWithCredential[0].json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/AzuriteTestsAzuriteURLConstructingServiceClientWithCredential[0].json new file mode 100644 index 0000000000000..ba5f37f8f8555 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/AzuriteTestsAzuriteURLConstructingServiceClientWithCredential[0].json @@ -0,0 +1,4 @@ +{ + "networkCallRecords" : [ ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/AzuriteTestsAzuriteURLConstructingServiceClientWithCredential[1].json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/AzuriteTestsAzuriteURLConstructingServiceClientWithCredential[1].json new file mode 100644 index 0000000000000..ba5f37f8f8555 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/AzuriteTestsAzuriteURLConstructingServiceClientWithCredential[1].json @@ -0,0 +1,4 @@ +{ + "networkCallRecords" : [ ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/AzuriteTestsAzuriteURLConstructingServiceClientWithDefaultAzureCredential[0].json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/AzuriteTestsAzuriteURLConstructingServiceClientWithDefaultAzureCredential[0].json new file mode 100644 index 0000000000000..ba5f37f8f8555 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/AzuriteTestsAzuriteURLConstructingServiceClientWithDefaultAzureCredential[0].json @@ -0,0 +1,4 @@ +{ + "networkCallRecords" : [ ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/AzuriteTestsAzuriteURLConstructingServiceClientWithDefaultAzureCredential[1].json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/AzuriteTestsAzuriteURLConstructingServiceClientWithDefaultAzureCredential[1].json new file mode 100644 index 0000000000000..ba5f37f8f8555 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/AzuriteTestsAzuriteURLConstructingServiceClientWithDefaultAzureCredential[1].json @@ -0,0 +1,4 @@ +{ + "networkCallRecords" : [ ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/AzuriteTestsAzuriteURLGetQueueClient[0].json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/AzuriteTestsAzuriteURLGetQueueClient[0].json new file mode 100644 index 0000000000000..ba5f37f8f8555 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/AzuriteTestsAzuriteURLGetQueueClient[0].json @@ -0,0 +1,4 @@ +{ + "networkCallRecords" : [ ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/AzuriteTestsAzuriteURLGetQueueClient[1].json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/AzuriteTestsAzuriteURLGetQueueClient[1].json new file mode 100644 index 0000000000000..ba5f37f8f8555 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/AzuriteTestsAzuriteURLGetQueueClient[1].json @@ -0,0 +1,4 @@ +{ + "networkCallRecords" : [ ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/AzuriteTestsUseDevelopmentStorageTrue[0].json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/AzuriteTestsUseDevelopmentStorageTrue[0].json new file mode 100644 index 0000000000000..ba5f37f8f8555 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/AzuriteTestsUseDevelopmentStorageTrue[0].json @@ -0,0 +1,4 @@ +{ + "networkCallRecords" : [ ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/AzuriteTestsUseDevelopmentStorageTrue[1].json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/AzuriteTestsUseDevelopmentStorageTrue[1].json new file mode 100644 index 0000000000000..ba5f37f8f8555 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/AzuriteTestsUseDevelopmentStorageTrue[1].json @@ -0,0 +1,4 @@ +{ + "networkCallRecords" : [ ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsBuilderBearerTokenValidation.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsBuilderBearerTokenValidation.json new file mode 100644 index 0000000000000..dca2d64fca1e3 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsBuilderBearerTokenValidation.json @@ -0,0 +1,4 @@ +{ + "networkCallRecords" : [ ], + "variables" : [ "9d33bcc49d33bcc456d82553d5c71abb5a4f47149b" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsClearMessages.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsClearMessages.json new file mode 100644 index 0000000000000..4bc25c35ce2cf --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsClearMessages.json @@ -0,0 +1,150 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/fde1765dfde1765da84441250be6eec70df0454a9f", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "f6789561-01d5-4a34-bab4-81a00ff0d349" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "6980d24e-1003-0035-1009-419a35000000", + "x-ms-client-request-id" : "f6789561-01d5-4a34-bab4-81a00ff0d349", + "Date" : "Tue, 04 May 2021 17:18:39 GMT" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/fde1765dfde1765da84441250be6eec70df0454a9f/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "3ac2ca90-d264-4150-91b0-b7400bdeef3a", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "2b951125-0003-0006-6309-41c59e000000", + "Body" : "e57cfd1e-321e-42ae-a26c-0177da192852Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAAnlJIhglB1wE=Tue, 04 May 2021 17:18:39 GMT", + "x-ms-client-request-id" : "3ac2ca90-d264-4150-91b0-b7400bdeef3a", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/fde1765dfde1765da84441250be6eec70df0454a9f/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "335fe012-c8ff-4b33-8851-69ddc36b2b50", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "946d04a3-0003-00dd-6e09-4103a3000000", + "Body" : "47c0a5ec-2f25-4f5e-9079-eaa5a4ba365bTue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAA/MtYhglB1wE=Tue, 04 May 2021 17:18:39 GMT", + "x-ms-client-request-id" : "335fe012-c8ff-4b33-8851-69ddc36b2b50", + "Date" : "Tue, 04 May 2021 17:18:39 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/fde1765dfde1765da84441250be6eec70df0454a9f/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "003680f0-4848-45ff-b085-ff6c3c53a5d0", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "2b95112c-0003-0006-6809-41c59e000000", + "Body" : "23317683-4b44-4a48-8683-a175ec13aeb9Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAAJpxlhglB1wE=Tue, 04 May 2021 17:18:39 GMT", + "x-ms-client-request-id" : "003680f0-4848-45ff-b085-ff6c3c53a5d0", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/fde1765dfde1765da84441250be6eec70df0454a9f?comp=metadata", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "049af230-c67f-4b4c-857f-b569a7cc535c" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "x-ms-approximate-messages-count" : "3", + "StatusCode" : "200", + "x-ms-request-id" : "af9d2536-5003-0046-7109-41c2a6000000", + "x-ms-client-request-id" : "049af230-c67f-4b4c-857f-b569a7cc535c", + "Date" : "Tue, 04 May 2021 17:18:39 GMT" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.queue.core.windows.net/fde1765dfde1765da84441250be6eec70df0454a9f/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "72720784-9655-4f6f-ba64-b9887acab9cd" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "2733c1d1-b003-00d8-6d09-41d178000000", + "x-ms-client-request-id" : "72720784-9655-4f6f-ba64-b9887acab9cd", + "Date" : "Tue, 04 May 2021 17:18:39 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/fde1765dfde1765da84441250be6eec70df0454a9f?comp=metadata", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "e16c2f77-daee-4cde-93a7-f81758baae95" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "x-ms-approximate-messages-count" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "92671e9b-a003-000f-6b09-41804d000000", + "x-ms-client-request-id" : "e16c2f77-daee-4cde-93a7-f81758baae95", + "Date" : "Tue, 04 May 2021 17:18:39 GMT" + }, + "Exception" : null + } ], + "variables" : [ "fde1765dfde1765da84441250be6eec70df0454a9f" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsClearMessagesError.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsClearMessagesError.json new file mode 100644 index 0000000000000..75b734b3960f7 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsClearMessagesError.json @@ -0,0 +1,26 @@ +{ + "networkCallRecords" : [ { + "Method" : "DELETE", + "Uri" : "https://REDACTED.queue.core.windows.net/1bf942281bf942286bc950230f29d326e33e465487/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "d72b5429-7aa5-46f9-be2f-be92db33022b" + }, + "Response" : { + "content-length" : "217", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "QueueNotFound", + "retry-after" : "0", + "StatusCode" : "404", + "x-ms-request-id" : "d9b89a07-f003-0012-5109-418df1000000", + "Body" : "QueueNotFoundThe specified queue does not exist.\nRequestId:d9b89a07-f003-0012-5109-418df1000000\nTime:2021-05-04T17:18:39.3074762Z", + "x-ms-client-request-id" : "d72b5429-7aa5-46f9-be2f-be92db33022b", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "1bf942281bf942286bc950230f29d326e33e465487" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsCreateIfNotExistsMin.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsCreateIfNotExistsMin.json new file mode 100644 index 0000000000000..528afd1bb9f05 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsCreateIfNotExistsMin.json @@ -0,0 +1,44 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/f533d669f533d669af81872894ad9fdaa3d54768aa", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-queue/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", + "x-ms-client-request-id" : "91a28406-5d20-4de2-9de6-4a881afbd053" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "7f421dd5-b003-0012-504d-4e6928000000", + "x-ms-client-request-id" : "91a28406-5d20-4de2-9de6-4a881afbd053", + "Date" : "Tue, 12 Apr 2022 09:10:42 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/f533d669f533d669af81872894ad9fdaa3d54768aa?comp=metadata", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-queue/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", + "x-ms-client-request-id" : "084c022c-b657-476d-b0b1-c48f77dc3d4c" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "x-ms-approximate-messages-count" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "7f421e21-b003-0012-1a4d-4e6928000000", + "x-ms-client-request-id" : "084c022c-b657-476d-b0b1-c48f77dc3d4c", + "Date" : "Tue, 12 Apr 2022 09:10:42 GMT" + }, + "Exception" : null + } ], + "variables" : [ "f533d669f533d669af845633acef2590bf7040dca3", "f533d669f533d669af81872894ad9fdaa3d54768aa" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsCreateIfNotExistsQueueWithSharedKey.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsCreateIfNotExistsQueueWithSharedKey.json new file mode 100644 index 0000000000000..330702fe5e676 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsCreateIfNotExistsQueueWithSharedKey.json @@ -0,0 +1,23 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/c8ecdff6c8ecdff6eae6372451a64e32cf4b465fa5", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-queue/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", + "x-ms-client-request-id" : "e36e3b12-423a-409e-a5be-1e9e8c3e25d1" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "5c17ed8e-9003-003a-144d-4e0880000000", + "x-ms-client-request-id" : "e36e3b12-423a-409e-a5be-1e9e8c3e25d1", + "Date" : "Tue, 12 Apr 2022 09:10:42 GMT" + }, + "Exception" : null + } ], + "variables" : [ "c8ecdff6c8ecdff6eae6372451a64e32cf4b465fa5" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsCreateIfNotExistsWithConflictingMetadataOnAQueueClientThatAlreadyExists.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsCreateIfNotExistsWithConflictingMetadataOnAQueueClientThatAlreadyExists.json new file mode 100644 index 0000000000000..e67dc7134d102 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsCreateIfNotExistsWithConflictingMetadataOnAQueueClientThatAlreadyExists.json @@ -0,0 +1,45 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/e97d47ade97d47ad280215079a64e6fbd51746e3b8", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-queue/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", + "x-ms-client-request-id" : "1f33893d-67a5-4ce3-89fe-5fcf52c3aa05" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "66874ef7-f003-003c-0a4e-4e3b3f000000", + "x-ms-client-request-id" : "1f33893d-67a5-4ce3-89fe-5fcf52c3aa05", + "Date" : "Tue, 12 Apr 2022 09:20:02 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/e97d47ade97d47ad280215079a64e6fbd51746e3b8", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-queue/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", + "x-ms-client-request-id" : "26dbfc88-d2d0-45cf-b44a-96fc094f5a75" + }, + "Response" : { + "content-length" : "222", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "QueueAlreadyExists", + "retry-after" : "0", + "StatusCode" : "409", + "x-ms-request-id" : "53f2e194-4003-0074-624e-4e2608000000", + "Body" : "QueueAlreadyExistsThe specified queue already exists.\nRequestId:53f2e194-4003-0074-624e-4e2608000000\nTime:2022-04-12T09:20:03.7189222Z", + "x-ms-client-request-id" : "26dbfc88-d2d0-45cf-b44a-96fc094f5a75", + "Date" : "Tue, 12 Apr 2022 09:20:02 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "e97d47ade97d47ad280700063bb5c4087f3c4ee582", "e97d47ade97d47ad280215079a64e6fbd51746e3b8" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsCreateIfNotExistsWithSameMetadataOnAQueueClientThatAlreadyExists.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsCreateIfNotExistsWithSameMetadataOnAQueueClientThatAlreadyExists.json new file mode 100644 index 0000000000000..084036bb40b9d --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsCreateIfNotExistsWithSameMetadataOnAQueueClientThatAlreadyExists.json @@ -0,0 +1,42 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/1c8011941c801194bb669428c2f5b2567f444c5ea5", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-queue/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", + "x-ms-client-request-id" : "1b50b332-d832-4056-a41d-9e277c7ff734" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "2332779a-3003-007e-724f-4e82bf000000", + "x-ms-client-request-id" : "1b50b332-d832-4056-a41d-9e277c7ff734", + "Date" : "Tue, 12 Apr 2022 09:24:56 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/1c8011941c801194bb669428c2f5b2567f444c5ea5", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-queue/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", + "x-ms-client-request-id" : "2623220d-b4d7-4e73-a56c-1fc27ebd0566" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "44cbd0fc-5003-0068-154f-4e7468000000", + "x-ms-client-request-id" : "2623220d-b4d7-4e73-a56c-1fc27ebd0566", + "Date" : "Tue, 12 Apr 2022 09:24:56 GMT" + }, + "Exception" : null + } ], + "variables" : [ "1c8011941c801194bb634507ef5ec14e1cac49c487", "1c8011941c801194bb669428c2f5b2567f444c5ea5" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsCreateQueueWithSharedKey.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsCreateQueueWithSharedKey.json new file mode 100644 index 0000000000000..2fb0c0b33c1da --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsCreateQueueWithSharedKey.json @@ -0,0 +1,23 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/ee5055b2ee5055b2c6692812d3e4821b576d465f88", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "a43d4d33-c294-48ea-9948-2d102b762303" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "4a84b4a0-a003-007d-0609-418702000000", + "x-ms-client-request-id" : "a43d4d33-c294-48ea-9948-2d102b762303", + "Date" : "Tue, 04 May 2021 17:18:36 GMT" + }, + "Exception" : null + } ], + "variables" : [ "ee5055b2ee5055b2c6692812d3e4821b576d465f88" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsCreateQueueWithSmallTimeoutsFailForServiceClient.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsCreateQueueWithSmallTimeoutsFailForServiceClient.json new file mode 100644 index 0000000000000..59e8c8914d8ef --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsCreateQueueWithSmallTimeoutsFailForServiceClient.json @@ -0,0 +1,4 @@ +{ + "networkCallRecords" : [ ], + "variables" : [ "5b0670125b0670125940882289fea3e6f9a04fadb0", "5b0670125b06701259445432cca351f8267c4d899a" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsDeleteExistQueue.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsDeleteExistQueue.json new file mode 100644 index 0000000000000..606ed2ff73707 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsDeleteExistQueue.json @@ -0,0 +1,42 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/067dc425067dc42532650518263136148c054bb988", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "a3528dca-57db-490b-8a2f-6ad68fc369e1" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "66d7cf0d-0003-0074-4e09-41c2d1000000", + "x-ms-client-request-id" : "a3528dca-57db-490b-8a2f-6ad68fc369e1", + "Date" : "Tue, 04 May 2021 17:18:37 GMT" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.queue.core.windows.net/067dc425067dc42532650518263136148c054bb988", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "ad27b0be-5b93-406e-a971-5ec22f7a1c5c" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "66d7cf18-0003-0074-5809-41c2d1000000", + "x-ms-client-request-id" : "ad27b0be-5b93-406e-a971-5ec22f7a1c5c", + "Date" : "Tue, 04 May 2021 17:18:37 GMT" + }, + "Exception" : null + } ], + "variables" : [ "067dc425067dc42532650518263136148c054bb988" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsDeleteIfExistsMin.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsDeleteIfExistsMin.json new file mode 100644 index 0000000000000..47962fbb82d9c --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsDeleteIfExistsMin.json @@ -0,0 +1,42 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "http://REDACTED.queue.core.windows.net/bb6ac7c8bb6ac7c85cd182965c6e8249a7434001b1", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-queue/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", + "x-ms-client-request-id" : "83d45949-79a5-4b4e-b3f2-34afe5ed7709" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "eff8c222-0003-0007-1672-517e9b000000", + "x-ms-client-request-id" : "83d45949-79a5-4b4e-b3f2-34afe5ed7709", + "Date" : "Sat, 16 Apr 2022 09:15:07 GMT" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "http://REDACTED.queue.core.windows.net/bb6ac7c8bb6ac7c85cd182965c6e8249a7434001b1", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-queue/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", + "x-ms-client-request-id" : "65017f7b-9948-4511-8398-40631ceef1da" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "9936035b-6003-0001-0c72-514d24000000", + "x-ms-client-request-id" : "65017f7b-9948-4511-8398-40631ceef1da", + "Date" : "Sat, 16 Apr 2022 09:15:08 GMT" + }, + "Exception" : null + } ], + "variables" : [ "bb6ac7c8bb6ac7c85cd182965c6e8249a7434001b1" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsDeleteIfExistsQueue.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsDeleteIfExistsQueue.json new file mode 100644 index 0000000000000..3d6295a930f5e --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsDeleteIfExistsQueue.json @@ -0,0 +1,42 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "http://REDACTED.queue.core.windows.net/9be0c6e19be0c6e1e5c87035a40ff5d2751e431b8d", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-queue/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", + "x-ms-client-request-id" : "abffe848-6391-4be9-923a-fbe3ec4fb7a5" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "99360316-6003-0001-4c72-514d24000000", + "x-ms-client-request-id" : "abffe848-6391-4be9-923a-fbe3ec4fb7a5", + "Date" : "Sat, 16 Apr 2022 09:15:08 GMT" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "http://REDACTED.queue.core.windows.net/9be0c6e19be0c6e1e5c87035a40ff5d2751e431b8d", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-queue/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", + "x-ms-client-request-id" : "f22c0046-8145-41a4-8fab-a1bbf6158ad5" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "3695f7da-a003-001e-4772-51fe20000000", + "x-ms-client-request-id" : "f22c0046-8145-41a4-8fab-a1bbf6158ad5", + "Date" : "Sat, 16 Apr 2022 09:15:07 GMT" + }, + "Exception" : null + } ], + "variables" : [ "9be0c6e19be0c6e1e5c87035a40ff5d2751e431b8d" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsDeleteIfExistsWithResponseOnAQueueClientThatDoesNotExist.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsDeleteIfExistsWithResponseOnAQueueClientThatDoesNotExist.json new file mode 100644 index 0000000000000..7c44f6cdaa505 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsDeleteIfExistsWithResponseOnAQueueClientThatDoesNotExist.json @@ -0,0 +1,48 @@ +{ + "networkCallRecords" : [ { + "Method" : "DELETE", + "Uri" : "http://REDACTED.queue.core.windows.net/9a72cf9c9a72cf9c29d90529241e2097538f49debb", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-queue/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", + "x-ms-client-request-id" : "a4864aae-acac-45b6-a23e-8b59eb0201ae" + }, + "Response" : { + "content-length" : "217", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "QueueNotFound", + "retry-after" : "0", + "StatusCode" : "404", + "x-ms-request-id" : "3695f7a7-a003-001e-1a72-51fe20000000", + "Body" : "QueueNotFoundThe specified queue does not exist.\nRequestId:3695f7a7-a003-001e-1a72-51fe20000000\nTime:2022-04-16T09:15:08.4217480Z", + "x-ms-client-request-id" : "a4864aae-acac-45b6-a23e-8b59eb0201ae", + "Date" : "Sat, 16 Apr 2022 09:15:07 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://REDACTED.queue.core.windows.net/9a72cf9c9a72cf9c29d90529241e2097538f49debb?comp=metadata", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-queue/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", + "x-ms-client-request-id" : "432b81cf-22b0-4653-bb84-bb18b926187a" + }, + "Response" : { + "content-length" : "217", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "QueueNotFound", + "retry-after" : "0", + "StatusCode" : "404", + "x-ms-request-id" : "eff8c234-0003-0007-2572-517e9b000000", + "Body" : "QueueNotFoundThe specified queue does not exist.\nRequestId:eff8c234-0003-0007-2572-517e9b000000\nTime:2022-04-16T09:15:08.6393532Z", + "x-ms-client-request-id" : "432b81cf-22b0-4653-bb84-bb18b926187a", + "Date" : "Sat, 16 Apr 2022 09:15:08 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "9a72cf9c9a72cf9c29d05976ca24ba3330e3444da7", "9a72cf9c9a72cf9c29d90529241e2097538f49debb" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsDeleteMessage.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsDeleteMessage.json new file mode 100644 index 0000000000000..212b305a6b272 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsDeleteMessage.json @@ -0,0 +1,172 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/27b6760a27b6760aa9b70431088f5c924e6749f2b7", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "da6ec750-4725-4312-bbe3-d88cfda81c8b" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "26562d95-0003-004b-3109-410a72000000", + "x-ms-client-request-id" : "da6ec750-4725-4312-bbe3-d88cfda81c8b", + "Date" : "Tue, 04 May 2021 17:18:38 GMT" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/27b6760a27b6760aa9b70431088f5c924e6749f2b7/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "7073aa16-d185-4e6e-8afd-10faff0be65e", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "af9d2518-5003-0046-5409-41c2a6000000", + "Body" : "eac107c1-f938-4929-b7bb-6b0570a425a5Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAAr6BahglB1wE=Tue, 04 May 2021 17:18:39 GMT", + "x-ms-client-request-id" : "7073aa16-d185-4e6e-8afd-10faff0be65e", + "Date" : "Tue, 04 May 2021 17:18:39 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/27b6760a27b6760aa9b70431088f5c924e6749f2b7/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "2eab16ff-fef4-4282-abe1-7e89e6bd2627", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "ec6c63cb-7003-00e8-4c09-416fb7000000", + "Body" : "60a4c50f-d3ec-44e4-aee9-6caf05bfb4e1Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAADFtohglB1wE=Tue, 04 May 2021 17:18:39 GMT", + "x-ms-client-request-id" : "2eab16ff-fef4-4282-abe1-7e89e6bd2627", + "Date" : "Tue, 04 May 2021 17:18:39 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/27b6760a27b6760aa9b70431088f5c924e6749f2b7/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "40c4e28b-f53e-44bb-aa9e-1abb96577a54", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "7b7386a8-2003-002e-2a09-41a436000000", + "Body" : "ea70c26c-c446-40e0-bc9a-ea625350f8c8Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAANit1hglB1wE=Tue, 04 May 2021 17:18:39 GMT", + "x-ms-client-request-id" : "40c4e28b-f53e-44bb-aa9e-1abb96577a54", + "Date" : "Tue, 04 May 2021 17:18:39 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/27b6760a27b6760aa9b70431088f5c924e6749f2b7/messages?numofmessages=1", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "9605d751-5ae9-4dd8-aad1-a9c463794acc" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "5ef6fb82-8003-0055-5509-41e6aa000000", + "Body" : "eac107c1-f938-4929-b7bb-6b0570a425a5Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAADo1imAlB1wE=Tue, 04 May 2021 17:19:09 GMT1test message 1", + "x-ms-client-request-id" : "9605d751-5ae9-4dd8-aad1-a9c463794acc", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/27b6760a27b6760aa9b70431088f5c924e6749f2b7?comp=metadata", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "bb0acd7c-9656-4ff0-946d-23deaeaa78a7" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "x-ms-approximate-messages-count" : "3", + "StatusCode" : "200", + "x-ms-request-id" : "721d9142-4003-005a-2d09-4190c6000000", + "x-ms-client-request-id" : "bb0acd7c-9656-4ff0-946d-23deaeaa78a7", + "Date" : "Tue, 04 May 2021 17:18:39 GMT" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.queue.core.windows.net/27b6760a27b6760aa9b70431088f5c924e6749f2b7/messages/eac107c1-f938-4929-b7bb-6b0570a425a5?popreceipt=AgAAAAMAAAAAAAAADo1imAlB1wE%3D", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "9ba39120-2b47-4eee-b96f-86e7adbd3876" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "d9b89a2e-f003-0012-7509-418df1000000", + "x-ms-client-request-id" : "9ba39120-2b47-4eee-b96f-86e7adbd3876", + "Date" : "Tue, 04 May 2021 17:18:39 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/27b6760a27b6760aa9b70431088f5c924e6749f2b7?comp=metadata", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "4118b517-dac5-4609-8317-6397ad8de02d" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "x-ms-approximate-messages-count" : "2", + "StatusCode" : "200", + "x-ms-request-id" : "433a3044-e003-00a7-3c09-411ee3000000", + "x-ms-client-request-id" : "4118b517-dac5-4609-8317-6397ad8de02d", + "Date" : "Tue, 04 May 2021 17:18:39 GMT" + }, + "Exception" : null + } ], + "variables" : [ "27b6760a27b6760aa9b70431088f5c924e6749f2b7" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsDeleteMessageInvalidArgs[0].json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsDeleteMessageInvalidArgs[0].json new file mode 100644 index 0000000000000..20cb0a1a3843e --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsDeleteMessageInvalidArgs[0].json @@ -0,0 +1,89 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/5fff04655fff0465e57348872ec7de0d2ab441dab1", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "9f9f63d1-4a18-47d8-9834-c1de8f7f9762" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "beffcc40-b003-00c8-1e09-411410000000", + "x-ms-client-request-id" : "9f9f63d1-4a18-47d8-9834-c1de8f7f9762", + "Date" : "Tue, 04 May 2021 17:18:39 GMT" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/5fff04655fff0465e57348872ec7de0d2ab441dab1/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "991441f0-dc65-44ed-844c-6ba797708e22", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "1382cd28-b003-002c-0e09-411a8e000000", + "Body" : "ddd8e517-abe0-4246-bdea-311559c9d470Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAAcUVghglB1wE=Tue, 04 May 2021 17:18:39 GMT", + "x-ms-client-request-id" : "991441f0-dc65-44ed-844c-6ba797708e22", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/5fff04655fff0465e57348872ec7de0d2ab441dab1/messages?numofmessages=1", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "97332ce1-ecc1-486d-ae1a-7d00b0941e39" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "895e7b8a-6003-00a9-4909-413753000000", + "Body" : "ddd8e517-abe0-4246-bdea-311559c9d470Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAAOrRQmAlB1wE=Tue, 04 May 2021 17:19:09 GMT1test message", + "x-ms-client-request-id" : "97332ce1-ecc1-486d-ae1a-7d00b0941e39", + "Date" : "Tue, 04 May 2021 17:18:39 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.queue.core.windows.net/5fff04655fff0465e57348872ec7de0d2ab441dab1/messages/ddd8e517-abe0-4246-bdea-311559c9d470?popreceipt=AgAAAAMAAAAAAAAAOrRQmAlB1wE%3DRandom", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "0cb36e89-df09-4c43-b3ef-57250609a232" + }, + "Response" : { + "content-length" : "444", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "InvalidQueryParameterValue", + "retry-after" : "0", + "StatusCode" : "400", + "x-ms-request-id" : "76d94395-e003-0021-1e09-41d25a000000", + "Body" : "InvalidQueryParameterValueValue for one of the query parameters specified in the request URI is invalid.\nRequestId:76d94395-e003-0021-1e09-41d25a000000\nTime:2021-05-04T17:18:39.7558011ZpopreceiptAgAAAAMAAAAAAAAAOrRQmAlB1wE=RandomInvalid pop receipt format", + "x-ms-client-request-id" : "0cb36e89-df09-4c43-b3ef-57250609a232", + "Date" : "Tue, 04 May 2021 17:18:39 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "5fff04655fff0465e57348872ec7de0d2ab441dab1" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsDeleteMessageInvalidArgs[1].json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsDeleteMessageInvalidArgs[1].json new file mode 100644 index 0000000000000..7b09dc8b60b7e --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsDeleteMessageInvalidArgs[1].json @@ -0,0 +1,89 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/46e4352446e43524e875084446547dacfcf642e792", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "e229c9b8-a2e6-4822-9c54-c1fd363ad419" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "fde04340-8003-00a1-1609-412d5c000000", + "x-ms-client-request-id" : "e229c9b8-a2e6-4822-9c54-c1fd363ad419", + "Date" : "Tue, 04 May 2021 17:18:39 GMT" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/46e4352446e43524e875084446547dacfcf642e792/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "74421541-6a98-448b-bf85-d108983cf1bc", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "73eb565f-2003-003e-0e09-41615e000000", + "Body" : "4fd8d184-5c66-4065-9973-e6f3dda8fd42Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAAzbFthglB1wE=Tue, 04 May 2021 17:18:39 GMT", + "x-ms-client-request-id" : "74421541-6a98-448b-bf85-d108983cf1bc", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/46e4352446e43524e875084446547dacfcf642e792/messages?numofmessages=1", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "b765a18c-b758-4299-9f21-6f4d8409a95e" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "fa8afae4-b003-0013-6109-41d22d000000", + "Body" : "4fd8d184-5c66-4065-9973-e6f3dda8fd42Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAAEXNcmAlB1wE=Tue, 04 May 2021 17:19:09 GMT1test message", + "x-ms-client-request-id" : "b765a18c-b758-4299-9f21-6f4d8409a95e", + "Date" : "Tue, 04 May 2021 17:18:39 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.queue.core.windows.net/46e4352446e43524e875084446547dacfcf642e792/messages/4fd8d184-5c66-4065-9973-e6f3dda8fd42Random?popreceipt=AgAAAAMAAAAAAAAAEXNcmAlB1wE%3D", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "da9a3e9d-2fb1-421c-b1e7-d1ce3c99d223" + }, + "Response" : { + "content-length" : "221", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "MessageNotFound", + "retry-after" : "0", + "StatusCode" : "404", + "x-ms-request-id" : "4a84b51c-a003-007d-7309-418702000000", + "Body" : "MessageNotFoundThe specified message does not exist.\nRequestId:4a84b51c-a003-007d-7309-418702000000\nTime:2021-05-04T17:18:39.8514109Z", + "x-ms-client-request-id" : "da9a3e9d-2fb1-421c-b1e7-d1ce3c99d223", + "Date" : "Tue, 04 May 2021 17:18:39 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "46e4352446e43524e875084446547dacfcf642e792" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsDeleteMessageInvalidArgs[2].json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsDeleteMessageInvalidArgs[2].json new file mode 100644 index 0000000000000..91899d43e1511 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsDeleteMessageInvalidArgs[2].json @@ -0,0 +1,89 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/6dc966e76dc966e70461784316044e1f08164a148b", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "d840120d-f45f-412c-8d1f-014de27076c2" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "3c7b17c7-c003-0054-4c09-41b976000000", + "x-ms-client-request-id" : "d840120d-f45f-412c-8d1f-014de27076c2", + "Date" : "Tue, 04 May 2021 17:18:38 GMT" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/6dc966e76dc966e70461784316044e1f08164a148b/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "ca32d756-a418-4061-ad86-eaef8c394333", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "c54fcc2e-e003-000e-3009-41df91000000", + "Body" : "163bf2d4-0fee-4483-b00d-edd1f49c982eTue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAAzrFthglB1wE=Tue, 04 May 2021 17:18:39 GMT", + "x-ms-client-request-id" : "ca32d756-a418-4061-ad86-eaef8c394333", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/6dc966e76dc966e70461784316044e1f08164a148b/messages?numofmessages=1", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "85883d82-c201-4fb2-a98b-f133a03f0b1f" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "78b23441-8003-0008-5a09-41ec2e000000", + "Body" : "163bf2d4-0fee-4483-b00d-edd1f49c982eTue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAAqjpbmAlB1wE=Tue, 04 May 2021 17:19:09 GMT1test message", + "x-ms-client-request-id" : "85883d82-c201-4fb2-a98b-f133a03f0b1f", + "Date" : "Tue, 04 May 2021 17:18:39 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.queue.core.windows.net/6dc966e76dc966e70461784316044e1f08164a148b/messages/163bf2d4-0fee-4483-b00d-edd1f49c982eRandom?popreceipt=AgAAAAMAAAAAAAAAqjpbmAlB1wE%3DRandom", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "9532aeec-ccad-4269-89cb-e0122611bcd3" + }, + "Response" : { + "content-length" : "444", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "InvalidQueryParameterValue", + "retry-after" : "0", + "StatusCode" : "400", + "x-ms-request-id" : "1382cd2c-b003-002c-1109-411a8e000000", + "Body" : "InvalidQueryParameterValueValue for one of the query parameters specified in the request URI is invalid.\nRequestId:1382cd2c-b003-002c-1109-411a8e000000\nTime:2021-05-04T17:18:39.8066542ZpopreceiptAgAAAAMAAAAAAAAAqjpbmAlB1wE=RandomInvalid pop receipt format", + "x-ms-client-request-id" : "9532aeec-ccad-4269-89cb-e0122611bcd3", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "6dc966e76dc966e70461784316044e1f08164a148b" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsDeleteQueueError.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsDeleteQueueError.json new file mode 100644 index 0000000000000..5a61a3dbc5714 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsDeleteQueueError.json @@ -0,0 +1,26 @@ +{ + "networkCallRecords" : [ { + "Method" : "DELETE", + "Uri" : "https://REDACTED.queue.core.windows.net/07a230b907a230b943c27445a82bef497bf547f9b8", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "2cc00e99-3a2d-4175-8147-4d43ab8596f1" + }, + "Response" : { + "content-length" : "217", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "QueueNotFound", + "retry-after" : "0", + "StatusCode" : "404", + "x-ms-request-id" : "fde042a3-8003-00a1-1409-412d5c000000", + "Body" : "QueueNotFoundThe specified queue does not exist.\nRequestId:fde042a3-8003-00a1-1409-412d5c000000\nTime:2021-05-04T17:18:37.3816361Z", + "x-ms-client-request-id" : "2cc00e99-3a2d-4175-8147-4d43ab8596f1", + "Date" : "Tue, 04 May 2021 17:18:37 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "07a230b907a230b943c27445a82bef497bf547f9b8" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsDequeueAndDeleteWithHandler.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsDequeueAndDeleteWithHandler.json new file mode 100644 index 0000000000000..b80de0fea071f --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsDequeueAndDeleteWithHandler.json @@ -0,0 +1,108 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/bcfc06f9bcfc06f93e35399588a34da0f6d741208d", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "dfc0a726-8d19-4c6c-abf7-8bd5d186e003" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "536624b7-4003-00dc-7f09-415c7f000000", + "x-ms-client-request-id" : "dfc0a726-8d19-4c6c-abf7-8bd5d186e003", + "Date" : "Tue, 04 May 2021 17:18:38 GMT" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/bcfc06f9bcfc06f93e35399588a34da0f6d741208d/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "bb5973e0-bb0c-4a60-b320-8e7e5acdb8d0", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "7c5d39d0-2003-0011-0e09-416c95000000", + "Body" : "af16bb91-faec-4dfe-a8da-834c394751c1Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAAA6EbhglB1wE=Tue, 04 May 2021 17:18:39 GMT", + "x-ms-client-request-id" : "bb5973e0-bb0c-4a60-b320-8e7e5acdb8d0", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/bcfc06f9bcfc06f93e35399588a34da0f6d741208d/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "f867a81e-99a1-43c6-886e-de63ab68ce15", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "b050afb9-6003-00cb-2109-41f574000000", + "Body" : "b7982ebe-24cc-4594-a628-a9f02d5ac0a8Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAAkI8shglB1wE=Tue, 04 May 2021 17:18:39 GMT", + "x-ms-client-request-id" : "f867a81e-99a1-43c6-886e-de63ab68ce15", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/bcfc06f9bcfc06f93e35399588a34da0f6d741208d/messages?numofmessages=10&visibilitytimeout=30", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "c83fa509-1bc1-4a46-b845-3fc8b714a869" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "721d911d-4003-005a-0c09-4190c6000000", + "Body" : "af16bb91-faec-4dfe-a8da-834c394751c1Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAACUgomAlB1wE=Tue, 04 May 2021 17:19:09 GMT1dGVzdCBtZXNzYWdlb7982ebe-24cc-4594-a628-a9f02d5ac0a8Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAACUgomAlB1wE=Tue, 04 May 2021 17:19:09 GMT1test message", + "x-ms-client-request-id" : "c83fa509-1bc1-4a46-b845-3fc8b714a869", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.queue.core.windows.net/bcfc06f9bcfc06f93e35399588a34da0f6d741208d/messages/b7982ebe-24cc-4594-a628-a9f02d5ac0a8?popreceipt=AgAAAAMAAAAAAAAACUgomAlB1wE%3D", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "00d34991-ae16-4a1e-9349-90c21d4ed858" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "26562d9e-0003-004b-3709-410a72000000", + "x-ms-client-request-id" : "00d34991-ae16-4a1e-9349-90c21d4ed858", + "Date" : "Tue, 04 May 2021 17:18:38 GMT" + }, + "Exception" : null + } ], + "variables" : [ "bcfc06f9bcfc06f93e35399588a34da0f6d741208d" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsDequeueAndDeleteWithSyncHandler.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsDequeueAndDeleteWithSyncHandler.json new file mode 100644 index 0000000000000..9aa8d13ec2a54 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsDequeueAndDeleteWithSyncHandler.json @@ -0,0 +1,108 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/4169d8e74169d8e796916086df73f40b1a6d4b05a3", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "43f7bd53-b7d8-41d3-9b7d-5878ebee12e1" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "fde0431d-8003-00a1-7a09-412d5c000000", + "x-ms-client-request-id" : "43f7bd53-b7d8-41d3-9b7d-5878ebee12e1", + "Date" : "Tue, 04 May 2021 17:18:38 GMT" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/4169d8e74169d8e796916086df73f40b1a6d4b05a3/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "28b53e95-5116-4e5c-aad2-b6c76718a25e", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "fdcb012d-7003-0033-7309-41a98a000000", + "Body" : "c1a09196-83b6-491e-ace0-ad2cd890e390Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAAgE4mhglB1wE=Tue, 04 May 2021 17:18:39 GMT", + "x-ms-client-request-id" : "28b53e95-5116-4e5c-aad2-b6c76718a25e", + "Date" : "Tue, 04 May 2021 17:18:39 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/4169d8e74169d8e796916086df73f40b1a6d4b05a3/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "ebed0f31-5433-4c8e-849d-274569ee8f9a", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "2733c1b6-b003-00d8-5409-41d178000000", + "Body" : "ace183de-7979-42c6-8e16-8df00bc81189Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAAAX5GhglB1wE=Tue, 04 May 2021 17:18:39 GMT", + "x-ms-client-request-id" : "ebed0f31-5433-4c8e-849d-274569ee8f9a", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/4169d8e74169d8e796916086df73f40b1a6d4b05a3/messages?numofmessages=10&visibilitytimeout=30", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "44c784db-5481-4fb7-831d-51bc3732610a" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "5ef6fb79-8003-0055-4d09-41e6aa000000", + "Body" : "c1a09196-83b6-491e-ace0-ad2cd890e390Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAAcehBmAlB1wE=Tue, 04 May 2021 17:19:09 GMT1dGVzdCBtZXNzYWdlace183de-7979-42c6-8e16-8df00bc81189Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAAcehBmAlB1wE=Tue, 04 May 2021 17:19:09 GMT1test message", + "x-ms-client-request-id" : "44c784db-5481-4fb7-831d-51bc3732610a", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.queue.core.windows.net/4169d8e74169d8e796916086df73f40b1a6d4b05a3/messages/ace183de-7979-42c6-8e16-8df00bc81189?popreceipt=AgAAAAMAAAAAAAAAcehBmAlB1wE%3D", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "7bdbcc3d-c15d-4756-b505-e6c4e4e5ad0c" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "946d04a5-0003-00dd-6f09-4103a3000000", + "x-ms-client-request-id" : "7bdbcc3d-c15d-4756-b505-e6c4e4e5ad0c", + "Date" : "Tue, 04 May 2021 17:18:39 GMT" + }, + "Exception" : null + } ], + "variables" : [ "4169d8e74169d8e796916086df73f40b1a6d4b05a3" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsDequeueEncodedMessage.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsDequeueEncodedMessage.json new file mode 100644 index 0000000000000..c9865ed242b42 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsDequeueEncodedMessage.json @@ -0,0 +1,67 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/c4a5f701c4a5f701a122164473f02ee1469e44c2b3", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "ecd4c51a-972f-4ada-a211-dc26a861d740" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "73eb5611-2003-003e-4509-41615e000000", + "x-ms-client-request-id" : "ecd4c51a-972f-4ada-a211-dc26a861d740", + "Date" : "Tue, 04 May 2021 17:18:37 GMT" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/c4a5f701c4a5f701a122164473f02ee1469e44c2b3/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "017b8a08-a968-4f61-b801-4285f671945c", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "d99b06a6-6003-004d-1b09-4139cd000000", + "Body" : "0f292f6d-b33e-40d2-96bc-01ffe0ddd094Tue, 04 May 2021 17:18:38 GMTTue, 11 May 2021 17:18:38 GMTAgAAAAMAAAAAAAAARdUDhglB1wE=Tue, 04 May 2021 17:18:38 GMT", + "x-ms-client-request-id" : "017b8a08-a968-4f61-b801-4285f671945c", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/c4a5f701c4a5f701a122164473f02ee1469e44c2b3/messages?numofmessages=1", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "53aac1ff-9ba7-4fa5-b45a-e7d01cd4dc40" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "d1814e51-2003-00e5-7609-41a763000000", + "Body" : "0f292f6d-b33e-40d2-96bc-01ffe0ddd094Tue, 04 May 2021 17:18:38 GMTTue, 11 May 2021 17:18:38 GMTAgAAAAMAAAAAAAAAYy71lwlB1wE=Tue, 04 May 2021 17:19:09 GMT1dGVzdCBtZXNzYWdl", + "x-ms-client-request-id" : "53aac1ff-9ba7-4fa5-b45a-e7d01cd4dc40", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "c4a5f701c4a5f701a122164473f02ee1469e44c2b3" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsDequeueFailsWithoutHandler.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsDequeueFailsWithoutHandler.json new file mode 100644 index 0000000000000..0d02478321067 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsDequeueFailsWithoutHandler.json @@ -0,0 +1,67 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/e3453db6e3453db628b460037ce631b012a944c0b0", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "dea7ab16-396d-484a-bab1-d4618b54c16a" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "ea4bba29-6003-0086-2009-413a98000000", + "x-ms-client-request-id" : "dea7ab16-396d-484a-bab1-d4618b54c16a", + "Date" : "Tue, 04 May 2021 17:18:38 GMT" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/e3453db6e3453db628b460037ce631b012a944c0b0/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "5e3450f3-cf30-432b-b31c-c5ce7ae613a4", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "b050afb2-6003-00cb-1c09-41f574000000", + "Body" : "8f369f85-51df-464e-9084-f51c43cf66f8Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAA3x4YhglB1wE=Tue, 04 May 2021 17:18:39 GMT", + "x-ms-client-request-id" : "5e3450f3-cf30-432b-b31c-c5ce7ae613a4", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/e3453db6e3453db628b460037ce631b012a944c0b0/messages?numofmessages=1", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "ebd88d74-0827-4fe2-8d20-b72888814807" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "34fa7b16-1003-0078-4709-4155d9000000", + "Body" : "8f369f85-51df-464e-9084-f51c43cf66f8Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAA9FAJmAlB1wE=Tue, 04 May 2021 17:19:09 GMT1test message", + "x-ms-client-request-id" : "ebd88d74-0827-4fe2-8d20-b72888814807", + "Date" : "Tue, 04 May 2021 17:18:39 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "e3453db6e3453db628b460037ce631b012a944c0b0" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsDequeueMessage.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsDequeueMessage.json new file mode 100644 index 0000000000000..ea8c86d68d4f5 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsDequeueMessage.json @@ -0,0 +1,67 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/9820cbf69820cbf672885136b1f9aee40629487a92", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "89b8cf37-a777-4d62-becb-0b0ceca660d2" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "d99b0695-6003-004d-0d09-4139cd000000", + "x-ms-client-request-id" : "89b8cf37-a777-4d62-becb-0b0ceca660d2", + "Date" : "Tue, 04 May 2021 17:18:37 GMT" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/9820cbf69820cbf672885136b1f9aee40629487a92/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "45d41c34-d7df-4c6c-b586-7f800b4de551", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "fa8afabd-b003-0013-4109-41d22d000000", + "Body" : "3407a22b-ff75-4863-bd37-53f06e9db840Tue, 04 May 2021 17:18:38 GMTTue, 11 May 2021 17:18:38 GMTAgAAAAMAAAAAAAAAX/z6hQlB1wE=Tue, 04 May 2021 17:18:38 GMT", + "x-ms-client-request-id" : "45d41c34-d7df-4c6c-b586-7f800b4de551", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/9820cbf69820cbf672885136b1f9aee40629487a92/messages?numofmessages=1", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "91318118-439c-475c-b35f-f194908d1ccb" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "beffcc30-b003-00c8-1009-411410000000", + "Body" : "3407a22b-ff75-4863-bd37-53f06e9db840Tue, 04 May 2021 17:18:38 GMTTue, 11 May 2021 17:18:38 GMTAgAAAAMAAAAAAAAAZRTvlwlB1wE=Tue, 04 May 2021 17:19:09 GMT1test message", + "x-ms-client-request-id" : "91318118-439c-475c-b35f-f194908d1ccb", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "9820cbf69820cbf672885136b1f9aee40629487a92" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsDequeueMultipleMessages.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsDequeueMultipleMessages.json new file mode 100644 index 0000000000000..aad3139cc0577 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsDequeueMultipleMessages.json @@ -0,0 +1,89 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/3fe0a2de3fe0a2de2ee9466868d098b9345b4a3abf", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "30c86657-6104-4ada-aa7c-163ba590d65c" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "92671e78-a003-000f-4f09-41804d000000", + "x-ms-client-request-id" : "30c86657-6104-4ada-aa7c-163ba590d65c", + "Date" : "Tue, 04 May 2021 17:18:38 GMT" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/3fe0a2de3fe0a2de2ee9466868d098b9345b4a3abf/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "43b098bc-f1d0-4456-bc74-21a647cf9db3", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "4a84b4f6-a003-007d-5309-418702000000", + "Body" : "21fa338f-f337-4611-a7e2-db09b7389a2eTue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAABdUnhglB1wE=Tue, 04 May 2021 17:18:39 GMT", + "x-ms-client-request-id" : "43b098bc-f1d0-4456-bc74-21a647cf9db3", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/3fe0a2de3fe0a2de2ee9466868d098b9345b4a3abf/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "7cc9fe6f-b313-46a6-a6bc-76beb9742d14", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "34fa7b20-1003-0078-4f09-4155d9000000", + "Body" : "4fb5dbb6-e831-4b14-8bab-6e063bb1b5f3Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAA0eFFhglB1wE=Tue, 04 May 2021 17:18:39 GMT", + "x-ms-client-request-id" : "7cc9fe6f-b313-46a6-a6bc-76beb9742d14", + "Date" : "Tue, 04 May 2021 17:18:39 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/3fe0a2de3fe0a2de2ee9466868d098b9345b4a3abf/messages?numofmessages=2&visibilitytimeout=30", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "f3a2701a-5d53-48ff-8645-f0d4fdc90a6a" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "d1814e6a-2003-00e5-0c09-41a763000000", + "Body" : "21fa338f-f337-4611-a7e2-db09b7389a2eTue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAAXcFBmAlB1wE=Tue, 04 May 2021 17:19:09 GMT1test message 14fb5dbb6-e831-4b14-8bab-6e063bb1b5f3Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAAXcFBmAlB1wE=Tue, 04 May 2021 17:19:09 GMT1test message 2", + "x-ms-client-request-id" : "f3a2701a-5d53-48ff-8645-f0d4fdc90a6a", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "3fe0a2de3fe0a2de2ee9466868d098b9345b4a3abf" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsDequeueTooManyMessage.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsDequeueTooManyMessage.json new file mode 100644 index 0000000000000..445e1be2074df --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsDequeueTooManyMessage.json @@ -0,0 +1,45 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/bab6f96abab6f96a0ed99420052ec97d93924c0196", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "9513ad94-a9ee-4b4e-a259-83093e02d445" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "c54fcc11-e003-000e-1a09-41df91000000", + "x-ms-client-request-id" : "9513ad94-a9ee-4b4e-a259-83093e02d445", + "Date" : "Tue, 04 May 2021 17:18:38 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/bab6f96abab6f96a0ed99420052ec97d93924c0196/messages?numofmessages=33&visibilitytimeout=30", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "e3e88684-410f-4680-a2a9-b7a8ec699a14" + }, + "Response" : { + "content-length" : "456", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "OutOfRangeQueryParameterValue", + "retry-after" : "0", + "StatusCode" : "400", + "x-ms-request-id" : "3c7b17ba-c003-0054-4109-41b976000000", + "Body" : "OutOfRangeQueryParameterValueOne of the query parameters specified in the request URI is outside the permissible range.\nRequestId:3c7b17ba-c003-0054-4109-41b976000000\nTime:2021-05-04T17:18:39.1997108Znumofmessages33132", + "x-ms-client-request-id" : "e3e88684-410f-4680-a2a9-b7a8ec699a14", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "bab6f96abab6f96a0ed99420052ec97d93924c0196" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsDequeueWithHandler.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsDequeueWithHandler.json new file mode 100644 index 0000000000000..bed4fccd8ac47 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsDequeueWithHandler.json @@ -0,0 +1,89 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/cf929fc6cf929fc6e441182407851148f0c24d58b5", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "fb90f187-2cc4-495b-8552-05ae03234e37" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "ea8df1c3-5003-009d-0309-41049b000000", + "x-ms-client-request-id" : "fb90f187-2cc4-495b-8552-05ae03234e37", + "Date" : "Tue, 04 May 2021 17:18:38 GMT" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/cf929fc6cf929fc6e441182407851148f0c24d58b5/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "b96cee7b-70db-4856-8f49-f4f38440a6c8", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "80fe1124-6003-002f-6b09-41fbea000000", + "Body" : "d26363c8-c2cd-4f88-abc7-c31f8e21bc2cTue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAAUIschglB1wE=Tue, 04 May 2021 17:18:39 GMT", + "x-ms-client-request-id" : "b96cee7b-70db-4856-8f49-f4f38440a6c8", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/cf929fc6cf929fc6e441182407851148f0c24d58b5/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "39e630c1-0e17-406d-9331-4445b6fe3a05", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "e8711547-4003-0081-6d09-4156fb000000", + "Body" : "893be756-26b5-48c9-b44a-1259834a0328Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAAVg0yhglB1wE=Tue, 04 May 2021 17:18:39 GMT", + "x-ms-client-request-id" : "39e630c1-0e17-406d-9331-4445b6fe3a05", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/cf929fc6cf929fc6e441182407851148f0c24d58b5/messages?numofmessages=10&visibilitytimeout=30", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "ccdd0946-2d9e-4ccc-835e-9238c1a72586" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "60ea4cc8-d003-002a-3909-412931000000", + "Body" : "d26363c8-c2cd-4f88-abc7-c31f8e21bc2cTue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAAaFkpmAlB1wE=Tue, 04 May 2021 17:19:09 GMT1dGVzdCBtZXNzYWdl893be756-26b5-48c9-b44a-1259834a0328Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAAaFkpmAlB1wE=Tue, 04 May 2021 17:19:09 GMT1test message", + "x-ms-client-request-id" : "ccdd0946-2d9e-4ccc-835e-9238c1a72586", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "cf929fc6cf929fc6e441182407851148f0c24d58b5" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsDequeueWithHandlerError.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsDequeueWithHandlerError.json new file mode 100644 index 0000000000000..5db3fe4e3c51f --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsDequeueWithHandlerError.json @@ -0,0 +1,89 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/ad9fd8e3ad9fd8e39d2309795906be705012409ca7", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "d136032a-1401-4afb-be6c-a5e92ab11d53" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "721d90f1-4003-005a-6409-4190c6000000", + "x-ms-client-request-id" : "d136032a-1401-4afb-be6c-a5e92ab11d53", + "Date" : "Tue, 04 May 2021 17:18:38 GMT" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/ad9fd8e3ad9fd8e39d2309795906be705012409ca7/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "6e8998fe-9dc2-4754-a705-78516d1edff2", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "8e697fc3-c003-007b-6709-41b4bd000000", + "Body" : "e0b4b70b-c721-4769-99ed-581b1fd8ba14Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAA9K0nhglB1wE=Tue, 04 May 2021 17:18:39 GMT", + "x-ms-client-request-id" : "6e8998fe-9dc2-4754-a705-78516d1edff2", + "Date" : "Tue, 04 May 2021 17:18:39 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/ad9fd8e3ad9fd8e39d2309795906be705012409ca7/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "82e67534-e1ba-4df6-b816-21d069ce7d71", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "90ba11d0-f003-00bb-7309-414c83000000", + "Body" : "ddb5facc-a4f2-4c8c-95c1-59e22611f5ebTue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAA3ghGhglB1wE=Tue, 04 May 2021 17:18:39 GMT", + "x-ms-client-request-id" : "82e67534-e1ba-4df6-b816-21d069ce7d71", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/ad9fd8e3ad9fd8e39d2309795906be705012409ca7/messages?numofmessages=10&visibilitytimeout=30", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "5cff2228-f00f-41de-8382-fd50c6f9e4c6" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "6980d257-1003-0035-1709-419a35000000", + "Body" : "e0b4b70b-c721-4769-99ed-581b1fd8ba14Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAA7Do3mAlB1wE=Tue, 04 May 2021 17:19:09 GMT1dGVzdCBtZXNzYWdlddb5facc-a4f2-4c8c-95c1-59e22611f5ebTue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAA7Do3mAlB1wE=Tue, 04 May 2021 17:19:09 GMT1test message", + "x-ms-client-request-id" : "5cff2228-f00f-41de-8382-fd50c6f9e4c6", + "Date" : "Tue, 04 May 2021 17:18:39 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "ad9fd8e3ad9fd8e39d2309795906be705012409ca7" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsEnqueueDequeueNon-UTFMessage.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsEnqueueDequeueNon-UTFMessage.json new file mode 100644 index 0000000000000..a4a420bdee457 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsEnqueueDequeueNon-UTFMessage.json @@ -0,0 +1,67 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/37b5348737b5348741d449517fa66053db9444b881", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "b2c36b26-8ce4-4f03-8718-fd2ffe6aab74" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "895e7b4d-6003-00a9-0f09-413753000000", + "x-ms-client-request-id" : "b2c36b26-8ce4-4f03-8718-fd2ffe6aab74", + "Date" : "Tue, 04 May 2021 17:18:38 GMT" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/37b5348737b5348741d449517fa66053db9444b881/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "83f72ab1-4db4-413b-84ec-c4b20e963243", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "c54fcc15-e003-000e-1d09-41df91000000", + "Body" : "23db3c0e-b7b7-4e17-a65a-80539ba76d4fTue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAAclsyhglB1wE=Tue, 04 May 2021 17:18:39 GMT", + "x-ms-client-request-id" : "83f72ab1-4db4-413b-84ec-c4b20e963243", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/37b5348737b5348741d449517fa66053db9444b881/messages?numofmessages=1", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "85a08e05-82a4-4dbf-bab2-ef80e022effb" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "8e697fd7-c003-007b-7609-41b4bd000000", + "Body" : "23db3c0e-b7b7-4e17-a65a-80539ba76d4fTue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAAXDIpmAlB1wE=Tue, 04 May 2021 17:19:09 GMT1/wA=", + "x-ms-client-request-id" : "85a08e05-82a4-4dbf-bab2-ef80e022effb", + "Date" : "Tue, 04 May 2021 17:18:39 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "37b5348737b5348741d449517fa66053db9444b881" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsEnqueueEmptyMessage.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsEnqueueEmptyMessage.json new file mode 100644 index 0000000000000..e563848901a41 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsEnqueueEmptyMessage.json @@ -0,0 +1,67 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/6579dfd36579dfd3b58240450360aeb83558447abf", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "d57e8ebb-5fcf-4a24-ad20-99b610b1605f" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "b050afa3-6003-00cb-1009-41f574000000", + "x-ms-client-request-id" : "d57e8ebb-5fcf-4a24-ad20-99b610b1605f", + "Date" : "Tue, 04 May 2021 17:18:37 GMT" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/6579dfd36579dfd3b58240450360aeb83558447abf/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "7089def3-39a2-4665-a7b9-ee441c7c2432", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "5ef6fb4e-8003-0055-2709-41e6aa000000", + "Body" : "b9cef478-9752-449c-a311-a7983b2fb44eTue, 04 May 2021 17:18:38 GMTTue, 11 May 2021 17:18:38 GMTAgAAAAMAAAAAAAAAAHbnhQlB1wE=Tue, 04 May 2021 17:18:38 GMT", + "x-ms-client-request-id" : "7089def3-39a2-4665-a7b9-ee441c7c2432", + "Date" : "Tue, 04 May 2021 17:18:37 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/6579dfd36579dfd3b58240450360aeb83558447abf/messages?peekonly=true", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "3b91429f-d240-4ad2-867f-0663020f90b1" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "6980d23e-1003-0035-0309-419a35000000", + "Body" : "b9cef478-9752-449c-a311-a7983b2fb44eTue, 04 May 2021 17:18:38 GMTTue, 11 May 2021 17:18:38 GMT0", + "x-ms-client-request-id" : "3b91429f-d240-4ad2-867f-0663020f90b1", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "6579dfd36579dfd3b58240450360aeb83558447abf" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsEnqueueMessage.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsEnqueueMessage.json new file mode 100644 index 0000000000000..aba08bcf830b8 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsEnqueueMessage.json @@ -0,0 +1,67 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/e2e69523e2e69523555270297a341960fa2b495fbe", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "ca4505cb-8240-4f21-bf4a-524775846e1a" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "26562d6d-0003-004b-0f09-410a72000000", + "x-ms-client-request-id" : "ca4505cb-8240-4f21-bf4a-524775846e1a", + "Date" : "Tue, 04 May 2021 17:18:37 GMT" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/e2e69523e2e69523555270297a341960fa2b495fbe/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "320752ee-3cf5-4f10-88c7-28a4ff30d463", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "3c7b17a7-c003-0054-3209-41b976000000", + "Body" : "29b1b672-7cf0-40e1-9325-7445c906e091Tue, 04 May 2021 17:18:38 GMTTue, 11 May 2021 17:18:38 GMTAgAAAAMAAAAAAAAAK7fbhQlB1wE=Tue, 04 May 2021 17:18:38 GMT", + "x-ms-client-request-id" : "320752ee-3cf5-4f10-88c7-28a4ff30d463", + "Date" : "Tue, 04 May 2021 17:18:37 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/e2e69523e2e69523555270297a341960fa2b495fbe/messages?peekonly=true", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "dde87d6f-2b4b-4be6-a5aa-f02004b1db10" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "d1814e4c-2003-00e5-7209-41a763000000", + "Body" : "29b1b672-7cf0-40e1-9325-7445c906e091Tue, 04 May 2021 17:18:38 GMTTue, 11 May 2021 17:18:38 GMT0test message", + "x-ms-client-request-id" : "dde87d6f-2b4b-4be6-a5aa-f02004b1db10", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "e2e69523e2e69523555270297a341960fa2b495fbe" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsEnqueueMessageBinaryData.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsEnqueueMessageBinaryData.json new file mode 100644 index 0000000000000..6bbe41019002e --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsEnqueueMessageBinaryData.json @@ -0,0 +1,67 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/0ae0f4830ae0f4832a665028b50db58ea4914d888a", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "3dbec898-8bc8-4145-85dd-4e8edc26f81c" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "1382cd00-b003-002c-6d09-411a8e000000", + "x-ms-client-request-id" : "3dbec898-8bc8-4145-85dd-4e8edc26f81c", + "Date" : "Tue, 04 May 2021 17:18:37 GMT" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/0ae0f4830ae0f4832a665028b50db58ea4914d888a/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "8c8b92fe-45e7-4359-9236-9283eb705ee0", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "fdcb00e0-7003-0033-2a09-41a98a000000", + "Body" : "6b5a5a42-aa79-4d10-991c-0043732e6492Tue, 04 May 2021 17:18:38 GMTTue, 11 May 2021 17:18:38 GMTAgAAAAMAAAAAAAAAapTihQlB1wE=Tue, 04 May 2021 17:18:38 GMT", + "x-ms-client-request-id" : "8c8b92fe-45e7-4359-9236-9283eb705ee0", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/0ae0f4830ae0f4832a665028b50db58ea4914d888a/messages?peekonly=true", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "5ebb70fd-6691-4b94-902e-71cb7c560ef5" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "b050afae-6003-00cb-1909-41f574000000", + "Body" : "6b5a5a42-aa79-4d10-991c-0043732e6492Tue, 04 May 2021 17:18:38 GMTTue, 11 May 2021 17:18:38 GMT0test message", + "x-ms-client-request-id" : "5ebb70fd-6691-4b94-902e-71cb7c560ef5", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "0ae0f4830ae0f4832a665028b50db58ea4914d888a" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsEnqueueMessageEncodedMessage.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsEnqueueMessageEncodedMessage.json new file mode 100644 index 0000000000000..03eff54381afa --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsEnqueueMessageEncodedMessage.json @@ -0,0 +1,67 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/62d7233d62d7233daf43153789681112a96c48f2b5", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "8961cddb-d4d9-4a08-b4a0-fb854628bc11" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "e8711530-4003-0081-5d09-4156fb000000", + "x-ms-client-request-id" : "8961cddb-d4d9-4a08-b4a0-fb854628bc11", + "Date" : "Tue, 04 May 2021 17:18:38 GMT" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/62d7233d62d7233daf43153789681112a96c48f2b5/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "e421e1f8-1485-4dde-8868-1617e7bb1831", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "721d90e0-4003-005a-5409-4190c6000000", + "Body" : "43631a2c-e243-4069-ae25-ab6d2f5d9825Tue, 04 May 2021 17:18:38 GMTTue, 11 May 2021 17:18:38 GMTAgAAAAMAAAAAAAAA8YLzhQlB1wE=Tue, 04 May 2021 17:18:38 GMT", + "x-ms-client-request-id" : "e421e1f8-1485-4dde-8868-1617e7bb1831", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/62d7233d62d7233daf43153789681112a96c48f2b5/messages?peekonly=true", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "e5b4f186-ac89-4ae6-b484-0d68c6ba8f77" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "fdcb010c-7003-0033-5309-41a98a000000", + "Body" : "43631a2c-e243-4069-ae25-ab6d2f5d9825Tue, 04 May 2021 17:18:38 GMTTue, 11 May 2021 17:18:38 GMT0dGVzdCBtZXNzYWdl", + "x-ms-client-request-id" : "e5b4f186-ac89-4ae6-b484-0d68c6ba8f77", + "Date" : "Tue, 04 May 2021 17:18:39 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "62d7233d62d7233daf43153789681112a96c48f2b5" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsEnqueuePeekNon-UTFMessage.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsEnqueuePeekNon-UTFMessage.json new file mode 100644 index 0000000000000..8a992d055ef23 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsEnqueuePeekNon-UTFMessage.json @@ -0,0 +1,67 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/be836fb7be836fb73d189718b4f720f131384ed0aa", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "800bdd32-9c48-488b-b97b-63d175af32a5" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "ea4bba3c-6003-0086-2d09-413a98000000", + "x-ms-client-request-id" : "800bdd32-9c48-488b-b97b-63d175af32a5", + "Date" : "Tue, 04 May 2021 17:18:39 GMT" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/be836fb7be836fb73d189718b4f720f131384ed0aa/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "4a961c63-aa4e-419a-83cc-9c8fa6810bec", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "4c99f6cc-8003-00d3-4509-412a13000000", + "Body" : "deb3928e-5831-4e74-99e3-b0bf4ee37dccTue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAA48c2hglB1wE=Tue, 04 May 2021 17:18:39 GMT", + "x-ms-client-request-id" : "4a961c63-aa4e-419a-83cc-9c8fa6810bec", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/be836fb7be836fb73d189718b4f720f131384ed0aa/messages?peekonly=true", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "3cb872f7-24df-4e9f-a53c-c0bfbda2cd2c" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "6c1f5726-d003-0077-5209-4123b5000000", + "Body" : "deb3928e-5831-4e74-99e3-b0bf4ee37dccTue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMT0/wA=", + "x-ms-client-request-id" : "3cb872f7-24df-4e9f-a53c-c0bfbda2cd2c", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "be836fb7be836fb73d189718b4f720f131384ed0aa" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsEnqueueTimeToLive.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsEnqueueTimeToLive.json new file mode 100644 index 0000000000000..fc0653f4f1fab --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsEnqueueTimeToLive.json @@ -0,0 +1,45 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/6ae34de36ae34de33b425930a65e49dcbac94ef5a7", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "6434c8ec-920e-4a80-8ab1-4d705c18dc30" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "78b2341f-8003-0008-4109-41ec2e000000", + "x-ms-client-request-id" : "6434c8ec-920e-4a80-8ab1-4d705c18dc30", + "Date" : "Tue, 04 May 2021 17:18:38 GMT" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/6ae34de36ae34de33b425930a65e49dcbac94ef5a7/messages?visibilitytimeout=0&messagettl=2", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "31992a4e-c64a-46a7-bd80-ec5beb4746cb", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "7b738672-2003-002e-8009-41a436000000", + "Body" : "5b671ed3-5479-40fa-b0a7-f5ffc21f6c4aTue, 04 May 2021 17:18:38 GMTTue, 04 May 2021 17:18:40 GMTAgAAAAMAAAAAAAAA8oLzhQlB1wE=Tue, 04 May 2021 17:18:38 GMT", + "x-ms-client-request-id" : "31992a4e-c64a-46a7-bd80-ec5beb4746cb", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "6ae34de36ae34de33b425930a65e49dcbac94ef5a7" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsGetAccessPolicy.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsGetAccessPolicy.json new file mode 100644 index 0000000000000..68b17d4a2cc62 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsGetAccessPolicy.json @@ -0,0 +1,45 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/682a09fb682a09fb3ff8439891d28c5efd7c4cfda6", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "10990d10-aea0-46df-a714-cfb688bd8da3" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "ec6c6375-7003-00e8-8009-416fb7000000", + "x-ms-client-request-id" : "10990d10-aea0-46df-a714-cfb688bd8da3", + "Date" : "Tue, 04 May 2021 17:18:37 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/682a09fb682a09fb3ff8439891d28c5efd7c4cfda6?comp=acl", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "c97cbc61-8b84-4c49-a543-70147812af7a" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "7b738622-2003-002e-3309-41a436000000", + "Body" : "", + "x-ms-client-request-id" : "c97cbc61-8b84-4c49-a543-70147812af7a", + "Date" : "Tue, 04 May 2021 17:18:37 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "682a09fb682a09fb3ff8439891d28c5efd7c4cfda6" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsGetAccessPolicyError.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsGetAccessPolicyError.json new file mode 100644 index 0000000000000..6612d37b68b65 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsGetAccessPolicyError.json @@ -0,0 +1,26 @@ +{ + "networkCallRecords" : [ { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/460e9f2a460e9f2ac77297162acaa98202f445018f?comp=acl", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "081fa5e5-6b55-4181-bfcf-3f83e92dbb95" + }, + "Response" : { + "content-length" : "217", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "QueueNotFound", + "retry-after" : "0", + "StatusCode" : "404", + "x-ms-request-id" : "2b951102-0003-0006-4509-41c59e000000", + "Body" : "QueueNotFoundThe specified queue does not exist.\nRequestId:2b951102-0003-0006-4509-41c59e000000\nTime:2021-05-04T17:18:38.0762928Z", + "x-ms-client-request-id" : "081fa5e5-6b55-4181-bfcf-3f83e92dbb95", + "Date" : "Tue, 04 May 2021 17:18:37 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "460e9f2a460e9f2ac77297162acaa98202f445018f" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsGetProperties.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsGetProperties.json new file mode 100644 index 0000000000000..75df9c8caf6cd --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsGetProperties.json @@ -0,0 +1,45 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/43bb408443bb4084e0560666c42d1c4514f645929f", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "b27abdd7-267d-4319-b7d0-d1700747059c" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "2733c180-b003-00d8-2709-41d178000000", + "x-ms-client-request-id" : "b27abdd7-267d-4319-b7d0-d1700747059c", + "Date" : "Tue, 04 May 2021 17:18:37 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/43bb408443bb4084e0560666c42d1c4514f645929f?comp=metadata", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "373c8e62-8fc2-49ce-8489-6286d3d955c5" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-meta-metadata" : "value", + "retry-after" : "0", + "x-ms-approximate-messages-count" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "895e7afa-6003-00a9-3e09-413753000000", + "x-ms-client-request-id" : "373c8e62-8fc2-49ce-8489-6286d3d955c5", + "Date" : "Tue, 04 May 2021 17:18:38 GMT" + }, + "Exception" : null + } ], + "variables" : [ "43bb408443bb4084e0560666c42d1c4514f645929f" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsGetPropertiesError.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsGetPropertiesError.json new file mode 100644 index 0000000000000..7d6c595d95480 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsGetPropertiesError.json @@ -0,0 +1,26 @@ +{ + "networkCallRecords" : [ { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/5131d02d5131d02db1e69037f50bece177bb40d691?comp=metadata", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "611cffa6-b91f-4115-8f5e-dd3999a1031f" + }, + "Response" : { + "content-length" : "217", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "QueueNotFound", + "retry-after" : "0", + "StatusCode" : "404", + "x-ms-request-id" : "4c99f6a6-8003-00d3-2509-412a13000000", + "Body" : "QueueNotFoundThe specified queue does not exist.\nRequestId:4c99f6a6-8003-00d3-2509-412a13000000\nTime:2021-05-04T17:18:37.4806240Z", + "x-ms-client-request-id" : "611cffa6-b91f-4115-8f5e-dd3999a1031f", + "Date" : "Tue, 04 May 2021 17:18:37 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "5131d02d5131d02db1e69037f50bece177bb40d691" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsGetQueueName.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsGetQueueName.json new file mode 100644 index 0000000000000..f6126ed46bc71 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsGetQueueName.json @@ -0,0 +1,4 @@ +{ + "networkCallRecords" : [ ], + "variables" : [ "f0bcae1cf0bcae1c92c273785eb155a3408e4833b4" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsGetQueueURL.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsGetQueueURL.json new file mode 100644 index 0000000000000..648b3dbcc588d --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsGetQueueURL.json @@ -0,0 +1,4 @@ +{ + "networkCallRecords" : [ ], + "variables" : [ "1426112c1426112c6274537795dc69af86d24c0cbf" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsIPBasedEndpoint.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsIPBasedEndpoint.json new file mode 100644 index 0000000000000..793fe396cb33d --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsIPBasedEndpoint.json @@ -0,0 +1,4 @@ +{ + "networkCallRecords" : [ ], + "variables" : [ "40483d9040483d90e0a87503580681128c4f47a884" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsPeekEncodedMessage.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsPeekEncodedMessage.json new file mode 100644 index 0000000000000..0c4642d99f301 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsPeekEncodedMessage.json @@ -0,0 +1,67 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/ae60629cae60629c4b961586bc8c288e00dc411c8a", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "b75bf4d4-a346-46ec-8f9a-46acb90790c8" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "2733c1ae-b003-00d8-4d09-41d178000000", + "x-ms-client-request-id" : "b75bf4d4-a346-46ec-8f9a-46acb90790c8", + "Date" : "Tue, 04 May 2021 17:18:38 GMT" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/ae60629cae60629c4b961586bc8c288e00dc411c8a/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "c792a219-e702-4177-bf0c-696c81b7d7d7", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "42b033ee-2003-0073-6d09-41aeb2000000", + "Body" : "da75075c-3461-428b-8e3c-384a2556f118Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAArjg5hglB1wE=Tue, 04 May 2021 17:18:39 GMT", + "x-ms-client-request-id" : "c792a219-e702-4177-bf0c-696c81b7d7d7", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/ae60629cae60629c4b961586bc8c288e00dc411c8a/messages?peekonly=true", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "5621ee68-b87a-4f3d-a5c5-c419b7451301" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "92671e84-a003-000f-5809-41804d000000", + "Body" : "da75075c-3461-428b-8e3c-384a2556f118Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMT0dGVzdCBtZXNzYWdl", + "x-ms-client-request-id" : "5621ee68-b87a-4f3d-a5c5-c419b7451301", + "Date" : "Tue, 04 May 2021 17:18:39 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "ae60629cae60629c4b961586bc8c288e00dc411c8a" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsPeekFailsWithoutHandler.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsPeekFailsWithoutHandler.json new file mode 100644 index 0000000000000..9b6c19743a0ca --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsPeekFailsWithoutHandler.json @@ -0,0 +1,67 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/483b1807483b1807d8844162cffa36e572864364ad", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "27ae4cfd-86f9-46a5-94df-d26a3cacdde7" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "e2d48e53-d003-00ce-3009-4127af000000", + "x-ms-client-request-id" : "27ae4cfd-86f9-46a5-94df-d26a3cacdde7", + "Date" : "Tue, 04 May 2021 17:18:38 GMT" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/483b1807483b1807d8844162cffa36e572864364ad/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "41523b3c-66cf-4f7c-ac6a-ef6bfe7c8856", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "80fe112f-6003-002f-7509-41fbea000000", + "Body" : "9617a252-9cb9-499c-902b-87729f273c89Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAAoRE5hglB1wE=Tue, 04 May 2021 17:18:39 GMT", + "x-ms-client-request-id" : "41523b3c-66cf-4f7c-ac6a-ef6bfe7c8856", + "Date" : "Tue, 04 May 2021 17:18:39 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/483b1807483b1807d8844162cffa36e572864364ad/messages?peekonly=true", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "31f4851c-1a37-4f49-a653-acf11070f83c" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "76d94385-e003-0021-1109-41d25a000000", + "Body" : "9617a252-9cb9-499c-902b-87729f273c89Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMT0test message", + "x-ms-client-request-id" : "31f4851c-1a37-4f49-a653-acf11070f83c", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "483b1807483b1807d8844162cffa36e572864364ad" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsPeekMessage.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsPeekMessage.json new file mode 100644 index 0000000000000..22d3f7b8385e6 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsPeekMessage.json @@ -0,0 +1,67 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/9e02d8a39e02d8a3ce36433366531f838f3e4bb49b", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "b3408d50-7fd2-47c8-a05f-5eb0b455aa77" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "26562d89-0003-004b-2709-410a72000000", + "x-ms-client-request-id" : "b3408d50-7fd2-47c8-a05f-5eb0b455aa77", + "Date" : "Tue, 04 May 2021 17:18:38 GMT" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/9e02d8a39e02d8a3ce36433366531f838f3e4bb49b/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "e708fd93-68b4-449b-96b6-cd45caab30b3", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "66d7cf51-0003-0074-0b09-41c2d1000000", + "Body" : "cf7e551d-f8ed-4a94-aacc-0f07c9b0d85eTue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAALrI3hglB1wE=Tue, 04 May 2021 17:18:39 GMT", + "x-ms-client-request-id" : "e708fd93-68b4-449b-96b6-cd45caab30b3", + "Date" : "Tue, 04 May 2021 17:18:39 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/9e02d8a39e02d8a3ce36433366531f838f3e4bb49b/messages?peekonly=true", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "06c73aa2-f18f-4c79-80a7-5b9fec9b6bae" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "4c99f6cf-8003-00d3-4709-412a13000000", + "Body" : "cf7e551d-f8ed-4a94-aacc-0f07c9b0d85eTue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMT0test message", + "x-ms-client-request-id" : "06c73aa2-f18f-4c79-80a7-5b9fec9b6bae", + "Date" : "Tue, 04 May 2021 17:18:39 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "9e02d8a39e02d8a3ce36433366531f838f3e4bb49b" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsPeekMessagesError.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsPeekMessagesError.json new file mode 100644 index 0000000000000..4c71ed9937481 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsPeekMessagesError.json @@ -0,0 +1,26 @@ +{ + "networkCallRecords" : [ { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/1dc3b00d1dc3b00d6e911344bd6ec00e23dc4e99aa/messages?peekonly=true", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "c7de9c1f-a86a-4d93-b9dd-55becb59c0d6" + }, + "Response" : { + "content-length" : "217", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "QueueNotFound", + "retry-after" : "0", + "StatusCode" : "404", + "x-ms-request-id" : "7c5d39d7-2003-0011-1409-416c95000000", + "Body" : "QueueNotFoundThe specified queue does not exist.\nRequestId:7c5d39d7-2003-0011-1409-416c95000000\nTime:2021-05-04T17:18:39.3009313Z", + "x-ms-client-request-id" : "c7de9c1f-a86a-4d93-b9dd-55becb59c0d6", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "1dc3b00d1dc3b00d6e911344bd6ec00e23dc4e99aa" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsPeekMultipleMessages.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsPeekMultipleMessages.json new file mode 100644 index 0000000000000..25db4a33adb58 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsPeekMultipleMessages.json @@ -0,0 +1,89 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/7b6a5b877b6a5b874bf1202698bbc01ca1b643e4bc", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "45ea6ec6-8ae4-471c-9cd6-560fd2893d94" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "ec6c63b0-7003-00e8-3309-416fb7000000", + "x-ms-client-request-id" : "45ea6ec6-8ae4-471c-9cd6-560fd2893d94", + "Date" : "Tue, 04 May 2021 17:18:38 GMT" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/7b6a5b877b6a5b874bf1202698bbc01ca1b643e4bc/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "242efcf7-7815-45c6-a08b-ca7090f5af9e", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "fde0432b-8003-00a1-0509-412d5c000000", + "Body" : "10168d2b-1110-44e8-b0aa-2f8200fffdccTue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAAgQRIhglB1wE=Tue, 04 May 2021 17:18:39 GMT", + "x-ms-client-request-id" : "242efcf7-7815-45c6-a08b-ca7090f5af9e", + "Date" : "Tue, 04 May 2021 17:18:39 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/7b6a5b877b6a5b874bf1202698bbc01ca1b643e4bc/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "085815da-8311-4fdc-9220-f635bd1cf955", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "d9b89a12-f003-0012-5b09-418df1000000", + "Body" : "11eca654-61b8-491d-8b74-d76b302b9ac1Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAAiXlahglB1wE=Tue, 04 May 2021 17:18:39 GMT", + "x-ms-client-request-id" : "085815da-8311-4fdc-9220-f635bd1cf955", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/7b6a5b877b6a5b874bf1202698bbc01ca1b643e4bc/messages?peekonly=true&numofmessages=2", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "c4618021-fdbd-4006-a3e4-b23e12b43137" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "4a84b508-a003-007d-6209-418702000000", + "Body" : "10168d2b-1110-44e8-b0aa-2f8200fffdccTue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMT0test message 111eca654-61b8-491d-8b74-d76b302b9ac1Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMT0test message 2", + "x-ms-client-request-id" : "c4618021-fdbd-4006-a3e4-b23e12b43137", + "Date" : "Tue, 04 May 2021 17:18:39 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "7b6a5b877b6a5b874bf1202698bbc01ca1b643e4bc" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsPeekTooManyMessage.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsPeekTooManyMessage.json new file mode 100644 index 0000000000000..6613829447297 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsPeekTooManyMessage.json @@ -0,0 +1,45 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/d0736cf7d0736cf7ff7950482070702a57cd4c499d", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "3051feeb-9c68-43a6-a5da-cfdd26155b5f" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "fa8afacd-b003-0013-4e09-41d22d000000", + "x-ms-client-request-id" : "3051feeb-9c68-43a6-a5da-cfdd26155b5f", + "Date" : "Tue, 04 May 2021 17:18:38 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/d0736cf7d0736cf7ff7950482070702a57cd4c499d/messages?peekonly=true&numofmessages=33", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "b0b5e141-1419-4749-a28c-64a53957f24f" + }, + "Response" : { + "content-length" : "456", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "OutOfRangeQueryParameterValue", + "retry-after" : "0", + "StatusCode" : "400", + "x-ms-request-id" : "d1814e5d-2003-00e5-8009-41a763000000", + "Body" : "OutOfRangeQueryParameterValueOne of the query parameters specified in the request URI is outside the permissible range.\nRequestId:d1814e5d-2003-00e5-8009-41a763000000\nTime:2021-05-04T17:18:39.3993636Znumofmessages33132", + "x-ms-client-request-id" : "b0b5e141-1419-4749-a28c-64a53957f24f", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "d0736cf7d0736cf7ff7950482070702a57cd4c499d" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsPeekWithHandler.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsPeekWithHandler.json new file mode 100644 index 0000000000000..60f9a6276fcc5 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsPeekWithHandler.json @@ -0,0 +1,89 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/63f09e6a63f09e6ae9d640312cdbf752d5784a0e87", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "572755d8-0d4d-463d-90d5-929787c35fa0" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "90ba11c1-f003-00bb-6609-414c83000000", + "x-ms-client-request-id" : "572755d8-0d4d-463d-90d5-929787c35fa0", + "Date" : "Tue, 04 May 2021 17:18:38 GMT" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/63f09e6a63f09e6ae9d640312cdbf752d5784a0e87/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "8359cafa-ee8e-4406-9bbe-83761d6f2940", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "946d049c-0003-00dd-6a09-4103a3000000", + "Body" : "1b86141e-457f-42a9-b65c-5a77fb7d2c72Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAArzg5hglB1wE=Tue, 04 May 2021 17:18:39 GMT", + "x-ms-client-request-id" : "8359cafa-ee8e-4406-9bbe-83761d6f2940", + "Date" : "Tue, 04 May 2021 17:18:39 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/63f09e6a63f09e6ae9d640312cdbf752d5784a0e87/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "3f6a3546-dd0b-4e69-bc9a-b45b112189c8", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "d99b06b5-6003-004d-2609-4139cd000000", + "Body" : "44f2b705-f05b-4875-8c74-2ce6b0b8e248Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAAwMdIhglB1wE=Tue, 04 May 2021 17:18:39 GMT", + "x-ms-client-request-id" : "3f6a3546-dd0b-4e69-bc9a-b45b112189c8", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/63f09e6a63f09e6ae9d640312cdbf752d5784a0e87/messages?peekonly=true&numofmessages=10", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "55ea01d0-a229-4839-955a-9a827ffd9afe" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "34fa7b39-1003-0078-6709-4155d9000000", + "Body" : "1b86141e-457f-42a9-b65c-5a77fb7d2c72Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMT0test message44f2b705-f05b-4875-8c74-2ce6b0b8e248Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMT0dGVzdCBtZXNzYWdl", + "x-ms-client-request-id" : "55ea01d0-a229-4839-955a-9a827ffd9afe", + "Date" : "Tue, 04 May 2021 17:18:39 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "63f09e6a63f09e6ae9d640312cdbf752d5784a0e87" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsPeekWithHandlerException.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsPeekWithHandlerException.json new file mode 100644 index 0000000000000..09eafa916ef98 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsPeekWithHandlerException.json @@ -0,0 +1,89 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/e461e61ae461e61ac9301696859d9b63e0a241ca89", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "b01b4b35-f020-4271-876e-224eef625bf1" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "af9d24f1-5003-0046-2f09-41c2a6000000", + "x-ms-client-request-id" : "b01b4b35-f020-4271-876e-224eef625bf1", + "Date" : "Tue, 04 May 2021 17:18:39 GMT" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/e461e61ae461e61ac9301696859d9b63e0a241ca89/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "358d3f16-c420-46fc-b5ce-e4e7346a7e52", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "10a7c4f4-c003-0044-1909-417c1e000000", + "Body" : "7cfd58c8-43aa-4763-b842-ced5495f9972Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAA0a05hglB1wE=Tue, 04 May 2021 17:18:39 GMT", + "x-ms-client-request-id" : "358d3f16-c420-46fc-b5ce-e4e7346a7e52", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/e461e61ae461e61ac9301696859d9b63e0a241ca89/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "0b720c11-646c-4033-9477-f2265986584c", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "e871154f-4003-0081-7409-4156fb000000", + "Body" : "d2fd848f-4b2d-4927-b249-3bcecad626f9Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAAv8dIhglB1wE=Tue, 04 May 2021 17:18:39 GMT", + "x-ms-client-request-id" : "0b720c11-646c-4033-9477-f2265986584c", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/e461e61ae461e61ac9301696859d9b63e0a241ca89/messages?peekonly=true&numofmessages=10", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "6138a7fa-13c9-4927-b08f-a330130b225a" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "beffcc43-b003-00c8-2009-411410000000", + "Body" : "7cfd58c8-43aa-4763-b842-ced5495f9972Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMT0test messaged2fd848f-4b2d-4927-b249-3bcecad626f9Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMT0dGVzdCBtZXNzYWdl", + "x-ms-client-request-id" : "6138a7fa-13c9-4927-b08f-a330130b225a", + "Date" : "Tue, 04 May 2021 17:18:39 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "e461e61ae461e61ac9301696859d9b63e0a241ca89" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsPeekWithSyncHandler.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsPeekWithSyncHandler.json new file mode 100644 index 0000000000000..07f8de75e698d --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsPeekWithSyncHandler.json @@ -0,0 +1,110 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/a745ffaca745fface328148338ec5686f36c4945a0", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "1591a2f8-fc81-4ba4-bae9-0983a4fda397" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "60ea4cc4-d003-002a-3609-412931000000", + "x-ms-client-request-id" : "1591a2f8-fc81-4ba4-bae9-0983a4fda397", + "Date" : "Tue, 04 May 2021 17:18:38 GMT" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/a745ffaca745fface328148338ec5686f36c4945a0/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "f28af718-b3ad-469c-abaf-4557f87484e9", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "3c7b17bf-c003-0054-4609-41b976000000", + "Body" : "96d59eb6-8373-4f82-b94c-9814ae397015Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAA3QhGhglB1wE=Tue, 04 May 2021 17:18:39 GMT", + "x-ms-client-request-id" : "f28af718-b3ad-469c-abaf-4557f87484e9", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/a745ffaca745fface328148338ec5686f36c4945a0/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "a3ca164e-03e1-459e-8b15-8991e7e869e9", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "2733c1c3-b003-00d8-6009-41d178000000", + "Body" : "47126fc9-681e-45fc-8bcf-9017040b5717Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAAj7pghglB1wE=Tue, 04 May 2021 17:18:39 GMT", + "x-ms-client-request-id" : "a3ca164e-03e1-459e-8b15-8991e7e869e9", + "Date" : "Tue, 04 May 2021 17:18:39 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/a745ffaca745fface328148338ec5686f36c4945a0/messages?peekonly=true&numofmessages=10", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "b0c5f7d8-3fd2-475b-9277-ac7c5f1ee20e" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "ddc2facb-e003-0053-1a09-41d515000000", + "Body" : "96d59eb6-8373-4f82-b94c-9814ae397015Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMT0test message47126fc9-681e-45fc-8bcf-9017040b5717Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMT0dGVzdCBtZXNzYWdl", + "x-ms-client-request-id" : "b0c5f7d8-3fd2-475b-9277-ac7c5f1ee20e", + "Date" : "Tue, 04 May 2021 17:18:39 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/a745ffaca745fface328148338ec5686f36c4945a0?comp=metadata", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "2800c0e4-b31e-4ff9-9a53-3299583e3484" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "x-ms-approximate-messages-count" : "2", + "StatusCode" : "200", + "x-ms-request-id" : "6c1f572d-d003-0077-5709-4123b5000000", + "x-ms-client-request-id" : "2800c0e4-b31e-4ff9-9a53-3299583e3484", + "Date" : "Tue, 04 May 2021 17:18:38 GMT" + }, + "Exception" : null + } ], + "variables" : [ "a745ffaca745fface328148338ec5686f36c4945a0" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsPerCallPolicy.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsPerCallPolicy.json new file mode 100644 index 0000000000000..094b889093735 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsPerCallPolicy.json @@ -0,0 +1,42 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/faba6b86faba6b861726599399c7c16afe4f41c59f", + "Headers" : { + "x-ms-version" : "2017-11-09", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "22159aaa-18b3-421b-8f0e-e39fe18fba7c" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2017-11-09", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "76d942ff-e003-0021-1c09-41d25a000000", + "Date" : "Tue, 04 May 2021 17:18:36 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/faba6b86faba6b861726599399c7c16afe4f41c59f?comp=metadata", + "Headers" : { + "x-ms-version" : "2017-11-09", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "782e03af-b2a0-4c4e-b4e7-8bb9c9fd0acf" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2017-11-09", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "x-ms-approximate-messages-count" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "d9b89982-f003-0012-5c09-418df1000000", + "Date" : "Tue, 04 May 2021 17:18:36 GMT" + }, + "Exception" : null + } ], + "variables" : [ "faba6b86faba6b8617217050cb3e08efce3a47db9f", "faba6b86faba6b861726599399c7c16afe4f41c59f" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsSetAccessPolicy.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsSetAccessPolicy.json new file mode 100644 index 0000000000000..14ffdecc276e3 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsSetAccessPolicy.json @@ -0,0 +1,65 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/a634f3d7a634f3d7d5f51092ecbef94b3f854d8599", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "5190dec3-83f8-4532-862d-8ce05a69e869" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "10a7c4cc-c003-0044-7709-417c1e000000", + "x-ms-client-request-id" : "5190dec3-83f8-4532-862d-8ce05a69e869", + "Date" : "Tue, 04 May 2021 17:18:37 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/a634f3d7a634f3d7d5f51092ecbef94b3f854d8599?comp=acl", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "7dfbb3a8-6ea6-4fc4-a913-bfc7ecc710ab", + "Content-Type" : "application/xml" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "2b95110a-0003-0006-4c09-41c59e000000", + "x-ms-client-request-id" : "7dfbb3a8-6ea6-4fc4-a913-bfc7ecc710ab", + "Date" : "Tue, 04 May 2021 17:18:37 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/a634f3d7a634f3d7d5f51092ecbef94b3f854d8599?comp=acl", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "9116ebd6-f183-4672-82cf-397877b6960a" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "6c1f5718-d003-0077-4609-4123b5000000", + "Body" : "testpermission2000-01-01T00:00:00.0000000Z2020-01-01T00:00:00.0000000Zraup", + "x-ms-client-request-id" : "9116ebd6-f183-4672-82cf-397877b6960a", + "Date" : "Tue, 04 May 2021 17:18:37 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "a634f3d7a634f3d7d5f51092ecbef94b3f854d8599" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsSetAndClearMetadata[0].json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsSetAndClearMetadata[0].json new file mode 100644 index 0000000000000..c6b1d81e7530b --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsSetAndClearMetadata[0].json @@ -0,0 +1,85 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/aec78e20aec78e2074207560b81bc5a972894a68ba", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "808c09ec-d91a-43d5-aed4-67faa8b5d5a0" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "fa8afa97-b003-0013-2009-41d22d000000", + "x-ms-client-request-id" : "808c09ec-d91a-43d5-aed4-67faa8b5d5a0", + "Date" : "Tue, 04 May 2021 17:18:36 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/aec78e20aec78e2074207560b81bc5a972894a68ba?comp=metadata", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "7bb7502a-7022-4bca-b66f-6442a89f6208" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "x-ms-approximate-messages-count" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "4c99f6ae-8003-00d3-2c09-412a13000000", + "x-ms-client-request-id" : "7bb7502a-7022-4bca-b66f-6442a89f6208", + "Date" : "Tue, 04 May 2021 17:18:37 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/aec78e20aec78e2074207560b81bc5a972894a68ba?comp=metadata", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "c4d3c524-f7dc-4a0e-863f-6e542ce7841f" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "fde042cb-8003-00a1-3509-412d5c000000", + "x-ms-client-request-id" : "c4d3c524-f7dc-4a0e-863f-6e542ce7841f", + "Date" : "Tue, 04 May 2021 17:18:37 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/aec78e20aec78e2074207560b81bc5a972894a68ba?comp=metadata", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "24ef5ed2-e2cd-4892-b87b-fcf105c4fc9b" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-meta-metadata" : "value", + "retry-after" : "0", + "x-ms-approximate-messages-count" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "73eb55f1-2003-003e-2709-41615e000000", + "x-ms-client-request-id" : "24ef5ed2-e2cd-4892-b87b-fcf105c4fc9b", + "Date" : "Tue, 04 May 2021 17:18:37 GMT" + }, + "Exception" : null + } ], + "variables" : [ "aec78e20aec78e2074207560b81bc5a972894a68ba" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsSetAndClearMetadata[1].json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsSetAndClearMetadata[1].json new file mode 100644 index 0000000000000..718a93a09cebc --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsSetAndClearMetadata[1].json @@ -0,0 +1,86 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/b7dcbf61b7dcbf611d592653096924262c29475e8c", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "40848b00-8266-4899-b3a6-7372f09b1b31" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "af9d245e-5003-0046-2709-41c2a6000000", + "x-ms-client-request-id" : "40848b00-8266-4899-b3a6-7372f09b1b31", + "Date" : "Tue, 04 May 2021 17:18:37 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/b7dcbf61b7dcbf611d592653096924262c29475e8c?comp=metadata", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "98f4296b-31b2-4f19-91e7-e1b2a3e7802e" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "x-ms-approximate-messages-count" : "0", + "x-ms-meta-metadata1" : "value", + "StatusCode" : "200", + "x-ms-request-id" : "beffcc0f-b003-00c8-7509-411410000000", + "x-ms-client-request-id" : "98f4296b-31b2-4f19-91e7-e1b2a3e7802e", + "Date" : "Tue, 04 May 2021 17:18:37 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/b7dcbf61b7dcbf611d592653096924262c29475e8c?comp=metadata", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "72d3b909-2439-41c4-a676-4721b5f8d031" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "beffcc13-b003-00c8-7809-411410000000", + "x-ms-client-request-id" : "72d3b909-2439-41c4-a676-4721b5f8d031", + "Date" : "Tue, 04 May 2021 17:18:37 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/b7dcbf61b7dcbf611d592653096924262c29475e8c?comp=metadata", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "54d52d79-7f1f-4bdd-af1b-5630078bc837" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-meta-metadata" : "value", + "retry-after" : "0", + "x-ms-approximate-messages-count" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "946d047a-0003-00dd-5209-4103a3000000", + "x-ms-client-request-id" : "54d52d79-7f1f-4bdd-af1b-5630078bc837", + "Date" : "Tue, 04 May 2021 17:18:38 GMT" + }, + "Exception" : null + } ], + "variables" : [ "b7dcbf61b7dcbf611d592653096924262c29475e8c" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsSetAndClearMetadata[2].json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsSetAndClearMetadata[2].json new file mode 100644 index 0000000000000..fd9e61b780911 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsSetAndClearMetadata[2].json @@ -0,0 +1,85 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/9cf1eca29cf1eca2dc085963045cc43c24954a4fb5", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "8ecebef8-1ab6-4bc8-8793-23b0eb238754" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "895e7a7c-6003-00a9-4109-413753000000", + "x-ms-client-request-id" : "8ecebef8-1ab6-4bc8-8793-23b0eb238754", + "Date" : "Tue, 04 May 2021 17:18:37 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/9cf1eca29cf1eca2dc085963045cc43c24954a4fb5?comp=metadata", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "738aa0ca-4a96-4608-a8b1-929b811b3d75" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "x-ms-approximate-messages-count" : "0", + "x-ms-meta-metadata1" : "value", + "StatusCode" : "200", + "x-ms-request-id" : "73eb55bc-2003-003e-7709-41615e000000", + "x-ms-client-request-id" : "738aa0ca-4a96-4608-a8b1-929b811b3d75", + "Date" : "Tue, 04 May 2021 17:18:37 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/9cf1eca29cf1eca2dc085963045cc43c24954a4fb5?comp=metadata", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "c3eb8b0e-cbe7-49d8-827a-b75d4448e5c3" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "fde042e8-8003-00a1-4d09-412d5c000000", + "x-ms-client-request-id" : "c3eb8b0e-cbe7-49d8-827a-b75d4448e5c3", + "Date" : "Tue, 04 May 2021 17:18:38 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/9cf1eca29cf1eca2dc085963045cc43c24954a4fb5?comp=metadata", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "4467763f-e7be-473d-9db8-a495f8ee5c2c" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "x-ms-approximate-messages-count" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "433a2fe8-e003-00a7-6b09-411ee3000000", + "x-ms-client-request-id" : "4467763f-e7be-473d-9db8-a495f8ee5c2c", + "Date" : "Tue, 04 May 2021 17:18:38 GMT" + }, + "Exception" : null + } ], + "variables" : [ "9cf1eca29cf1eca2dc085963045cc43c24954a4fb5" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsSetAndClearMetadata[3].json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsSetAndClearMetadata[3].json new file mode 100644 index 0000000000000..884c9a4ceb032 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsSetAndClearMetadata[3].json @@ -0,0 +1,86 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/85eadde385eadde3025654736a26efbc80704a7e8d", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "a6bc06cf-3f06-4ba2-8753-4fe3cc3dd3fd" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "35bf7aab-a003-00d4-3809-414670000000", + "x-ms-client-request-id" : "a6bc06cf-3f06-4ba2-8753-4fe3cc3dd3fd", + "Date" : "Tue, 04 May 2021 17:18:38 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/85eadde385eadde3025654736a26efbc80704a7e8d?comp=metadata", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "10e60c4e-2e90-49a3-93ea-6c66e1ab34cc" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-meta-metadata" : "value", + "retry-after" : "0", + "x-ms-approximate-messages-count" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "3c7b17b6-c003-0054-3e09-41b976000000", + "x-ms-client-request-id" : "10e60c4e-2e90-49a3-93ea-6c66e1ab34cc", + "Date" : "Tue, 04 May 2021 17:18:38 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/85eadde385eadde3025654736a26efbc80704a7e8d?comp=metadata", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "2b9dc824-3aac-4733-9535-0482d39429f3" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "5ef6fb63-8003-0055-3909-41e6aa000000", + "x-ms-client-request-id" : "2b9dc824-3aac-4733-9535-0482d39429f3", + "Date" : "Tue, 04 May 2021 17:18:38 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/85eadde385eadde3025654736a26efbc80704a7e8d?comp=metadata", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "e1dbf6fa-ac51-43a2-9df9-55a0ad3ab09d" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-meta-metadata" : "value", + "retry-after" : "0", + "x-ms-approximate-messages-count" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "ec6c63bf-7003-00e8-4109-416fb7000000", + "x-ms-client-request-id" : "e1dbf6fa-ac51-43a2-9df9-55a0ad3ab09d", + "Date" : "Tue, 04 May 2021 17:18:39 GMT" + }, + "Exception" : null + } ], + "variables" : [ "85eadde385eadde3025654736a26efbc80704a7e8d" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsSetAndClearMetadata[4].json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsSetAndClearMetadata[4].json new file mode 100644 index 0000000000000..8fd2b32780882 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsSetAndClearMetadata[4].json @@ -0,0 +1,84 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/caab4b24caab4b24da867967130e7b61acfa4ab5b5", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "25e32e2b-3896-4d2f-b34a-aa74908f4acb" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "90ba11ba-f003-00bb-6009-414c83000000", + "x-ms-client-request-id" : "25e32e2b-3896-4d2f-b34a-aa74908f4acb", + "Date" : "Tue, 04 May 2021 17:18:38 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/caab4b24caab4b24da867967130e7b61acfa4ab5b5?comp=metadata", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "c0a40c18-2ae2-4e7e-ace5-ebde4eddaf73" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "x-ms-approximate-messages-count" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "6980d243-1003-0035-0709-419a35000000", + "x-ms-client-request-id" : "c0a40c18-2ae2-4e7e-ace5-ebde4eddaf73", + "Date" : "Tue, 04 May 2021 17:18:39 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/caab4b24caab4b24da867967130e7b61acfa4ab5b5?comp=metadata", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "3d5eb7df-17c7-4b58-ad42-8cf28b154a4f" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "721d910c-4003-005a-7c09-4190c6000000", + "x-ms-client-request-id" : "3d5eb7df-17c7-4b58-ad42-8cf28b154a4f", + "Date" : "Tue, 04 May 2021 17:18:38 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/caab4b24caab4b24da867967130e7b61acfa4ab5b5?comp=metadata", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "e83ec46d-8810-4c99-8056-306318b37a21" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "x-ms-approximate-messages-count" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "5ef6fb70-8003-0055-4509-41e6aa000000", + "x-ms-client-request-id" : "e83ec46d-8810-4c99-8056-306318b37a21", + "Date" : "Tue, 04 May 2021 17:18:38 GMT" + }, + "Exception" : null + } ], + "variables" : [ "caab4b24caab4b24da867967130e7b61acfa4ab5b5" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsSetInvalidAccessPolicy.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsSetInvalidAccessPolicy.json new file mode 100644 index 0000000000000..86565d782b3dd --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsSetInvalidAccessPolicy.json @@ -0,0 +1,46 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/fe576587fe576587a4b804457c3c94faf753462fa2", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "ff5ad50d-7b12-47fd-9636-7eeb835919da" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "53662498-4003-00dc-6609-415c7f000000", + "x-ms-client-request-id" : "ff5ad50d-7b12-47fd-9636-7eeb835919da", + "Date" : "Tue, 04 May 2021 17:18:38 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/fe576587fe576587a4b804457c3c94faf753462fa2?comp=acl", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "cde6cd78-114e-4c12-903a-80df5ac41453", + "Content-Type" : "application/xml" + }, + "Response" : { + "content-length" : "371", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "InvalidXmlDocument", + "retry-after" : "0", + "StatusCode" : "400", + "x-ms-request-id" : "ea8df1b8-5003-009d-7809-41049b000000", + "Body" : "InvalidXmlDocumentXML specified is not syntactically valid.\nRequestId:ea8df1b8-5003-009d-7809-41049b000000\nTime:2021-05-04T17:18:38.7476249Z1304Signed identifier ID cannot be empty or over 64 characters in length", + "x-ms-client-request-id" : "cde6cd78-114e-4c12-903a-80df5ac41453", + "Date" : "Tue, 04 May 2021 17:18:37 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "fe576587fe576587a4b804457c3c94faf753462fa2" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsSetInvalidMeta[0].json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsSetInvalidMeta[0].json new file mode 100644 index 0000000000000..040db16851106 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsSetInvalidMeta[0].json @@ -0,0 +1,45 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/a9cef76fa9cef76fcf517936658870eeb9b24ac694", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "62abf1fa-36ca-4152-b4be-f35d9768212b" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "4a84b4b5-a003-007d-1909-418702000000", + "x-ms-client-request-id" : "62abf1fa-36ca-4152-b4be-f35d9768212b", + "Date" : "Tue, 04 May 2021 17:18:37 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/a9cef76fa9cef76fcf517936658870eeb9b24ac694?comp=metadata", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "9b520853-ccdf-4a23-a7c3-3720f8434af6" + }, + "Response" : { + "content-length" : "260", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "InvalidMetadata", + "retry-after" : "0", + "StatusCode" : "400", + "x-ms-request-id" : "b050af81-6003-00cb-6e09-41f574000000", + "Body" : "InvalidMetadataThe metadata specified is invalid. It has characters that are not permitted.\nRequestId:b050af81-6003-00cb-6e09-41f574000000\nTime:2021-05-04T17:18:38.2001894Z", + "x-ms-client-request-id" : "9b520853-ccdf-4a23-a7c3-3720f8434af6", + "Date" : "Tue, 04 May 2021 17:18:37 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "a9cef76fa9cef76fcf517936658870eeb9b24ac694" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsSetInvalidMeta[1].json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsSetInvalidMeta[1].json new file mode 100644 index 0000000000000..0e8f6c5e55b85 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsSetInvalidMeta[1].json @@ -0,0 +1,45 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/b0d5c62eb0d5c62e7ea721463dccf50338a24c5aa8", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "9a39699b-3f80-4de3-946b-39004dbe2617" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "af9d2487-5003-0046-4e09-41c2a6000000", + "x-ms-client-request-id" : "9a39699b-3f80-4de3-946b-39004dbe2617", + "Date" : "Tue, 04 May 2021 17:18:37 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/b0d5c62eb0d5c62e7ea721463dccf50338a24c5aa8?comp=metadata", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "9c92c9f2-e8fc-48dd-aa2c-1457c72ddd69" + }, + "Response" : { + "content-length" : "260", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "InvalidMetadata", + "retry-after" : "0", + "StatusCode" : "400", + "x-ms-request-id" : "92671e63-a003-000f-3c09-41804d000000", + "Body" : "InvalidMetadataThe metadata specified is invalid. It has characters that are not permitted.\nRequestId:92671e63-a003-000f-3c09-41804d000000\nTime:2021-05-04T17:18:38.6292502Z", + "x-ms-client-request-id" : "9c92c9f2-e8fc-48dd-aa2c-1457c72ddd69", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "b0d5c62eb0d5c62e7ea721463dccf50338a24c5aa8" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsSetInvalidMeta[2].json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsSetInvalidMeta[2].json new file mode 100644 index 0000000000000..ce500adb1048f --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsSetInvalidMeta[2].json @@ -0,0 +1,45 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/9bf895ed9bf895ed16345499373400086c63438899", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "c3663f89-77fd-4d79-bc38-5dd3777a020b" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "90ba11a9-f003-00bb-5109-414c83000000", + "x-ms-client-request-id" : "c3663f89-77fd-4d79-bc38-5dd3777a020b", + "Date" : "Tue, 04 May 2021 17:18:37 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/9bf895ed9bf895ed16345499373400086c63438899?comp=metadata", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "c8135e1c-e710-4599-be90-613bae92866a" + }, + "Response" : { + "content-length" : "278", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "EmptyMetadataKey", + "retry-after" : "0", + "StatusCode" : "400", + "x-ms-request-id" : "90ba11b0-f003-00bb-5709-414c83000000", + "Body" : "EmptyMetadataKeyThe key for one of the metadata key-value pairs is empty.\nRequestId:90ba11b0-f003-00bb-5709-414c83000000\nTime:2021-05-04T17:18:38.4817814Zvalue", + "x-ms-client-request-id" : "c8135e1c-e710-4599-be90-613bae92866a", + "Date" : "Tue, 04 May 2021 17:18:37 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "9bf895ed9bf895ed16345499373400086c63438899" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsSetMetadataQueueError.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsSetMetadataQueueError.json new file mode 100644 index 0000000000000..fb4cc14b9fee5 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsSetMetadataQueueError.json @@ -0,0 +1,26 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/73eaeb3473eaeb34d0110570badecdb2c9fd4d63b8?comp=metadata", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "ce729a7b-7540-4a82-8e61-a42715bad34d" + }, + "Response" : { + "content-length" : "217", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "QueueNotFound", + "retry-after" : "0", + "StatusCode" : "404", + "x-ms-request-id" : "ec6c635e-7003-00e8-6c09-416fb7000000", + "Body" : "QueueNotFoundThe specified queue does not exist.\nRequestId:ec6c635e-7003-00e8-6c09-416fb7000000\nTime:2021-05-04T17:18:37.6139725Z", + "x-ms-client-request-id" : "ce729a7b-7540-4a82-8e61-a42715bad34d", + "Date" : "Tue, 04 May 2021 17:18:37 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "73eaeb3473eaeb34d0110570badecdb2c9fd4d63b8" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsSetMultipleAccessPolicies.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsSetMultipleAccessPolicies.json new file mode 100644 index 0000000000000..36e29f054718a --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsSetMultipleAccessPolicies.json @@ -0,0 +1,65 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/26ef036e26ef036e91c9435979dc9cd9a0c547fb90", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "4a3f6928-e545-4468-aee3-1ee74e81153e" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "6c1f5712-d003-0077-4109-4123b5000000", + "x-ms-client-request-id" : "4a3f6928-e545-4468-aee3-1ee74e81153e", + "Date" : "Tue, 04 May 2021 17:18:37 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/26ef036e26ef036e91c9435979dc9cd9a0c547fb90?comp=acl", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "5f7dee28-4566-4c72-8dfc-cbbe03b6d400", + "Content-Type" : "application/xml" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "78b23422-8003-0008-4309-41ec2e000000", + "x-ms-client-request-id" : "5f7dee28-4566-4c72-8dfc-cbbe03b6d400", + "Date" : "Tue, 04 May 2021 17:18:38 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/26ef036e26ef036e91c9435979dc9cd9a0c547fb90?comp=acl", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "c45dae4a-0604-4c38-85f5-0f6df047ad80" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "2733c1a6-b003-00d8-4609-41d178000000", + "Body" : "policy02000-01-01T00:00:00.0000000Z2020-01-01T00:00:00.0000000Zrpolicy12000-01-01T00:00:00.0000000Z2020-01-01T00:00:00.0000000Zrpolicy22000-01-01T00:00:00.0000000Z2020-01-01T00:00:00.0000000Zr", + "x-ms-client-request-id" : "c45dae4a-0604-4c38-85f5-0f6df047ad80", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "26ef036e26ef036e91c9435979dc9cd9a0c547fb90" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsSetTooManyAccessPolicies.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsSetTooManyAccessPolicies.json new file mode 100644 index 0000000000000..767b02fe7afe7 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsSetTooManyAccessPolicies.json @@ -0,0 +1,46 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/98a41dd798a41dd7ae5745834b0a95f689cf461183", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "7fd7a9df-b5e9-4016-81be-a512932d9577" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "66d7cf38-0003-0074-7709-41c2d1000000", + "x-ms-client-request-id" : "7fd7a9df-b5e9-4016-81be-a512932d9577", + "Date" : "Tue, 04 May 2021 17:18:38 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/98a41dd798a41dd7ae5745834b0a95f689cf461183?comp=acl", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "f4518c7c-585c-43bc-8ad9-a867195e831c", + "Content-Type" : "application/xml" + }, + "Response" : { + "content-length" : "294", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "InvalidXmlDocument", + "retry-after" : "0", + "StatusCode" : "400", + "x-ms-request-id" : "b7beabf0-a003-0052-1809-418ac9000000", + "Body" : "InvalidXmlDocumentXML specified is not syntactically valid.\nRequestId:b7beabf0-a003-0052-1809-418ac9000000\nTime:2021-05-04T17:18:38.8599457Z00", + "x-ms-client-request-id" : "f4518c7c-585c-43bc-8ad9-a867195e831c", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "98a41dd798a41dd7ae5745834b0a95f689cf461183" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsUpdateMessage.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsUpdateMessage.json new file mode 100644 index 0000000000000..a5dc7c9fbf14b --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsUpdateMessage.json @@ -0,0 +1,111 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/69b4d28669b4d2868ea537184294baace20b49f4a2", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "3446e308-231e-49db-845c-60369b35860d" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "433a3016-e003-00a7-1209-411ee3000000", + "x-ms-client-request-id" : "3446e308-231e-49db-845c-60369b35860d", + "Date" : "Tue, 04 May 2021 17:18:39 GMT" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/69b4d28669b4d2868ea537184294baace20b49f4a2/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "21fdf261-c1e2-4a87-8478-b3079e4eb08d", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "433a301e-e003-00a7-1909-411ee3000000", + "Body" : "17bab52b-6e6c-428a-9265-f6b95400a8d6Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAA4IpbhglB1wE=Tue, 04 May 2021 17:18:39 GMT", + "x-ms-client-request-id" : "21fdf261-c1e2-4a87-8478-b3079e4eb08d", + "Date" : "Tue, 04 May 2021 17:18:39 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/69b4d28669b4d2868ea537184294baace20b49f4a2/messages?numofmessages=1", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "20661d0c-bd7c-4dee-a21e-f0c7ae306392" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "8e697fdd-c003-007b-7a09-41b4bd000000", + "Body" : "17bab52b-6e6c-428a-9265-f6b95400a8d6Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAAzjpJmAlB1wE=Tue, 04 May 2021 17:19:09 GMT1test message before update", + "x-ms-client-request-id" : "20661d0c-bd7c-4dee-a21e-f0c7ae306392", + "Date" : "Tue, 04 May 2021 17:18:39 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/69b4d28669b4d2868ea537184294baace20b49f4a2/messages/17bab52b-6e6c-428a-9265-f6b95400a8d6?popreceipt=AgAAAAMAAAAAAAAAzjpJmAlB1wE%3D&visibilitytimeout=1", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "c37fc63f-4fda-46a8-8cf1-612e7f1b5b2c", + "Content-Type" : "application/xml" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-time-next-visible" : "Tue, 04 May 2021 17:18:40 GMT", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "b77ad6fb-3003-00e9-7509-41306b000000", + "x-ms-popreceipt" : "AwAAAAMAAAAAAAAAqpoNhwlB1wEBAAAA", + "x-ms-client-request-id" : "c37fc63f-4fda-46a8-8cf1-612e7f1b5b2c", + "Date" : "Tue, 04 May 2021 17:18:39 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/69b4d28669b4d2868ea537184294baace20b49f4a2/messages?peekonly=true", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "cb6dcdd8-8f68-4936-8eed-df5f58d66d17" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "946d04ee-0003-00dd-2909-4103a3000000", + "Body" : "17bab52b-6e6c-428a-9265-f6b95400a8d6Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMT1Updated test message", + "x-ms-client-request-id" : "cb6dcdd8-8f68-4936-8eed-df5f58d66d17", + "Date" : "Tue, 04 May 2021 17:18:41 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "69b4d28669b4d2868ea537184294baace20b49f4a2" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsUpdateMessageInvalidArgs[0].json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsUpdateMessageInvalidArgs[0].json new file mode 100644 index 0000000000000..d640f152fb55d --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsUpdateMessageInvalidArgs[0].json @@ -0,0 +1,90 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/4dd1d2a84dd1d2a8c9e031932aa3c062fc4446eba8", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "5330d1af-5921-4eea-929d-9ae68d78871b" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "d9b899db-f003-0012-2809-418df1000000", + "x-ms-client-request-id" : "5330d1af-5921-4eea-929d-9ae68d78871b", + "Date" : "Tue, 04 May 2021 17:18:38 GMT" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/4dd1d2a84dd1d2a8c9e031932aa3c062fc4446eba8/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "11613c59-3a5e-4834-a933-9a2efc13db9f", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "946d048c-0003-00dd-5f09-4103a3000000", + "Body" : "4ac9e97b-459c-499e-8d2c-2fececd405d4Tue, 04 May 2021 17:18:38 GMTTue, 11 May 2021 17:18:38 GMTAgAAAAMAAAAAAAAAXvz6hQlB1wE=Tue, 04 May 2021 17:18:38 GMT", + "x-ms-client-request-id" : "11613c59-3a5e-4834-a933-9a2efc13db9f", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/4dd1d2a84dd1d2a8c9e031932aa3c062fc4446eba8/messages?numofmessages=1", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "8c0f1fac-002a-4de1-a577-abfb508e14af" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "5ef6fb5d-8003-0055-3409-41e6aa000000", + "Body" : "4ac9e97b-459c-499e-8d2c-2fececd405d4Tue, 04 May 2021 17:18:38 GMTTue, 11 May 2021 17:18:38 GMTAgAAAAMAAAAAAAAAqNfvlwlB1wE=Tue, 04 May 2021 17:19:09 GMT1test message before update", + "x-ms-client-request-id" : "8c0f1fac-002a-4de1-a577-abfb508e14af", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/4dd1d2a84dd1d2a8c9e031932aa3c062fc4446eba8/messages/4ac9e97b-459c-499e-8d2c-2fececd405d4?popreceipt=AgAAAAMAAAAAAAAAqNfvlwlB1wE%3DRandom&visibilitytimeout=1", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "9a5ecb48-2872-4d9f-af90-fac520fefe71", + "Content-Type" : "application/xml" + }, + "Response" : { + "content-length" : "444", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "InvalidQueryParameterValue", + "retry-after" : "0", + "StatusCode" : "400", + "x-ms-request-id" : "6c1f571f-d003-0077-4c09-4123b5000000", + "Body" : "InvalidQueryParameterValueValue for one of the query parameters specified in the request URI is invalid.\nRequestId:6c1f571f-d003-0077-4c09-4123b5000000\nTime:2021-05-04T17:18:39.1133478ZpopreceiptAgAAAAMAAAAAAAAAqNfvlwlB1wE=RandomInvalid pop receipt format", + "x-ms-client-request-id" : "9a5ecb48-2872-4d9f-af90-fac520fefe71", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "4dd1d2a84dd1d2a8c9e031932aa3c062fc4446eba8" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsUpdateMessageInvalidArgs[1].json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsUpdateMessageInvalidArgs[1].json new file mode 100644 index 0000000000000..c5e525949b365 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsUpdateMessageInvalidArgs[1].json @@ -0,0 +1,90 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/54cae3e954cae3e94d3171392ea55b2fd2ae4a2b86", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "e4589250-04e4-4276-b724-e2039e4dcfb6" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "c54fcc25-e003-000e-2909-41df91000000", + "x-ms-client-request-id" : "e4589250-04e4-4276-b724-e2039e4dcfb6", + "Date" : "Tue, 04 May 2021 17:18:38 GMT" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/54cae3e954cae3e94d3171392ea55b2fd2ae4a2b86/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "8039ebdc-6134-40e7-b6ee-4afeae93a504", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "e8711551-4003-0081-7509-4156fb000000", + "Body" : "102d5b45-804a-4818-bd29-de8f1d6ad2c8Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAAjrpghglB1wE=Tue, 04 May 2021 17:18:39 GMT", + "x-ms-client-request-id" : "8039ebdc-6134-40e7-b6ee-4afeae93a504", + "Date" : "Tue, 04 May 2021 17:18:39 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/54cae3e954cae3e94d3171392ea55b2fd2ae4a2b86/messages?numofmessages=1", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "6ffecc54-cd9c-4527-9b38-2340d46b41b1" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "80fe1144-6003-002f-0709-41fbea000000", + "Body" : "102d5b45-804a-4818-bd29-de8f1d6ad2c8Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAABxhQmAlB1wE=Tue, 04 May 2021 17:19:09 GMT1test message before update", + "x-ms-client-request-id" : "6ffecc54-cd9c-4527-9b38-2340d46b41b1", + "Date" : "Tue, 04 May 2021 17:18:39 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/54cae3e954cae3e94d3171392ea55b2fd2ae4a2b86/messages/102d5b45-804a-4818-bd29-de8f1d6ad2c8Random?popreceipt=AgAAAAMAAAAAAAAABxhQmAlB1wE%3D&visibilitytimeout=1", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "31cbfa8a-913f-4ce4-8da2-22f223278d8a", + "Content-Type" : "application/xml" + }, + "Response" : { + "content-length" : "221", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "MessageNotFound", + "retry-after" : "0", + "StatusCode" : "404", + "x-ms-request-id" : "ea8df1fc-5003-009d-3509-41049b000000", + "Body" : "MessageNotFoundThe specified message does not exist.\nRequestId:ea8df1fc-5003-009d-3509-41049b000000\nTime:2021-05-04T17:18:39.7902776Z", + "x-ms-client-request-id" : "31cbfa8a-913f-4ce4-8da2-22f223278d8a", + "Date" : "Tue, 04 May 2021 17:18:39 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "54cae3e954cae3e94d3171392ea55b2fd2ae4a2b86" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsUpdateMessageInvalidArgs[2].json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsUpdateMessageInvalidArgs[2].json new file mode 100644 index 0000000000000..103c8d63d75c0 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsUpdateMessageInvalidArgs[2].json @@ -0,0 +1,90 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/7fe7b02a7fe7b02ad7b91499cd6978dfc32b4cf29a", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "3fb88bc1-55bf-405d-8966-fe7f86272a65" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "6c1f572a-d003-0077-5509-4123b5000000", + "x-ms-client-request-id" : "3fb88bc1-55bf-405d-8966-fe7f86272a65", + "Date" : "Tue, 04 May 2021 17:18:38 GMT" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/7fe7b02a7fe7b02ad7b91499cd6978dfc32b4cf29a/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "5d3ec1e8-07ec-4728-9c65-34def26edcbd", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "42b03406-2003-0073-0409-41aeb2000000", + "Body" : "d0d4d088-91dd-40e0-b150-e0be81bcd879Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAAI8NuhglB1wE=Tue, 04 May 2021 17:18:39 GMT", + "x-ms-client-request-id" : "5d3ec1e8-07ec-4728-9c65-34def26edcbd", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/7fe7b02a7fe7b02ad7b91499cd6978dfc32b4cf29a/messages?numofmessages=1", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "6e09c3c6-c82b-499a-9d10-40328c20767a" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "e8711558-4003-0081-7a09-4156fb000000", + "Body" : "d0d4d088-91dd-40e0-b150-e0be81bcd879Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAAmyBemAlB1wE=Tue, 04 May 2021 17:19:09 GMT1test message before update", + "x-ms-client-request-id" : "6e09c3c6-c82b-499a-9d10-40328c20767a", + "Date" : "Tue, 04 May 2021 17:18:39 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/7fe7b02a7fe7b02ad7b91499cd6978dfc32b4cf29a/messages/d0d4d088-91dd-40e0-b150-e0be81bcd879Random?popreceipt=AgAAAAMAAAAAAAAAmyBemAlB1wE%3DRandom&visibilitytimeout=1", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "de233bda-c952-4400-93d7-458489fe5466", + "Content-Type" : "application/xml" + }, + "Response" : { + "content-length" : "444", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "InvalidQueryParameterValue", + "retry-after" : "0", + "StatusCode" : "400", + "x-ms-request-id" : "8e697fe7-c003-007b-8009-41b4bd000000", + "Body" : "InvalidQueryParameterValueValue for one of the query parameters specified in the request URI is invalid.\nRequestId:8e697fe7-c003-007b-8009-41b4bd000000\nTime:2021-05-04T17:18:39.8346447ZpopreceiptAgAAAAMAAAAAAAAAmyBemAlB1wE=RandomInvalid pop receipt format", + "x-ms-client-request-id" : "de233bda-c952-4400-93d7-458489fe5466", + "Date" : "Tue, 04 May 2021 17:18:39 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "7fe7b02a7fe7b02ad7b91499cd6978dfc32b4cf29a" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsUpdateMessageNoBody.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsUpdateMessageNoBody.json new file mode 100644 index 0000000000000..ba0c4acc455d2 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsUpdateMessageNoBody.json @@ -0,0 +1,110 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/2be6a32d2be6a32d7a3157275dfd50f3360d49a5be", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "4a3e820a-bc80-4f08-a4c6-c9ebb0a1d822" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "78b23433-8003-0008-5009-41ec2e000000", + "x-ms-client-request-id" : "4a3e820a-bc80-4f08-a4c6-c9ebb0a1d822", + "Date" : "Tue, 04 May 2021 17:18:38 GMT" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/2be6a32d2be6a32d7a3157275dfd50f3360d49a5be/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "8aa56ce7-9604-44fc-ba5c-4dc259aec978", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "895e7b87-6003-00a9-4709-413753000000", + "Body" : "1453adb0-ee10-4b5a-836e-3035350954cdTue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAAsKBahglB1wE=Tue, 04 May 2021 17:18:39 GMT", + "x-ms-client-request-id" : "8aa56ce7-9604-44fc-ba5c-4dc259aec978", + "Date" : "Tue, 04 May 2021 17:18:39 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/2be6a32d2be6a32d7a3157275dfd50f3360d49a5be/messages?numofmessages=1", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "02f182cb-75e3-4f9b-af6c-6d4fe5738d5a" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "b7beac01-a003-0052-2709-418ac9000000", + "Body" : "1453adb0-ee10-4b5a-836e-3035350954cdTue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAAqcVImAlB1wE=Tue, 04 May 2021 17:19:09 GMT1test message before update", + "x-ms-client-request-id" : "02f182cb-75e3-4f9b-af6c-6d4fe5738d5a", + "Date" : "Tue, 04 May 2021 17:18:39 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/2be6a32d2be6a32d7a3157275dfd50f3360d49a5be/messages/1453adb0-ee10-4b5a-836e-3035350954cd?popreceipt=AgAAAAMAAAAAAAAAqcVImAlB1wE%3D&visibilitytimeout=1", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "e7047780-1ed3-445f-baa8-cb2398134f77" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-time-next-visible" : "Tue, 04 May 2021 17:18:40 GMT", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "beffcc48-b003-00c8-2209-411410000000", + "x-ms-popreceipt" : "AwAAAAMAAAAAAAAAqpoNhwlB1wEBAAAA", + "x-ms-client-request-id" : "e7047780-1ed3-445f-baa8-cb2398134f77", + "Date" : "Tue, 04 May 2021 17:18:39 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/2be6a32d2be6a32d7a3157275dfd50f3360d49a5be/messages?peekonly=true", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "a61deaaa-c639-40b0-94b0-e570bb856254" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "ddc2fb27-e003-0053-7309-41d515000000", + "Body" : "1453adb0-ee10-4b5a-836e-3035350954cdTue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMT1test message before update", + "x-ms-client-request-id" : "a61deaaa-c639-40b0-94b0-e570bb856254", + "Date" : "Tue, 04 May 2021 17:18:41 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "2be6a32d2be6a32d7a3157275dfd50f3360d49a5be" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsUpdateMessageNullDuration.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsUpdateMessageNullDuration.json new file mode 100644 index 0000000000000..e692f865abfa5 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsUpdateMessageNullDuration.json @@ -0,0 +1,110 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/e9617047e9617047ec555549c5389a5f40cb455587", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "deb5543f-3f8f-405b-ac82-3a8d8af07a4a" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "b050afcf-6003-00cb-3509-41f574000000", + "x-ms-client-request-id" : "deb5543f-3f8f-405b-ac82-3a8d8af07a4a", + "Date" : "Tue, 04 May 2021 17:18:38 GMT" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/e9617047e9617047ec555549c5389a5f40cb455587/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "8425f4e8-79db-431a-a31d-b75572e2cf51", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "66d7cf56-0003-0074-0f09-41c2d1000000", + "Body" : "f730be90-28c1-4e1d-a3e6-789830f280c4Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAAK2hZhglB1wE=Tue, 04 May 2021 17:18:39 GMT", + "x-ms-client-request-id" : "8425f4e8-79db-431a-a31d-b75572e2cf51", + "Date" : "Tue, 04 May 2021 17:18:39 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/e9617047e9617047ec555549c5389a5f40cb455587/messages?numofmessages=1", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "68fe3a03-1052-42e0-aab4-4612d3e7311b" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "b050afd7-6003-00cb-3c09-41f574000000", + "Body" : "f730be90-28c1-4e1d-a3e6-789830f280c4Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAATLRHmAlB1wE=Tue, 04 May 2021 17:19:09 GMT1test message before update", + "x-ms-client-request-id" : "68fe3a03-1052-42e0-aab4-4612d3e7311b", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/e9617047e9617047ec555549c5389a5f40cb455587/messages/f730be90-28c1-4e1d-a3e6-789830f280c4?popreceipt=AgAAAAMAAAAAAAAATLRHmAlB1wE%3D&visibilitytimeout=0", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "97318360-9355-45cd-807f-01585545de27" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-time-next-visible" : "Tue, 04 May 2021 17:18:39 GMT", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "34fa7b57-1003-0078-0409-4155d9000000", + "x-ms-popreceipt" : "AwAAAAMAAAAAAAAAKgR1hglB1wEBAAAA", + "x-ms-client-request-id" : "97318360-9355-45cd-807f-01585545de27", + "Date" : "Tue, 04 May 2021 17:18:39 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/e9617047e9617047ec555549c5389a5f40cb455587/messages?peekonly=true", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "84de7629-5dbd-43e8-8d23-df00de86ff3b" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "895e7bf5-6003-00a9-3109-413753000000", + "Body" : "f730be90-28c1-4e1d-a3e6-789830f280c4Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMT1test message before update", + "x-ms-client-request-id" : "84de7629-5dbd-43e8-8d23-df00de86ff3b", + "Date" : "Tue, 04 May 2021 17:18:41 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "e9617047e9617047ec555549c5389a5f40cb455587" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsClearMessages.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsClearMessages.json new file mode 100644 index 0000000000000..189ce4db8c32c --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsClearMessages.json @@ -0,0 +1,150 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/e5bcc5bee5bcc5be74418624186e23910b244082b2", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "94a07eff-ed99-4f92-87d8-7f991d800b0d" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "10a7c4fc-c003-0044-2009-417c1e000000", + "x-ms-client-request-id" : "94a07eff-ed99-4f92-87d8-7f991d800b0d", + "Date" : "Tue, 04 May 2021 17:18:39 GMT" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/e5bcc5bee5bcc5be74418624186e23910b244082b2/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "a5dca7e1-1f28-4de2-a780-c6ccb9d83f7e", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "7c5d39f4-2003-0011-2e09-416c95000000", + "Body" : "2cd47a48-f137-4cb6-97ef-1e95466c05a0Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAAOhFvhglB1wE=Tue, 04 May 2021 17:18:39 GMT", + "x-ms-client-request-id" : "a5dca7e1-1f28-4de2-a780-c6ccb9d83f7e", + "Date" : "Tue, 04 May 2021 17:18:39 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/e5bcc5bee5bcc5be74418624186e23910b244082b2/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "f9e52869-89ab-42de-a3f2-6eba2e205512", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "10a7c503-c003-0044-2609-417c1e000000", + "Body" : "d8c4751d-408f-44a2-beb1-99ba597f9b43Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAAm318hglB1wE=Tue, 04 May 2021 17:18:39 GMT", + "x-ms-client-request-id" : "f9e52869-89ab-42de-a3f2-6eba2e205512", + "Date" : "Tue, 04 May 2021 17:18:39 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/e5bcc5bee5bcc5be74418624186e23910b244082b2/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "911484c5-55af-475a-912e-81a143e5eefa", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "ec6c63d6-7003-00e8-5609-416fb7000000", + "Body" : "6960e957-0d01-49d7-af03-a282d06c4d44Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAADRGKhglB1wE=Tue, 04 May 2021 17:18:39 GMT", + "x-ms-client-request-id" : "911484c5-55af-475a-912e-81a143e5eefa", + "Date" : "Tue, 04 May 2021 17:18:39 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/e5bcc5bee5bcc5be74418624186e23910b244082b2?comp=metadata", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "8838a3f0-729e-4ed6-8318-5921cc7df80b" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "x-ms-approximate-messages-count" : "3", + "StatusCode" : "200", + "x-ms-request-id" : "c54fcc42-e003-000e-4009-41df91000000", + "x-ms-client-request-id" : "8838a3f0-729e-4ed6-8318-5921cc7df80b", + "Date" : "Tue, 04 May 2021 17:18:38 GMT" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.queue.core.windows.net/e5bcc5bee5bcc5be74418624186e23910b244082b2/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "b5830df2-0045-4871-8a5f-73b66341bf6a" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "7c5d3a06-2003-0011-3e09-416c95000000", + "x-ms-client-request-id" : "b5830df2-0045-4871-8a5f-73b66341bf6a", + "Date" : "Tue, 04 May 2021 17:18:39 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/e5bcc5bee5bcc5be74418624186e23910b244082b2?comp=metadata", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "6cea53b2-8f48-45b6-83d9-94b190853365" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "x-ms-approximate-messages-count" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "80fe1163-6003-002f-2309-41fbea000000", + "x-ms-client-request-id" : "6cea53b2-8f48-45b6-83d9-94b190853365", + "Date" : "Tue, 04 May 2021 17:18:39 GMT" + }, + "Exception" : null + } ], + "variables" : [ "e5bcc5bee5bcc5be74418624186e23910b244082b2" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsClearMessagesError.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsClearMessagesError.json new file mode 100644 index 0000000000000..18eebda8d89ee --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsClearMessagesError.json @@ -0,0 +1,26 @@ +{ + "networkCallRecords" : [ { + "Method" : "DELETE", + "Uri" : "https://REDACTED.queue.core.windows.net/9d353be99d353be9677455254f4dbc9fbde048e5b8/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "945ac91f-930d-4070-9ba7-f85411a75118" + }, + "Response" : { + "content-length" : "217", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "QueueNotFound", + "retry-after" : "0", + "StatusCode" : "404", + "x-ms-request-id" : "d99b06ba-6003-004d-2a09-4139cd000000", + "Body" : "QueueNotFoundThe specified queue does not exist.\nRequestId:d99b06ba-6003-004d-2a09-4139cd000000\nTime:2021-05-04T17:18:39.5653924Z", + "x-ms-client-request-id" : "945ac91f-930d-4070-9ba7-f85411a75118", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "9d353be99d353be9677455254f4dbc9fbde048e5b8" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsCreateIfNotExistsQueueThatAlreadyExists.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsCreateIfNotExistsQueueThatAlreadyExists.json new file mode 100644 index 0000000000000..7a35a9640b73a --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsCreateIfNotExistsQueueThatAlreadyExists.json @@ -0,0 +1,42 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "http://REDACTED.queue.core.windows.net/b3a8e433b3a8e4331a135688c9a735313ef140e6a3", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-queue/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", + "x-ms-client-request-id" : "f9eaae5f-6553-4fdf-b9da-3837d5b4727c" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "059061c5-d003-013a-6ccc-485122000000", + "x-ms-client-request-id" : "f9eaae5f-6553-4fdf-b9da-3837d5b4727c", + "Date" : "Tue, 05 Apr 2022 09:09:47 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://REDACTED.queue.core.windows.net/b3a8e433b3a8e4331a135688c9a735313ef140e6a3", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-queue/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", + "x-ms-client-request-id" : "6cfd15ce-9bdc-4b20-b0a6-873c89c09a8c" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "059061dc-d003-013a-7fcc-485122000000", + "x-ms-client-request-id" : "6cfd15ce-9bdc-4b20-b0a6-873c89c09a8c", + "Date" : "Tue, 05 Apr 2022 09:09:47 GMT" + }, + "Exception" : null + } ], + "variables" : [ "b3a8e433b3a8e4331a135688c9a735313ef140e6a3" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsCreateIfNotExistsQueueWithConflictingMetadata.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsCreateIfNotExistsQueueWithConflictingMetadata.json new file mode 100644 index 0000000000000..12ba0da4d4c0f --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsCreateIfNotExistsQueueWithConflictingMetadata.json @@ -0,0 +1,45 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/1084739310847393c16647809a4389f9a16846bba9", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-queue/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", + "x-ms-client-request-id" : "94267a83-ae6b-4ba7-b443-b685d199acb2" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "e18a348a-d003-0014-3d4e-4e5a97000000", + "x-ms-client-request-id" : "94267a83-ae6b-4ba7-b443-b685d199acb2", + "Date" : "Tue, 12 Apr 2022 09:23:02 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/1084739310847393c16647809a4389f9a16846bba9", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-queue/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", + "x-ms-client-request-id" : "66e7d6db-8b36-47bf-bf55-a121a8dde6fe" + }, + "Response" : { + "content-length" : "222", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "QueueAlreadyExists", + "retry-after" : "0", + "StatusCode" : "409", + "x-ms-request-id" : "e18a34a1-d003-0014-514e-4e5a97000000", + "Body" : "QueueAlreadyExistsThe specified queue already exists.\nRequestId:e18a34a1-d003-0014-514e-4e5a97000000\nTime:2022-04-12T09:23:02.1932700Z", + "x-ms-client-request-id" : "66e7d6db-8b36-47bf-bf55-a121a8dde6fe", + "Date" : "Tue, 12 Apr 2022 09:23:02 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "1084739310847393c16647809a4389f9a16846bba9" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsCreateIfNotExistsQueueWithSameMetadata.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsCreateIfNotExistsQueueWithSameMetadata.json new file mode 100644 index 0000000000000..9b1812fb89ba1 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsCreateIfNotExistsQueueWithSameMetadata.json @@ -0,0 +1,42 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/d6488692d6488692a4c411470f869c5d4dcc431493", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-queue/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", + "x-ms-client-request-id" : "1b025cab-2a1d-44ff-a3a2-748604b9ca9b" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "152f42a7-a003-007c-024e-4e3c07000000", + "x-ms-client-request-id" : "1b025cab-2a1d-44ff-a3a2-748604b9ca9b", + "Date" : "Tue, 12 Apr 2022 09:23:01 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/d6488692d6488692a4c411470f869c5d4dcc431493", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-queue/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", + "x-ms-client-request-id" : "aa4640a1-0d05-4865-8216-d6b018914b01" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "152f4315-a003-007c-6e4e-4e3c07000000", + "x-ms-client-request-id" : "aa4640a1-0d05-4865-8216-d6b018914b01", + "Date" : "Tue, 12 Apr 2022 09:23:01 GMT" + }, + "Exception" : null + } ], + "variables" : [ "d6488692d6488692a4c411470f869c5d4dcc431493" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsCreateIfNotExistsQueueWithSharedKey.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsCreateIfNotExistsQueueWithSharedKey.json new file mode 100644 index 0000000000000..a6bdbe63885d2 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsCreateIfNotExistsQueueWithSharedKey.json @@ -0,0 +1,23 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/10a5811810a5811861b40941394cae9e8a6249839b", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-queue/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", + "x-ms-client-request-id" : "9451d1f9-276d-4ff6-991f-36c4932bf960" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "373f3ac8-b003-005f-7d4e-4ea6c4000000", + "x-ms-client-request-id" : "9451d1f9-276d-4ff6-991f-36c4932bf960", + "Date" : "Tue, 12 Apr 2022 09:23:01 GMT" + }, + "Exception" : null + } ], + "variables" : [ "10a5811810a5811861b40941394cae9e8a6249839b" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsCreateQueueWithSharedKey.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsCreateQueueWithSharedKey.json new file mode 100644 index 0000000000000..18f4d810aab48 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsCreateQueueWithSharedKey.json @@ -0,0 +1,23 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/19052c9119052c9183957487cfed554808764ed68b", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "f14c044e-e08f-4f92-9a75-db7420611cb1" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "fa8afa8a-b003-0013-1409-41d22d000000", + "x-ms-client-request-id" : "f14c044e-e08f-4f92-9a75-db7420611cb1", + "Date" : "Tue, 04 May 2021 17:18:36 GMT" + }, + "Exception" : null + } ], + "variables" : [ "19052c9119052c9183957487cfed554808764ed68b" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsDeleteExistQueue.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsDeleteExistQueue.json new file mode 100644 index 0000000000000..c11bb3ffcafba --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsDeleteExistQueue.json @@ -0,0 +1,42 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/77eb7af677eb7af6a77104593422ea5a114041d889", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "818596ca-b79e-465e-b4d2-9a1594f3533a" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "ec6c6355-7003-00e8-6409-416fb7000000", + "x-ms-client-request-id" : "818596ca-b79e-465e-b4d2-9a1594f3533a", + "Date" : "Tue, 04 May 2021 17:18:37 GMT" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.queue.core.windows.net/77eb7af677eb7af6a77104593422ea5a114041d889", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "e592124b-7a60-44b0-988e-32bb79bb8f9f" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "721d906d-4003-005a-6709-4190c6000000", + "x-ms-client-request-id" : "e592124b-7a60-44b0-988e-32bb79bb8f9f", + "Date" : "Tue, 04 May 2021 17:18:37 GMT" + }, + "Exception" : null + } ], + "variables" : [ "77eb7af677eb7af6a77104593422ea5a114041d889" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsDeleteIfExistsQueue.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsDeleteIfExistsQueue.json new file mode 100644 index 0000000000000..2540c6c7baeb5 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsDeleteIfExistsQueue.json @@ -0,0 +1,42 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "http://REDACTED.queue.core.windows.net/7705f8be7705f8be195363900de9c4fdfe0b47e98d", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-queue/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", + "x-ms-client-request-id" : "bb355625-7071-41a7-a027-f90cb3169a77" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "eff8e377-0003-0007-7a72-517e9b000000", + "x-ms-client-request-id" : "bb355625-7071-41a7-a027-f90cb3169a77", + "Date" : "Sat, 16 Apr 2022 09:16:49 GMT" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "http://REDACTED.queue.core.windows.net/7705f8be7705f8be195363900de9c4fdfe0b47e98d", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-queue/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", + "x-ms-client-request-id" : "bc4ad745-76a8-47bb-bad8-f87df0101fbf" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "eff8e38e-0003-0007-0c72-517e9b000000", + "x-ms-client-request-id" : "bc4ad745-76a8-47bb-bad8-f87df0101fbf", + "Date" : "Sat, 16 Apr 2022 09:16:49 GMT" + }, + "Exception" : null + } ], + "variables" : [ "7705f8be7705f8be195363900de9c4fdfe0b47e98d" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsDeleteIfExistsQueueThatDoesNotExist.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsDeleteIfExistsQueueThatDoesNotExist.json new file mode 100644 index 0000000000000..ff9c43af9a90f --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsDeleteIfExistsQueueThatDoesNotExist.json @@ -0,0 +1,26 @@ +{ + "networkCallRecords" : [ { + "Method" : "DELETE", + "Uri" : "http://REDACTED.queue.core.windows.net/aafddfa6aafddfa6594023110b6f21b195384bdf9d", + "Headers" : { + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-queue/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", + "x-ms-client-request-id" : "82baeb20-e6e8-4b22-9179-a8befeeec5fa" + }, + "Response" : { + "content-length" : "217", + "x-ms-version" : "2021-04-10", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "QueueNotFound", + "retry-after" : "0", + "StatusCode" : "404", + "x-ms-request-id" : "99367890-6003-0001-3e72-514d24000000", + "Body" : "QueueNotFoundThe specified queue does not exist.\nRequestId:99367890-6003-0001-3e72-514d24000000\nTime:2022-04-16T09:16:50.3006121Z", + "x-ms-client-request-id" : "82baeb20-e6e8-4b22-9179-a8befeeec5fa", + "Date" : "Sat, 16 Apr 2022 09:16:49 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "aafddfa6aafddfa6594023110b6f21b195384bdf9d" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsDeleteMessage.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsDeleteMessage.json new file mode 100644 index 0000000000000..99eb819727a89 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsDeleteMessage.json @@ -0,0 +1,172 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/3febc5e93febc5e98e61464893cfc92016f64333a0", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "8d86933d-0755-4813-9f14-3c03aeee03c3" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "ea8df1eb-5003-009d-2609-41049b000000", + "x-ms-client-request-id" : "8d86933d-0755-4813-9f14-3c03aeee03c3", + "Date" : "Tue, 04 May 2021 17:18:38 GMT" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/3febc5e93febc5e98e61464893cfc92016f64333a0/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "ff84843f-f57e-4fdb-a1f5-f04534085b49", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "66d7cf5d-0003-0074-1309-41c2d1000000", + "Body" : "026b293a-d7be-4705-890b-c01e5a20a9a3Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAAcK1vhglB1wE=Tue, 04 May 2021 17:18:39 GMT", + "x-ms-client-request-id" : "ff84843f-f57e-4fdb-a1f5-f04534085b49", + "Date" : "Tue, 04 May 2021 17:18:39 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/3febc5e93febc5e98e61464893cfc92016f64333a0/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "c0897203-395e-46e7-8d5c-392f635ad0d8", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "e2d48ed1-d003-00ce-2609-4127af000000", + "Body" : "644d82e3-50fe-4d05-aebe-d74ea9840485Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAA3EB9hglB1wE=Tue, 04 May 2021 17:18:39 GMT", + "x-ms-client-request-id" : "c0897203-395e-46e7-8d5c-392f635ad0d8", + "Date" : "Tue, 04 May 2021 17:18:39 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/3febc5e93febc5e98e61464893cfc92016f64333a0/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "e257535b-9562-486d-a3ca-f22687762985", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "60ea4cd9-d003-002a-4509-412931000000", + "Body" : "cf7c0b1c-db69-4d3f-892c-f79656dc3634Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAAI1+KhglB1wE=Tue, 04 May 2021 17:18:39 GMT", + "x-ms-client-request-id" : "e257535b-9562-486d-a3ca-f22687762985", + "Date" : "Tue, 04 May 2021 17:18:39 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/3febc5e93febc5e98e61464893cfc92016f64333a0/messages?numofmessages=1", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "009b17ab-812f-42a6-a7e3-579560efd076" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "73eb5665-2003-003e-1309-41615e000000", + "Body" : "026b293a-d7be-4705-890b-c01e5a20a9a3Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAAX/l4mAlB1wE=Tue, 04 May 2021 17:19:09 GMT1test message 1", + "x-ms-client-request-id" : "009b17ab-812f-42a6-a7e3-579560efd076", + "Date" : "Tue, 04 May 2021 17:18:39 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/3febc5e93febc5e98e61464893cfc92016f64333a0?comp=metadata", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "895bb5fb-e52b-4260-8661-68e043fe92e9" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "x-ms-approximate-messages-count" : "3", + "StatusCode" : "200", + "x-ms-request-id" : "6980d27e-1003-0035-3909-419a35000000", + "x-ms-client-request-id" : "895bb5fb-e52b-4260-8661-68e043fe92e9", + "Date" : "Tue, 04 May 2021 17:18:39 GMT" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.queue.core.windows.net/3febc5e93febc5e98e61464893cfc92016f64333a0/messages/026b293a-d7be-4705-890b-c01e5a20a9a3?popreceipt=AgAAAAMAAAAAAAAAX/l4mAlB1wE%3D", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "13bdf90c-bde3-46b6-a0ef-c27e6499d344" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "42b0341f-2003-0073-1a09-41aeb2000000", + "x-ms-client-request-id" : "13bdf90c-bde3-46b6-a0ef-c27e6499d344", + "Date" : "Tue, 04 May 2021 17:18:39 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/3febc5e93febc5e98e61464893cfc92016f64333a0?comp=metadata", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "d6fddb6f-392c-4ff7-8551-20b38334d5ef" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "x-ms-approximate-messages-count" : "2", + "StatusCode" : "200", + "x-ms-request-id" : "66d7cf80-0003-0074-3209-41c2d1000000", + "x-ms-client-request-id" : "d6fddb6f-392c-4ff7-8551-20b38334d5ef", + "Date" : "Tue, 04 May 2021 17:18:39 GMT" + }, + "Exception" : null + } ], + "variables" : [ "3febc5e93febc5e98e61464893cfc92016f64333a0" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsDeleteMessageInvalidArgs[0].json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsDeleteMessageInvalidArgs[0].json new file mode 100644 index 0000000000000..b674f90babd3a --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsDeleteMessageInvalidArgs[0].json @@ -0,0 +1,89 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/80089bef80089bef61875984302d085734834c33a6", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "9b7e8c23-eb79-4993-acc2-70b839d55ec8" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "b77ad6f8-3003-00e9-7309-41306b000000", + "x-ms-client-request-id" : "9b7e8c23-eb79-4993-acc2-70b839d55ec8", + "Date" : "Tue, 04 May 2021 17:18:38 GMT" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/80089bef80089bef61875984302d085734834c33a6/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "e7b0cab9-4751-43df-b27b-0cdd8e9c1888", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "92671e8c-a003-000f-5d09-41804d000000", + "Body" : "f6a45a66-3284-4cdd-bfde-d02dc4b3391aTue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAAie5shglB1wE=Tue, 04 May 2021 17:18:39 GMT", + "x-ms-client-request-id" : "e7b0cab9-4751-43df-b27b-0cdd8e9c1888", + "Date" : "Tue, 04 May 2021 17:18:39 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/80089bef80089bef61875984302d085734834c33a6/messages?numofmessages=1", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "b53d17e3-03af-43c9-b809-ad5d531eab18" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "26562da6-0003-004b-3e09-410a72000000", + "Body" : "f6a45a66-3284-4cdd-bfde-d02dc4b3391aTue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAAIZpcmAlB1wE=Tue, 04 May 2021 17:19:09 GMT1test message", + "x-ms-client-request-id" : "b53d17e3-03af-43c9-b809-ad5d531eab18", + "Date" : "Tue, 04 May 2021 17:18:39 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.queue.core.windows.net/80089bef80089bef61875984302d085734834c33a6/messages/f6a45a66-3284-4cdd-bfde-d02dc4b3391a?popreceipt=AgAAAAMAAAAAAAAAIZpcmAlB1wE%3DRandom", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "7d4c19ef-abbd-4a8a-9a9d-7b8696e6b739" + }, + "Response" : { + "content-length" : "444", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "InvalidQueryParameterValue", + "retry-after" : "0", + "StatusCode" : "400", + "x-ms-request-id" : "b7beac0a-a003-0052-2f09-418ac9000000", + "Body" : "InvalidQueryParameterValueValue for one of the query parameters specified in the request URI is invalid.\nRequestId:b7beac0a-a003-0052-2f09-418ac9000000\nTime:2021-05-04T17:18:39.8156329ZpopreceiptAgAAAAMAAAAAAAAAIZpcmAlB1wE=RandomInvalid pop receipt format", + "x-ms-client-request-id" : "7d4c19ef-abbd-4a8a-9a9d-7b8696e6b739", + "Date" : "Tue, 04 May 2021 17:18:39 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "80089bef80089bef61875984302d085734834c33a6" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsDeleteMessageInvalidArgs[1].json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsDeleteMessageInvalidArgs[1].json new file mode 100644 index 0000000000000..3c2711dddc233 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsDeleteMessageInvalidArgs[1].json @@ -0,0 +1,89 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/9913aaae9913aaaeff406627a6aeb6d968864888aa", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "64351c91-8e86-4ba2-bbbd-67409dd23872" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "78b23439-8003-0008-5309-41ec2e000000", + "x-ms-client-request-id" : "64351c91-8e86-4ba2-bbbd-67409dd23872", + "Date" : "Tue, 04 May 2021 17:18:39 GMT" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/9913aaae9913aaaeff406627a6aeb6d968864888aa/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "c209d962-f1d8-4636-9cd0-5c9945b14696", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "4c99f6d3-8003-00d3-4a09-412a13000000", + "Body" : "a7a4b401-3ff2-4058-a658-af3d0226e49dTue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAAlRVthglB1wE=Tue, 04 May 2021 17:18:39 GMT", + "x-ms-client-request-id" : "c209d962-f1d8-4636-9cd0-5c9945b14696", + "Date" : "Tue, 04 May 2021 17:18:39 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/9913aaae9913aaaeff406627a6aeb6d968864888aa/messages?numofmessages=1", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "9ccdf9e2-3a0f-41aa-aaae-5a65bd5a71f1" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "fde04347-8003-00a1-1b09-412d5c000000", + "Body" : "a7a4b401-3ff2-4058-a658-af3d0226e49dTue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAAqjpbmAlB1wE=Tue, 04 May 2021 17:19:09 GMT1test message", + "x-ms-client-request-id" : "9ccdf9e2-3a0f-41aa-aaae-5a65bd5a71f1", + "Date" : "Tue, 04 May 2021 17:18:39 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.queue.core.windows.net/9913aaae9913aaaeff406627a6aeb6d968864888aa/messages/a7a4b401-3ff2-4058-a658-af3d0226e49dRandom?popreceipt=AgAAAAMAAAAAAAAAqjpbmAlB1wE%3D", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "9e597aa9-066b-44ed-891f-ed5c433021d8" + }, + "Response" : { + "content-length" : "221", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "MessageNotFound", + "retry-after" : "0", + "StatusCode" : "404", + "x-ms-request-id" : "2b951134-0003-0006-6f09-41c59e000000", + "Body" : "MessageNotFoundThe specified message does not exist.\nRequestId:2b951134-0003-0006-6f09-41c59e000000\nTime:2021-05-04T17:18:39.8706977Z", + "x-ms-client-request-id" : "9e597aa9-066b-44ed-891f-ed5c433021d8", + "Date" : "Tue, 04 May 2021 17:18:39 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "9913aaae9913aaaeff406627a6aeb6d968864888aa" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsDeleteMessageInvalidArgs[2].json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsDeleteMessageInvalidArgs[2].json new file mode 100644 index 0000000000000..6ba9ba6e84308 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsDeleteMessageInvalidArgs[2].json @@ -0,0 +1,89 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/b23ef96db23ef96d91a0154527af2dc696a24cac9d", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "483c4bb0-9314-45c6-aa15-6e7ff23fe41f" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "fdcb015d-7003-0033-1f09-41a98a000000", + "x-ms-client-request-id" : "483c4bb0-9314-45c6-aa15-6e7ff23fe41f", + "Date" : "Tue, 04 May 2021 17:18:39 GMT" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/b23ef96db23ef96d91a0154527af2dc696a24cac9d/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "d4c92671-7a57-4c22-8ef1-e1182f1f100d", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "d9b89a1d-f003-0012-6509-418df1000000", + "Body" : "94a575f9-d9df-47f2-8dd7-bc6f36401d66Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAAOxFvhglB1wE=Tue, 04 May 2021 17:18:39 GMT", + "x-ms-client-request-id" : "d4c92671-7a57-4c22-8ef1-e1182f1f100d", + "Date" : "Tue, 04 May 2021 17:18:39 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/b23ef96db23ef96d91a0154527af2dc696a24cac9d/messages?numofmessages=1", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "01732cba-039c-45a3-95cc-d66a5f2400c1" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "fdcb0165-7003-0033-2609-41a98a000000", + "Body" : "94a575f9-d9df-47f2-8dd7-bc6f36401d66Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAAmyBemAlB1wE=Tue, 04 May 2021 17:19:09 GMT1test message", + "x-ms-client-request-id" : "01732cba-039c-45a3-95cc-d66a5f2400c1", + "Date" : "Tue, 04 May 2021 17:18:39 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.queue.core.windows.net/b23ef96db23ef96d91a0154527af2dc696a24cac9d/messages/94a575f9-d9df-47f2-8dd7-bc6f36401d66Random?popreceipt=AgAAAAMAAAAAAAAAmyBemAlB1wE%3DRandom", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "bba43342-5aca-4367-9d07-1ab69855667a" + }, + "Response" : { + "content-length" : "444", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "InvalidQueryParameterValue", + "retry-after" : "0", + "StatusCode" : "400", + "x-ms-request-id" : "4c99f6d8-8003-00d3-4e09-412a13000000", + "Body" : "InvalidQueryParameterValueValue for one of the query parameters specified in the request URI is invalid.\nRequestId:4c99f6d8-8003-00d3-4e09-412a13000000\nTime:2021-05-04T17:18:39.8358522ZpopreceiptAgAAAAMAAAAAAAAAmyBemAlB1wE=RandomInvalid pop receipt format", + "x-ms-client-request-id" : "bba43342-5aca-4367-9d07-1ab69855667a", + "Date" : "Tue, 04 May 2021 17:18:39 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "b23ef96db23ef96d91a0154527af2dc696a24cac9d" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsDeleteQueueError.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsDeleteQueueError.json new file mode 100644 index 0000000000000..179da019276d5 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsDeleteQueueError.json @@ -0,0 +1,26 @@ +{ + "networkCallRecords" : [ { + "Method" : "DELETE", + "Uri" : "https://REDACTED.queue.core.windows.net/76348e6a76348e6aba2801586846f52253cd4e3282", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "3255b7a8-7b26-4f6d-b2ff-2f75d42bc4c2" + }, + "Response" : { + "content-length" : "217", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "QueueNotFound", + "retry-after" : "0", + "StatusCode" : "404", + "x-ms-request-id" : "10a7c4be-c003-0044-6a09-417c1e000000", + "Body" : "QueueNotFoundThe specified queue does not exist.\nRequestId:10a7c4be-c003-0044-6a09-417c1e000000\nTime:2021-05-04T17:18:37.4674159Z", + "x-ms-client-request-id" : "3255b7a8-7b26-4f6d-b2ff-2f75d42bc4c2", + "Date" : "Tue, 04 May 2021 17:18:37 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "76348e6a76348e6aba2801586846f52253cd4e3282" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsDequeueAndDeleteWithHandler.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsDequeueAndDeleteWithHandler.json new file mode 100644 index 0000000000000..43c681c0df21e --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsDequeueAndDeleteWithHandler.json @@ -0,0 +1,108 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/630b9973630b997359a328438536bb8d6a804a2f92", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "e78b155c-972d-4ed4-8eed-50d731b62513" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "e8711533-4003-0081-5f09-4156fb000000", + "x-ms-client-request-id" : "e78b155c-972d-4ed4-8eed-50d731b62513", + "Date" : "Tue, 04 May 2021 17:18:38 GMT" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/630b9973630b997359a328438536bb8d6a804a2f92/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "db55649f-eecf-414a-b7b8-cd8eaa40d24e", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "8e697fbd-c003-007b-6309-41b4bd000000", + "Body" : "30b3f3a7-e959-4a45-a279-e2c68d3cccc1Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAAf78NhglB1wE=Tue, 04 May 2021 17:18:39 GMT", + "x-ms-client-request-id" : "db55649f-eecf-414a-b7b8-cd8eaa40d24e", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/630b9973630b997359a328438536bb8d6a804a2f92/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "55cac48d-02c4-4c65-adb5-2fd18c54c3d5", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "d99b06aa-6003-004d-1e09-4139cd000000", + "Body" : "eaa949da-dca0-43b5-8cd2-431e3f400917Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAA/nkbhglB1wE=Tue, 04 May 2021 17:18:39 GMT", + "x-ms-client-request-id" : "55cac48d-02c4-4c65-adb5-2fd18c54c3d5", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/630b9973630b997359a328438536bb8d6a804a2f92/messages?numofmessages=10", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "f4651ce7-475c-442e-a611-456952659711" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "92671e7e-a003-000f-5409-41804d000000", + "Body" : "30b3f3a7-e959-4a45-a279-e2c68d3cccc1Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAAkDIOmAlB1wE=Tue, 04 May 2021 17:19:09 GMT1test messageeaa949da-dca0-43b5-8cd2-431e3f400917Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAAkDIOmAlB1wE=Tue, 04 May 2021 17:19:09 GMT1dGVzdCBtZXNzYWdl", + "x-ms-client-request-id" : "f4651ce7-475c-442e-a611-456952659711", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.queue.core.windows.net/630b9973630b997359a328438536bb8d6a804a2f92/messages/30b3f3a7-e959-4a45-a279-e2c68d3cccc1?popreceipt=AgAAAAMAAAAAAAAAkDIOmAlB1wE%3D", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "447cfde9-ecd8-422c-bc4e-d7dffca812aa" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "fdcb0156-7003-0033-1b09-41a98a000000", + "x-ms-client-request-id" : "447cfde9-ecd8-422c-bc4e-d7dffca812aa", + "Date" : "Tue, 04 May 2021 17:18:39 GMT" + }, + "Exception" : null + } ], + "variables" : [ "630b9973630b997359a328438536bb8d6a804a2f92" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsDequeueAndDeleteWithSyncHandler.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsDequeueAndDeleteWithSyncHandler.json new file mode 100644 index 0000000000000..faf5bb94e77ad --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsDequeueAndDeleteWithSyncHandler.json @@ -0,0 +1,108 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/7853c94a7853c94ab6278786d33fcba66eaa452b8f", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "345e3400-6d60-4c38-a8af-70469667c69b" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "d9b899ed-f003-0012-3909-418df1000000", + "x-ms-client-request-id" : "345e3400-6d60-4c38-a8af-70469667c69b", + "Date" : "Tue, 04 May 2021 17:18:38 GMT" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/7853c94a7853c94ab6278786d33fcba66eaa452b8f/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "df240615-5075-4604-9c20-cf7fb8e4768c", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "e8711539-4003-0081-6309-4156fb000000", + "Body" : "b2f2c221-5fbc-4bdb-b3b2-196eb7999e9fTue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAAolsXhglB1wE=Tue, 04 May 2021 17:18:39 GMT", + "x-ms-client-request-id" : "df240615-5075-4604-9c20-cf7fb8e4768c", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/7853c94a7853c94ab6278786d33fcba66eaa452b8f/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "cff219bd-8be2-4818-9d9a-85d8fa470f17", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "ddc2faae-e003-0053-0309-41d515000000", + "Body" : "c136509b-1e8d-4671-b3af-c0d856c03765Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAAJ0oohglB1wE=Tue, 04 May 2021 17:18:39 GMT", + "x-ms-client-request-id" : "cff219bd-8be2-4818-9d9a-85d8fa470f17", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/7853c94a7853c94ab6278786d33fcba66eaa452b8f/messages?numofmessages=10", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "b7ffe18e-381f-41d8-8ddd-aaa1914582a3" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "73eb5652-2003-003e-0209-41615e000000", + "Body" : "b2f2c221-5fbc-4bdb-b3b2-196eb7999e9fTue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAAASEomAlB1wE=Tue, 04 May 2021 17:19:09 GMT1test messagec136509b-1e8d-4671-b3af-c0d856c03765Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAAASEomAlB1wE=Tue, 04 May 2021 17:19:09 GMT1dGVzdCBtZXNzYWdl", + "x-ms-client-request-id" : "b7ffe18e-381f-41d8-8ddd-aaa1914582a3", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.queue.core.windows.net/7853c94a7853c94ab6278786d33fcba66eaa452b8f/messages/b2f2c221-5fbc-4bdb-b3b2-196eb7999e9f?popreceipt=AgAAAAMAAAAAAAAAASEomAlB1wE%3D", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "c969bc1e-504a-4a84-9568-d2b593512f05" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "fa8afad9-b003-0013-5709-41d22d000000", + "x-ms-client-request-id" : "c969bc1e-504a-4a84-9568-d2b593512f05", + "Date" : "Tue, 04 May 2021 17:18:38 GMT" + }, + "Exception" : null + } ], + "variables" : [ "7853c94a7853c94ab6278786d33fcba66eaa452b8f" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsDequeueEncodedMessage.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsDequeueEncodedMessage.json new file mode 100644 index 0000000000000..3da130bff5f5e --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsDequeueEncodedMessage.json @@ -0,0 +1,67 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/38e747d438e747d4be6811136bbe98e4d8dc4616bd", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "83d0607e-d722-433b-a37e-d2633cc14f8e" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "60ea4cbf-d003-002a-3309-412931000000", + "x-ms-client-request-id" : "83d0607e-d722-433b-a37e-d2633cc14f8e", + "Date" : "Tue, 04 May 2021 17:18:38 GMT" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/38e747d438e747d4be6811136bbe98e4d8dc4616bd/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "1f14cc61-b915-4fff-81b3-a9831e1c5813", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "10a7c4e9-c003-0044-0f09-417c1e000000", + "Body" : "3e4adec5-1345-418c-8c9e-6e677c2eb9a5Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAAKxYchglB1wE=Tue, 04 May 2021 17:18:39 GMT", + "x-ms-client-request-id" : "1f14cc61-b915-4fff-81b3-a9831e1c5813", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/38e747d438e747d4be6811136bbe98e4d8dc4616bd/messages?numofmessages=1", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "14cb5b97-3455-46cc-842f-f7db30f6a580" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "b77ad6e8-3003-00e9-6509-41306b000000", + "Body" : "3e4adec5-1345-418c-8c9e-6e677c2eb9a5Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAALTsTmAlB1wE=Tue, 04 May 2021 17:19:09 GMT1dGVzdCBtZXNzYWdl", + "x-ms-client-request-id" : "14cb5b97-3455-46cc-842f-f7db30f6a580", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "38e747d438e747d4be6811136bbe98e4d8dc4616bd" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsDequeueFailsWithoutHandler.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsDequeueFailsWithoutHandler.json new file mode 100644 index 0000000000000..982933d31d0b5 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsDequeueFailsWithoutHandler.json @@ -0,0 +1,67 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/7435741a7435741a16f201321f1c3ad5f9f547c6a9", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "8493d4a0-f31f-465d-b36f-5eafa50ce080" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "536624a6-4003-00dc-7009-415c7f000000", + "x-ms-client-request-id" : "8493d4a0-f31f-465d-b36f-5eafa50ce080", + "Date" : "Tue, 04 May 2021 17:18:38 GMT" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/7435741a7435741a16f201321f1c3ad5f9f547c6a9/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "4defda6f-15da-4cf6-b946-459243b32ded", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "536624b0-4003-00dc-7809-415c7f000000", + "Body" : "b2696e18-1258-4294-8beb-6e547e8ff7e5Tue, 04 May 2021 17:18:38 GMTTue, 11 May 2021 17:18:38 GMTAgAAAAMAAAAAAAAA9WjthQlB1wE=Tue, 04 May 2021 17:18:38 GMT", + "x-ms-client-request-id" : "4defda6f-15da-4cf6-b946-459243b32ded", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/7435741a7435741a16f201321f1c3ad5f9f547c6a9/messages?numofmessages=1", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "55135b94-cc50-400e-bbeb-d7c7aa437cbc" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "42b033dc-2003-0073-6009-41aeb2000000", + "Body" : "b2696e18-1258-4294-8beb-6e547e8ff7e5Tue, 04 May 2021 17:18:38 GMTTue, 11 May 2021 17:18:38 GMTAgAAAAMAAAAAAAAAp73plwlB1wE=Tue, 04 May 2021 17:19:08 GMT1test message", + "x-ms-client-request-id" : "55135b94-cc50-400e-bbeb-d7c7aa437cbc", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "7435741a7435741a16f201321f1c3ad5f9f547c6a9" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsDequeueMessage.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsDequeueMessage.json new file mode 100644 index 0000000000000..ed6a0d1246947 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsDequeueMessage.json @@ -0,0 +1,67 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/a13b2587a13b258710583425e5341f9eb6f24a12a6", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "fca99cdd-0990-4cff-bece-f06eba941342" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "b7beabe8-a003-0052-1309-418ac9000000", + "x-ms-client-request-id" : "fca99cdd-0990-4cff-bece-f06eba941342", + "Date" : "Tue, 04 May 2021 17:18:38 GMT" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/a13b2587a13b258710583425e5341f9eb6f24a12a6/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "f3138da7-517d-4320-8f53-e8da182e47ab", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "34fa7ad6-1003-0078-0f09-4155d9000000", + "Body" : "83246d7a-66f7-44eb-97ac-7496a05315e6Tue, 04 May 2021 17:18:38 GMTTue, 11 May 2021 17:18:38 GMTAgAAAAMAAAAAAAAAmFfshQlB1wE=Tue, 04 May 2021 17:18:38 GMT", + "x-ms-client-request-id" : "f3138da7-517d-4320-8f53-e8da182e47ab", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/a13b2587a13b258710583425e5341f9eb6f24a12a6/messages?numofmessages=1", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "cd561857-6a16-4a8b-82b6-022b49f207bf" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "895e7b28-6003-00a9-6b09-413753000000", + "Body" : "83246d7a-66f7-44eb-97ac-7496a05315e6Tue, 04 May 2021 17:18:38 GMTTue, 11 May 2021 17:18:38 GMTAgAAAAMAAAAAAAAAhEjplwlB1wE=Tue, 04 May 2021 17:19:08 GMT1test message", + "x-ms-client-request-id" : "cd561857-6a16-4a8b-82b6-022b49f207bf", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "a13b2587a13b258710583425e5341f9eb6f24a12a6" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsDequeueMessageFromEmptyQueue.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsDequeueMessageFromEmptyQueue.json new file mode 100644 index 0000000000000..e324bb77138bc --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsDequeueMessageFromEmptyQueue.json @@ -0,0 +1,45 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/5bb25a835bb25a831073401988bf6573ba4d4c99a3", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "c9503d50-72d3-4595-bf05-90b1e9a9c641" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "af9d24c4-5003-0046-0709-41c2a6000000", + "x-ms-client-request-id" : "c9503d50-72d3-4595-bf05-90b1e9a9c641", + "Date" : "Tue, 04 May 2021 17:18:38 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/5bb25a835bb25a831073401988bf6573ba4d4c99a3/messages?numofmessages=1", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "3e19c957-129e-4111-b851-cd229e3d37e4" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "fde0430d-8003-00a1-6e09-412d5c000000", + "Body" : "", + "x-ms-client-request-id" : "3e19c957-129e-4111-b851-cd229e3d37e4", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "5bb25a835bb25a831073401988bf6573ba4d4c99a3" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsDequeueMultipleMessages.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsDequeueMultipleMessages.json new file mode 100644 index 0000000000000..a365b69a96c77 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsDequeueMultipleMessages.json @@ -0,0 +1,89 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/08cedc4a08cedc4a24099363e641413e8ec2474394", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "d22d8cca-6955-4c36-88a1-711ac0c4189d" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "26562d7e-0003-004b-1e09-410a72000000", + "x-ms-client-request-id" : "d22d8cca-6955-4c36-88a1-711ac0c4189d", + "Date" : "Tue, 04 May 2021 17:18:38 GMT" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/08cedc4a08cedc4a24099363e641413e8ec2474394/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "e8d93d64-ecc3-4d23-91d3-cb80dfab389b", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "76d94368-e003-0021-7709-41d25a000000", + "Body" : "4788d10a-dcb7-4cd7-8521-7986ca39b352Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAA60UYhglB1wE=Tue, 04 May 2021 17:18:39 GMT", + "x-ms-client-request-id" : "e8d93d64-ecc3-4d23-91d3-cb80dfab389b", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/08cedc4a08cedc4a24099363e641413e8ec2474394/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "71b3baa7-bbef-4edc-9498-0fb0a1bf1a1e", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "d1814e57-2003-00e5-7b09-41a763000000", + "Body" : "30b34d82-eafe-4a5d-a2e4-daf853b5288bTue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAA9a0nhglB1wE=Tue, 04 May 2021 17:18:39 GMT", + "x-ms-client-request-id" : "71b3baa7-bbef-4edc-9498-0fb0a1bf1a1e", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/08cedc4a08cedc4a24099363e641413e8ec2474394/messages?numofmessages=2", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "d4a498ee-43a9-46a2-8aac-1e7aca197fa9" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "b7beabfb-a003-0052-2209-418ac9000000", + "Body" : "4788d10a-dcb7-4cd7-8521-7986ca39b352Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAAF28omAlB1wE=Tue, 04 May 2021 17:19:09 GMT1test message 130b34d82-eafe-4a5d-a2e4-daf853b5288bTue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAAF28omAlB1wE=Tue, 04 May 2021 17:19:09 GMT1test message 2", + "x-ms-client-request-id" : "d4a498ee-43a9-46a2-8aac-1e7aca197fa9", + "Date" : "Tue, 04 May 2021 17:18:39 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "08cedc4a08cedc4a24099363e641413e8ec2474394" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsDequeueTooManyMessage.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsDequeueTooManyMessage.json new file mode 100644 index 0000000000000..5d233a7d72b20 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsDequeueTooManyMessage.json @@ -0,0 +1,45 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/46f449bf46f449bf07a98948d31d7496bb9e496cb9", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "53b90792-d2fa-4a21-8a2b-2a995a28a062" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "af9d24e7-5003-0046-2709-41c2a6000000", + "x-ms-client-request-id" : "53b90792-d2fa-4a21-8a2b-2a995a28a062", + "Date" : "Tue, 04 May 2021 17:18:38 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/46f449bf46f449bf07a98948d31d7496bb9e496cb9/messages?numofmessages=33", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "fd12ed11-9fb8-4296-862f-b4922b2d5541" + }, + "Response" : { + "content-length" : "456", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "OutOfRangeQueryParameterValue", + "retry-after" : "0", + "StatusCode" : "400", + "x-ms-request-id" : "4c99f6c7-8003-00d3-4009-412a13000000", + "Body" : "OutOfRangeQueryParameterValueOne of the query parameters specified in the request URI is outside the permissible range.\nRequestId:4c99f6c7-8003-00d3-4009-412a13000000\nTime:2021-05-04T17:18:39.1100901Znumofmessages33132", + "x-ms-client-request-id" : "fd12ed11-9fb8-4296-862f-b4922b2d5541", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "46f449bf46f449bf07a98948d31d7496bb9e496cb9" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsDequeueWithHandler.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsDequeueWithHandler.json new file mode 100644 index 0000000000000..f89989df0db9d --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsDequeueWithHandler.json @@ -0,0 +1,89 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/495ee607495ee607bc0555731fa2e2438b064ffb9a", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "af50efec-baa6-44a9-b609-24e4bb98b88b" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "5ef6fb48-8003-0055-2209-41e6aa000000", + "x-ms-client-request-id" : "af50efec-baa6-44a9-b609-24e4bb98b88b", + "Date" : "Tue, 04 May 2021 17:18:37 GMT" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/495ee607495ee607bc0555731fa2e2438b064ffb9a/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "5106dda2-c25a-41b8-a6f3-9188de3a86db", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "4c99f6c3-8003-00d3-3d09-412a13000000", + "Body" : "b4057b07-7890-4fa5-9fdd-c2591b1114a8Tue, 04 May 2021 17:18:38 GMTTue, 11 May 2021 17:18:38 GMTAgAAAAMAAAAAAAAAVPwDhglB1wE=Tue, 04 May 2021 17:18:38 GMT", + "x-ms-client-request-id" : "5106dda2-c25a-41b8-a6f3-9188de3a86db", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/495ee607495ee607bc0555731fa2e2438b064ffb9a/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "bd5b8416-7e96-4ed8-86fa-4cf45d3e85e9", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "4a84b4f1-a003-007d-5009-418702000000", + "Body" : "80becd48-c095-4873-9ba3-911d07db6b67Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAAY4sThglB1wE=Tue, 04 May 2021 17:18:39 GMT", + "x-ms-client-request-id" : "bd5b8416-7e96-4ed8-86fa-4cf45d3e85e9", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/495ee607495ee607bc0555731fa2e2438b064ffb9a/messages?numofmessages=10", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "74e9799a-d68a-489b-bcd0-48297830fc89" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "73eb5640-2003-003e-7109-41615e000000", + "Body" : "b4057b07-7890-4fa5-9fdd-c2591b1114a8Tue, 04 May 2021 17:18:38 GMTTue, 11 May 2021 17:18:38 GMTAgAAAAMAAAAAAAAA9jYDmAlB1wE=Tue, 04 May 2021 17:19:09 GMT1test message80becd48-c095-4873-9ba3-911d07db6b67Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAA9jYDmAlB1wE=Tue, 04 May 2021 17:19:09 GMT1dGVzdCBtZXNzYWdl", + "x-ms-client-request-id" : "74e9799a-d68a-489b-bcd0-48297830fc89", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "495ee607495ee607bc0555731fa2e2438b064ffb9a" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsDequeueWithHandlerError.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsDequeueWithHandlerError.json new file mode 100644 index 0000000000000..2d610e89f86a5 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsDequeueWithHandlerError.json @@ -0,0 +1,89 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/9ab1a6779ab1a677d2114267c2369705bdf64518b1", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "5b29e1e8-28b0-4cf6-82a9-b4f9e5a23c83" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "73eb5631-2003-003e-6409-41615e000000", + "x-ms-client-request-id" : "5b29e1e8-28b0-4cf6-82a9-b4f9e5a23c83", + "Date" : "Tue, 04 May 2021 17:18:38 GMT" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/9ab1a6779ab1a677d2114267c2369705bdf64518b1/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "723c2fb2-debf-48e8-96f6-5456dfd3a3f2", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "ddc2faa6-e003-0053-7c09-41d515000000", + "Body" : "78d3660a-bc1e-4e0b-92db-95e0c9ab0653Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAAqoIXhglB1wE=Tue, 04 May 2021 17:18:39 GMT", + "x-ms-client-request-id" : "723c2fb2-debf-48e8-96f6-5456dfd3a3f2", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/9ab1a6779ab1a677d2114267c2369705bdf64518b1/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "428f8ea2-a5c0-421e-9962-71b82a96084c", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "1382cd1e-b003-002c-0709-411a8e000000", + "Body" : "67ebc933-5483-487c-aa04-046376b7cfdaTue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAAWdklhglB1wE=Tue, 04 May 2021 17:18:39 GMT", + "x-ms-client-request-id" : "428f8ea2-a5c0-421e-9962-71b82a96084c", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/9ab1a6779ab1a677d2114267c2369705bdf64518b1/messages?numofmessages=10", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "59dbbfa4-1182-4860-b2b5-3f13de15a297" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "ea4bba49-6003-0086-3909-413a98000000", + "Body" : "78d3660a-bc1e-4e0b-92db-95e0c9ab0653Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAA0YQnmAlB1wE=Tue, 04 May 2021 17:19:09 GMT1test message67ebc933-5483-487c-aa04-046376b7cfdaTue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAA0YQnmAlB1wE=Tue, 04 May 2021 17:19:09 GMT1dGVzdCBtZXNzYWdl", + "x-ms-client-request-id" : "59dbbfa4-1182-4860-b2b5-3f13de15a297", + "Date" : "Tue, 04 May 2021 17:18:39 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "9ab1a6779ab1a677d2114267c2369705bdf64518b1" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsEnqueueDequeueNon-UTFMessage.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsEnqueueDequeueNon-UTFMessage.json new file mode 100644 index 0000000000000..db64392094bc0 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsEnqueueDequeueNon-UTFMessage.json @@ -0,0 +1,67 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/3a07a9263a07a926a955819618671fe77d114e1bb9", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "4a140904-e342-42d5-a24a-5498869eb184" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "433a3005-e003-00a7-0309-411ee3000000", + "x-ms-client-request-id" : "4a140904-e342-42d5-a24a-5498869eb184", + "Date" : "Tue, 04 May 2021 17:18:39 GMT" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/3a07a9263a07a926a955819618671fe77d114e1bb9/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "8cf87998-5674-41be-860d-a76b49ab5e7c", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "42b033e5-2003-0073-6709-41aeb2000000", + "Body" : "e5e286a0-0b9b-4d1b-8336-758f36972dcaTue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAAqJwdhglB1wE=Tue, 04 May 2021 17:18:39 GMT", + "x-ms-client-request-id" : "8cf87998-5674-41be-860d-a76b49ab5e7c", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/3a07a9263a07a926a955819618671fe77d114e1bb9/messages?numofmessages=1", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "445473d4-463b-4024-8ba9-c482e50fb85b" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "76d94375-e003-0021-0309-41d25a000000", + "Body" : "e5e286a0-0b9b-4d1b-8336-758f36972dcaTue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAAJRQTmAlB1wE=Tue, 04 May 2021 17:19:09 GMT1/wA=", + "x-ms-client-request-id" : "445473d4-463b-4024-8ba9-c482e50fb85b", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "3a07a9263a07a926a955819618671fe77d114e1bb9" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsEnqueueEmptyMessage.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsEnqueueEmptyMessage.json new file mode 100644 index 0000000000000..0d783aba05bbb --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsEnqueueEmptyMessage.json @@ -0,0 +1,67 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/899ce18c899ce18cde776536a04f6da3c2344a618b", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "0334a4f4-3b20-4ab0-a65d-f69ac68b6801" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "6980d1fa-1003-0035-4709-419a35000000", + "x-ms-client-request-id" : "0334a4f4-3b20-4ab0-a65d-f69ac68b6801", + "Date" : "Tue, 04 May 2021 17:18:37 GMT" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/899ce18c899ce18cde776536a04f6da3c2344a618b/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "c577d281-add3-408d-b8be-8bb0705a0262", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "7c5d39b3-2003-0011-7609-416c95000000", + "Body" : "19802290-314d-4f54-89bc-0c63db92e611Tue, 04 May 2021 17:18:38 GMTTue, 11 May 2021 17:18:38 GMTAgAAAAMAAAAAAAAAiVyZhQlB1wE=Tue, 04 May 2021 17:18:38 GMT", + "x-ms-client-request-id" : "c577d281-add3-408d-b8be-8bb0705a0262", + "Date" : "Tue, 04 May 2021 17:18:37 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/899ce18c899ce18cde776536a04f6da3c2344a618b/messages?peekonly=true", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "c7069d1c-e429-4c5d-b6ed-b6ae1f15b0ab" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "1382cd08-b003-002c-7409-411a8e000000", + "Body" : "19802290-314d-4f54-89bc-0c63db92e611Tue, 04 May 2021 17:18:38 GMTTue, 11 May 2021 17:18:38 GMT0", + "x-ms-client-request-id" : "c7069d1c-e429-4c5d-b6ed-b6ae1f15b0ab", + "Date" : "Tue, 04 May 2021 17:18:37 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "899ce18c899ce18cde776536a04f6da3c2344a618b" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsEnqueueMessage.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsEnqueueMessage.json new file mode 100644 index 0000000000000..9f8a66e9b2482 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsEnqueueMessage.json @@ -0,0 +1,67 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/dbfd7b52dbfd7b5206037931a36814f7a99740e884", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "1c7fb138-937b-4b03-85c5-1c38dd548c94" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "d9b899a3-f003-0012-7909-418df1000000", + "x-ms-client-request-id" : "1c7fb138-937b-4b03-85c5-1c38dd548c94", + "Date" : "Tue, 04 May 2021 17:18:37 GMT" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/dbfd7b52dbfd7b5206037931a36814f7a99740e884/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "ee715f74-5916-477f-96ec-2956060ecd49", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "fa8afaa8-b003-0013-2e09-41d22d000000", + "Body" : "6d4d471b-3b1e-42e5-ad73-920d3766dc5dTue, 04 May 2021 17:18:38 GMTTue, 11 May 2021 17:18:38 GMTAgAAAAMAAAAAAAAAoyiEhQlB1wE=Tue, 04 May 2021 17:18:38 GMT", + "x-ms-client-request-id" : "ee715f74-5916-477f-96ec-2956060ecd49", + "Date" : "Tue, 04 May 2021 17:18:37 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/dbfd7b52dbfd7b5206037931a36814f7a99740e884/messages?peekonly=true", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "0258d05e-3954-4d56-b014-901bea7c9b4b" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "fa8afab6-b003-0013-3a09-41d22d000000", + "Body" : "6d4d471b-3b1e-42e5-ad73-920d3766dc5dTue, 04 May 2021 17:18:38 GMTTue, 11 May 2021 17:18:38 GMT0test message", + "x-ms-client-request-id" : "0258d05e-3954-4d56-b014-901bea7c9b4b", + "Date" : "Tue, 04 May 2021 17:18:37 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "dbfd7b52dbfd7b5206037931a36814f7a99740e884" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsEnqueueMessageBinaryData.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsEnqueueMessageBinaryData.json new file mode 100644 index 0000000000000..a72c50c429d90 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsEnqueueMessageBinaryData.json @@ -0,0 +1,67 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/fdb58da0fdb58da061a19120e362c31342474d1c93", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "7f685c58-9943-4254-abcc-e8a4e2e17c76" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "fa8afaa3-b003-0013-2a09-41d22d000000", + "x-ms-client-request-id" : "7f685c58-9943-4254-abcc-e8a4e2e17c76", + "Date" : "Tue, 04 May 2021 17:18:37 GMT" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/fdb58da0fdb58da061a19120e362c31342474d1c93/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "81fab20a-8c64-4d39-93a3-5f20e2ea4eb7", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "6980d20d-1003-0035-5609-419a35000000", + "Body" : "b8996f2a-26bc-47d3-981f-1283e798b41cTue, 04 May 2021 17:18:38 GMTTue, 11 May 2021 17:18:38 GMTAgAAAAMAAAAAAAAA9tWghQlB1wE=Tue, 04 May 2021 17:18:38 GMT", + "x-ms-client-request-id" : "81fab20a-8c64-4d39-93a3-5f20e2ea4eb7", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/fdb58da0fdb58da061a19120e362c31342474d1c93/messages?peekonly=true", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "4b859fa2-5dcd-45fe-acfa-299348c25516" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "90ba11b5-f003-00bb-5c09-414c83000000", + "Body" : "b8996f2a-26bc-47d3-981f-1283e798b41cTue, 04 May 2021 17:18:38 GMTTue, 11 May 2021 17:18:38 GMT0test message", + "x-ms-client-request-id" : "4b859fa2-5dcd-45fe-acfa-299348c25516", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "fdb58da0fdb58da061a19120e362c31342474d1c93" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsEnqueueMessageEncodedMessage.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsEnqueueMessageEncodedMessage.json new file mode 100644 index 0000000000000..198bf8295c331 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsEnqueueMessageEncodedMessage.json @@ -0,0 +1,67 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/6f65be9c6f65be9cc1767858e9938f93abe24af8be", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "30fc9a03-5a38-4481-ae20-d79ee1111ce6" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "946d046e-0003-00dd-4a09-4103a3000000", + "x-ms-client-request-id" : "30fc9a03-5a38-4481-ae20-d79ee1111ce6", + "Date" : "Tue, 04 May 2021 17:18:37 GMT" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/6f65be9c6f65be9cc1767858e9938f93abe24af8be/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "f77c611a-edcf-478f-9cca-b67e4babd643", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "4a84b4d5-a003-007d-3509-418702000000", + "Body" : "dd1f5371-192a-4652-ac8f-098337586baaTue, 04 May 2021 17:18:38 GMTTue, 11 May 2021 17:18:38 GMTAgAAAAMAAAAAAAAA8MzRhQlB1wE=Tue, 04 May 2021 17:18:38 GMT", + "x-ms-client-request-id" : "f77c611a-edcf-478f-9cca-b67e4babd643", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/6f65be9c6f65be9cc1767858e9938f93abe24af8be/messages?peekonly=true", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "0743b6a1-e257-4973-a801-490220eeaf99" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "4a84b4ec-a003-007d-4b09-418702000000", + "Body" : "dd1f5371-192a-4652-ac8f-098337586baaTue, 04 May 2021 17:18:38 GMTTue, 11 May 2021 17:18:38 GMT0dGVzdCBtZXNzYWdl", + "x-ms-client-request-id" : "0743b6a1-e257-4973-a801-490220eeaf99", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "6f65be9c6f65be9cc1767858e9938f93abe24af8be" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsEnqueuePeekNon-UTFMessage.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsEnqueuePeekNon-UTFMessage.json new file mode 100644 index 0000000000000..db774340d1306 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsEnqueuePeekNon-UTFMessage.json @@ -0,0 +1,67 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/1c134bbc1c134bbcc31406999a802fde04914a39a0", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "ce0d743a-e871-45d9-af2d-a6735e0d15a1" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "34fa7b04-1003-0078-3709-4155d9000000", + "x-ms-client-request-id" : "ce0d743a-e871-45d9-af2d-a6735e0d15a1", + "Date" : "Tue, 04 May 2021 17:18:38 GMT" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/1c134bbc1c134bbcc31406999a802fde04914a39a0/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "f1ed8a00-51b6-4958-8d58-9288266b7072", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "d9b899f5-f003-0012-4009-418df1000000", + "Body" : "07ba3486-8e37-4b11-9aa1-6e08874996dcTue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAAXL8fhglB1wE=Tue, 04 May 2021 17:18:39 GMT", + "x-ms-client-request-id" : "f1ed8a00-51b6-4958-8d58-9288266b7072", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/1c134bbc1c134bbcc31406999a802fde04914a39a0/messages?peekonly=true", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "4591bcb5-4aee-41e4-b079-81b7156884f5" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "d99b06b3-6003-004d-2509-4139cd000000", + "Body" : "07ba3486-8e37-4b11-9aa1-6e08874996dcTue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMT0/wA=", + "x-ms-client-request-id" : "4591bcb5-4aee-41e4-b079-81b7156884f5", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "1c134bbc1c134bbcc31406999a802fde04914a39a0" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsEnqueueTimeToLive.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsEnqueueTimeToLive.json new file mode 100644 index 0000000000000..2962012c140ac --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsEnqueueTimeToLive.json @@ -0,0 +1,45 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/75485833754858331d8908011df273f8985d448d93", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "d9e5a250-53af-4bf5-b38e-28ba123cc92b" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "b7beabd7-a003-0052-0409-418ac9000000", + "x-ms-client-request-id" : "d9e5a250-53af-4bf5-b38e-28ba123cc92b", + "Date" : "Tue, 04 May 2021 17:18:37 GMT" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/75485833754858331d8908011df273f8985d448d93/messages?visibilitytimeout=0&messagettl=2", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "0e99ec4c-fcc4-45e3-968c-9000e2f8037d", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "fdcb00bd-7003-0033-0a09-41a98a000000", + "Body" : "24fa7980-e388-436a-9bf3-6c1debd47e65Tue, 04 May 2021 17:18:38 GMTTue, 04 May 2021 17:18:40 GMTAgAAAAMAAAAAAAAAIrOwhQlB1wE=Tue, 04 May 2021 17:18:38 GMT", + "x-ms-client-request-id" : "0e99ec4c-fcc4-45e3-968c-9000e2f8037d", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "75485833754858331d8908011df273f8985d448d93" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsGetAccessPolicy.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsGetAccessPolicy.json new file mode 100644 index 0000000000000..5ffd76b9e2684 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsGetAccessPolicy.json @@ -0,0 +1,45 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/4f1153bf4f1153bf7bd26702ebe25a676c784072b2", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "b32e2ea0-3fe7-4cb5-a46c-500e562a2e1b" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "92671e59-a003-000f-3409-41804d000000", + "x-ms-client-request-id" : "b32e2ea0-3fe7-4cb5-a46c-500e562a2e1b", + "Date" : "Tue, 04 May 2021 17:18:37 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/4f1153bf4f1153bf7bd26702ebe25a676c784072b2?comp=acl", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "bacba881-d276-4272-b81f-8d86e682d840" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "34fa7aae-1003-0078-6b09-4155d9000000", + "Body" : "", + "x-ms-client-request-id" : "bacba881-d276-4272-b81f-8d86e682d840", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "4f1153bf4f1153bf7bd26702ebe25a676c784072b2" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsGetAccessPolicyDoesError.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsGetAccessPolicyDoesError.json new file mode 100644 index 0000000000000..e823e70314d2f --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsGetAccessPolicyDoesError.json @@ -0,0 +1,26 @@ +{ + "networkCallRecords" : [ { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/1169585d1169585d4a997440ffdc4fc1692a4e6ba6?comp=acl", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "7b30c9aa-1861-4286-a999-ab767d12d64c" + }, + "Response" : { + "content-length" : "217", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "QueueNotFound", + "retry-after" : "0", + "StatusCode" : "404", + "x-ms-request-id" : "8e697fb0-c003-007b-5b09-41b4bd000000", + "Body" : "QueueNotFoundThe specified queue does not exist.\nRequestId:8e697fb0-c003-007b-5b09-41b4bd000000\nTime:2021-05-04T17:18:38.7410052Z", + "x-ms-client-request-id" : "7b30c9aa-1861-4286-a999-ab767d12d64c", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "1169585d1169585d4a997440ffdc4fc1692a4e6ba6" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsGetProperties.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsGetProperties.json new file mode 100644 index 0000000000000..f8d4ef1fe8a43 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsGetProperties.json @@ -0,0 +1,45 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/5be6f3675be6f367b8602264c67f7004449d433a8c", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "3d0c2cae-d6d2-4486-83a3-ba12b6bfd195" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "b7beabcc-a003-0052-7a09-418ac9000000", + "x-ms-client-request-id" : "3d0c2cae-d6d2-4486-83a3-ba12b6bfd195", + "Date" : "Tue, 04 May 2021 17:18:37 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/5be6f3675be6f367b8602264c67f7004449d433a8c?comp=metadata", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "078dcf88-6a2b-4deb-8e4f-ebfbfebce68a" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-meta-metadata" : "value", + "retry-after" : "0", + "x-ms-approximate-messages-count" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "b7beabd0-a003-0052-7d09-418ac9000000", + "x-ms-client-request-id" : "078dcf88-6a2b-4deb-8e4f-ebfbfebce68a", + "Date" : "Tue, 04 May 2021 17:18:37 GMT" + }, + "Exception" : null + } ], + "variables" : [ "5be6f3675be6f367b8602264c67f7004449d433a8c" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsGetPropertiesError.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsGetPropertiesError.json new file mode 100644 index 0000000000000..5195adba2bb83 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsGetPropertiesError.json @@ -0,0 +1,26 @@ +{ + "networkCallRecords" : [ { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/d7fda9ecd7fda9ece04852809a0ea596847943788b?comp=metadata", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "664b8b28-bc7f-4faa-a231-fa413b9a5b68" + }, + "Response" : { + "content-length" : "217", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "QueueNotFound", + "retry-after" : "0", + "StatusCode" : "404", + "x-ms-request-id" : "34fa7a04-1003-0078-4709-4155d9000000", + "Body" : "QueueNotFoundThe specified queue does not exist.\nRequestId:34fa7a04-1003-0078-4709-4155d9000000\nTime:2021-05-04T17:18:37.4649208Z", + "x-ms-client-request-id" : "664b8b28-bc7f-4faa-a231-fa413b9a5b68", + "Date" : "Tue, 04 May 2021 17:18:37 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "d7fda9ecd7fda9ece04852809a0ea596847943788b" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsGetQueueName.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsGetQueueName.json new file mode 100644 index 0000000000000..8f6c7c4c4bad7 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsGetQueueName.json @@ -0,0 +1,4 @@ +{ + "networkCallRecords" : [ ], + "variables" : [ "1a483acb1a483acb81043509b5a298f87f9349628b" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsGetQueueURL.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsGetQueueURL.json new file mode 100644 index 0000000000000..6c2692ff17df2 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsGetQueueURL.json @@ -0,0 +1,4 @@ +{ + "networkCallRecords" : [ ], + "variables" : [ "35f5ffa835f5ffa853465070160312605b804eeb92" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsIPBasedEndpoint.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsIPBasedEndpoint.json new file mode 100644 index 0000000000000..aa0cebdf5a0ed --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsIPBasedEndpoint.json @@ -0,0 +1,4 @@ +{ + "networkCallRecords" : [ ], + "variables" : [ "677367d4677367d48d592420a90dea0d93324f77b5" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsPeekEncodedMessage.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsPeekEncodedMessage.json new file mode 100644 index 0000000000000..7fd74c7001262 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsPeekEncodedMessage.json @@ -0,0 +1,67 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/28ac1b5d28ac1b5dbf48266653c543e6cba44f479f", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "38ff089a-a787-48fb-8be3-6ef8a3f4cdc5" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "b77ad6e1-3003-00e9-6009-41306b000000", + "x-ms-client-request-id" : "38ff089a-a787-48fb-8be3-6ef8a3f4cdc5", + "Date" : "Tue, 04 May 2021 17:18:38 GMT" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/28ac1b5d28ac1b5dbf48266653c543e6cba44f479f/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "e7fa886b-c7b4-4f1b-86ae-c58d2b820af3", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "78b2342b-8003-0008-4a09-41ec2e000000", + "Body" : "b55b95dc-f7c9-431f-843b-d45378be8642Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAAJkoohglB1wE=Tue, 04 May 2021 17:18:39 GMT", + "x-ms-client-request-id" : "e7fa886b-c7b4-4f1b-86ae-c58d2b820af3", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/28ac1b5d28ac1b5dbf48266653c543e6cba44f479f/messages?peekonly=true", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "19fda6a2-c683-4e34-b476-10edec4c2f65" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "1382cd24-b003-002c-0b09-411a8e000000", + "Body" : "b55b95dc-f7c9-431f-843b-d45378be8642Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMT0dGVzdCBtZXNzYWdl", + "x-ms-client-request-id" : "19fda6a2-c683-4e34-b476-10edec4c2f65", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "28ac1b5d28ac1b5dbf48266653c543e6cba44f479f" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsPeekFailsWithoutHandler.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsPeekFailsWithoutHandler.json new file mode 100644 index 0000000000000..48aa5ff326ebf --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsPeekFailsWithoutHandler.json @@ -0,0 +1,67 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/7f1566937f156693d24864800438da16f85b469e92", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "3f3bca68-0b17-482b-8cfd-6274b7d7799c" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "946d0495-0003-00dd-6609-4103a3000000", + "x-ms-client-request-id" : "3f3bca68-0b17-482b-8cfd-6274b7d7799c", + "Date" : "Tue, 04 May 2021 17:18:38 GMT" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/7f1566937f156693d24864800438da16f85b469e92/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "1c11acaf-22c7-4d99-8862-224de5e53882", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "2b951121-0003-0006-6009-41c59e000000", + "Body" : "b0a59702-8a7f-4a53-aa8a-061e0cdc49f5Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAAJXExhglB1wE=Tue, 04 May 2021 17:18:39 GMT", + "x-ms-client-request-id" : "1c11acaf-22c7-4d99-8862-224de5e53882", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/7f1566937f156693d24864800438da16f85b469e92/messages?peekonly=true", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "bb5f7c5a-8dc3-43fe-ab1b-4988527ac49b" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "7b738699-2003-002e-2009-41a436000000", + "Body" : "b0a59702-8a7f-4a53-aa8a-061e0cdc49f5Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMT0test message", + "x-ms-client-request-id" : "bb5f7c5a-8dc3-43fe-ab1b-4988527ac49b", + "Date" : "Tue, 04 May 2021 17:18:39 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "7f1566937f156693d24864800438da16f85b469e92" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsPeekMessage.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsPeekMessage.json new file mode 100644 index 0000000000000..d4d3c90bb23b2 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsPeekMessage.json @@ -0,0 +1,67 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/bfd13627bfd13627f88072235141af268f304994ad", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "da933a30-93c5-4c53-b57e-4bbbbab8640e" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "fa8afac7-b003-0013-4909-41d22d000000", + "x-ms-client-request-id" : "da933a30-93c5-4c53-b57e-4bbbbab8640e", + "Date" : "Tue, 04 May 2021 17:18:38 GMT" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/bfd13627bfd13627f88072235141af268f304994ad/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "88ab101a-801f-4e70-a323-f9d97b65010a", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "433a300d-e003-00a7-0a09-411ee3000000", + "Body" : "e7a3a8d9-dd0c-4450-a18c-a02baddbf0daTue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAABNUnhglB1wE=Tue, 04 May 2021 17:18:39 GMT", + "x-ms-client-request-id" : "88ab101a-801f-4e70-a323-f9d97b65010a", + "Date" : "Tue, 04 May 2021 17:18:39 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/bfd13627bfd13627f88072235141af268f304994ad/messages?peekonly=true", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "f83bb92f-98c6-4b71-b4c8-ab0187b85ff1" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "e2d48e8d-d003-00ce-6709-4127af000000", + "Body" : "e7a3a8d9-dd0c-4450-a18c-a02baddbf0daTue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMT0test message", + "x-ms-client-request-id" : "f83bb92f-98c6-4b71-b4c8-ab0187b85ff1", + "Date" : "Tue, 04 May 2021 17:18:39 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "bfd13627bfd13627f88072235141af268f304994ad" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsPeekMessageFromEmptyQueue.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsPeekMessageFromEmptyQueue.json new file mode 100644 index 0000000000000..d6f06b86fa990 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsPeekMessageFromEmptyQueue.json @@ -0,0 +1,45 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/424a03e9424a03e9fed62019842107004e7c4cfe98", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "c2eda2ab-5c35-4efa-9865-fce25ed03e9a" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "ec6c63a6-7003-00e8-2b09-416fb7000000", + "x-ms-client-request-id" : "c2eda2ab-5c35-4efa-9865-fce25ed03e9a", + "Date" : "Tue, 04 May 2021 17:18:38 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/424a03e9424a03e9fed62019842107004e7c4cfe98/messages?peekonly=true", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "2d4aaffe-7e1a-48b6-a660-e1714d9fc616" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "beffcc38-b003-00c8-1709-411410000000", + "Body" : "", + "x-ms-client-request-id" : "2d4aaffe-7e1a-48b6-a660-e1714d9fc616", + "Date" : "Tue, 04 May 2021 17:18:39 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "424a03e9424a03e9fed62019842107004e7c4cfe98" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsPeekMessagesError.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsPeekMessagesError.json new file mode 100644 index 0000000000000..ae372d4038626 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsPeekMessagesError.json @@ -0,0 +1,26 @@ +{ + "networkCallRecords" : [ { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/0268a5dd0268a5dd06000127838e693158be425caf/messages?peekonly=true", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "699d2372-386b-499f-a393-bea362e7766e" + }, + "Response" : { + "content-length" : "217", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "QueueNotFound", + "retry-after" : "0", + "StatusCode" : "404", + "x-ms-request-id" : "fa8afad5-b003-0013-5409-41d22d000000", + "Body" : "QueueNotFoundThe specified queue does not exist.\nRequestId:fa8afad5-b003-0013-5409-41d22d000000\nTime:2021-05-04T17:18:39.4065496Z", + "x-ms-client-request-id" : "699d2372-386b-499f-a393-bea362e7766e", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "0268a5dd0268a5dd06000127838e693158be425caf" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsPeekMultipleMessages.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsPeekMultipleMessages.json new file mode 100644 index 0000000000000..34c9f1a601a6e --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsPeekMultipleMessages.json @@ -0,0 +1,89 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/8052f2dc8052f2dc73177799a461a639a3114854a5", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "5d3f1e93-379b-48fc-86e2-4a3c61b363f9" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "35bf7ac1-a003-00d4-4809-414670000000", + "x-ms-client-request-id" : "5d3f1e93-379b-48fc-86e2-4a3c61b363f9", + "Date" : "Tue, 04 May 2021 17:18:39 GMT" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/8052f2dc8052f2dc73177799a461a639a3114854a5/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "784f343e-bbf5-4480-a587-6d5394c23b64", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "ddc2fabc-e003-0053-0f09-41d515000000", + "Body" : "ce8b45ba-4559-4389-b269-fcf71787f02cTue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAA34pbhglB1wE=Tue, 04 May 2021 17:18:39 GMT", + "x-ms-client-request-id" : "784f343e-bbf5-4480-a587-6d5394c23b64", + "Date" : "Tue, 04 May 2021 17:18:39 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/8052f2dc8052f2dc73177799a461a639a3114854a5/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "c64ea1e6-c4e6-4e6e-b145-690a86321f55", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "60ea4cd0-d003-002a-3d09-412931000000", + "Body" : "a8fd08fe-a9eb-454f-8948-26252c3bd915Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAA/DNohglB1wE=Tue, 04 May 2021 17:18:39 GMT", + "x-ms-client-request-id" : "c64ea1e6-c4e6-4e6e-b145-690a86321f55", + "Date" : "Tue, 04 May 2021 17:18:39 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/8052f2dc8052f2dc73177799a461a639a3114854a5/messages?peekonly=true&numofmessages=2", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "6b13389b-0f73-4ebe-aaa2-3d62bd8b8368" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "3c7b17cc-c003-0054-5009-41b976000000", + "Body" : "ce8b45ba-4559-4389-b269-fcf71787f02cTue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMT0test message 1a8fd08fe-a9eb-454f-8948-26252c3bd915Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMT0test message 2", + "x-ms-client-request-id" : "6b13389b-0f73-4ebe-aaa2-3d62bd8b8368", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "8052f2dc8052f2dc73177799a461a639a3114854a5" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsPeekTooManyMessage.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsPeekTooManyMessage.json new file mode 100644 index 0000000000000..cd904c83fe5ee --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsPeekTooManyMessage.json @@ -0,0 +1,45 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/56bf153656bf15368a736999f717490d9c504fa3aa", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "2d56d1a2-6eeb-427f-896a-9056a10f098b" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "af9d2501-5003-0046-3e09-41c2a6000000", + "x-ms-client-request-id" : "2d56d1a2-6eeb-427f-896a-9056a10f098b", + "Date" : "Tue, 04 May 2021 17:18:39 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/56bf153656bf15368a736999f717490d9c504fa3aa/messages?peekonly=true&numofmessages=33", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "ba7ed59d-fb3d-479b-b89a-6229909ebbfa" + }, + "Response" : { + "content-length" : "456", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "OutOfRangeQueryParameterValue", + "retry-after" : "0", + "StatusCode" : "400", + "x-ms-request-id" : "42b033fb-2003-0073-7909-41aeb2000000", + "Body" : "OutOfRangeQueryParameterValueOne of the query parameters specified in the request URI is outside the permissible range.\nRequestId:42b033fb-2003-0073-7909-41aeb2000000\nTime:2021-05-04T17:18:39.4934983Znumofmessages33132", + "x-ms-client-request-id" : "ba7ed59d-fb3d-479b-b89a-6229909ebbfa", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "56bf153656bf15368a736999f717490d9c504fa3aa" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsPeekWithHandler.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsPeekWithHandler.json new file mode 100644 index 0000000000000..62925553fdbb1 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsPeekWithHandler.json @@ -0,0 +1,89 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/44cbc42e44cbc42e4d77067492b2052bcaf94d0084", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "6b759b24-6e76-44fb-a30a-5b9df9fd9cc3" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "35bf7ab3-a003-00d4-3d09-414670000000", + "x-ms-client-request-id" : "6b759b24-6e76-44fb-a30a-5b9df9fd9cc3", + "Date" : "Tue, 04 May 2021 17:18:38 GMT" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/44cbc42e44cbc42e4d77067492b2052bcaf94d0084/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "869db5be-0c98-4d4c-9713-5975bef34593", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "6c1f5723-d003-0077-5009-4123b5000000", + "Body" : "6a1b5d33-cf80-450b-afc9-ffd7bff7abc1Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAAFmQ3hglB1wE=Tue, 04 May 2021 17:18:39 GMT", + "x-ms-client-request-id" : "869db5be-0c98-4d4c-9713-5975bef34593", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/44cbc42e44cbc42e4d77067492b2052bcaf94d0084/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "c2f820db-02e7-48d9-80c3-0103b992da5d", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "b77ad6f4-3003-00e9-7009-41306b000000", + "Body" : "d190395d-10b8-488d-afc4-a8b603a18aa2Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAAjStIhglB1wE=Tue, 04 May 2021 17:18:39 GMT", + "x-ms-client-request-id" : "c2f820db-02e7-48d9-80c3-0103b992da5d", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/44cbc42e44cbc42e4d77067492b2052bcaf94d0084/messages?peekonly=true&numofmessages=10", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "f8f25a81-1135-4562-8694-90555ec70592" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "536624c9-4003-00dc-0e09-415c7f000000", + "Body" : "6a1b5d33-cf80-450b-afc9-ffd7bff7abc1Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMT0test messaged190395d-10b8-488d-afc4-a8b603a18aa2Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMT0dGVzdCBtZXNzYWdl", + "x-ms-client-request-id" : "f8f25a81-1135-4562-8694-90555ec70592", + "Date" : "Tue, 04 May 2021 17:18:39 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "44cbc42e44cbc42e4d77067492b2052bcaf94d0084" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsPeekWithHandlerException.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsPeekWithHandlerException.json new file mode 100644 index 0000000000000..070bcd70b64af --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsPeekWithHandlerException.json @@ -0,0 +1,89 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/13349f3913349f3993b05197b7ced14d817e49219f", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "862e53e6-245a-42e3-8bdd-e4dc7922f782" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "7b738690-2003-002e-1809-41a436000000", + "x-ms-client-request-id" : "862e53e6-245a-42e3-8bdd-e4dc7922f782", + "Date" : "Tue, 04 May 2021 17:18:38 GMT" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/13349f3913349f3993b05197b7ced14d817e49219f/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "44524678-ff74-459c-9229-a4d171900036", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "ddc2fab5-e003-0053-0909-41d515000000", + "Body" : "6bb9b26f-fe4a-45c4-967e-c3760a41fc23Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAAF8xGhglB1wE=Tue, 04 May 2021 17:18:39 GMT", + "x-ms-client-request-id" : "44524678-ff74-459c-9229-a4d171900036", + "Date" : "Tue, 04 May 2021 17:18:39 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/13349f3913349f3993b05197b7ced14d817e49219f/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "98f72e8a-355d-43ad-b3ca-4d5c9a59b3d4", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "e2d48eb9-d003-00ce-1009-4127af000000", + "Body" : "39dc6109-5cd2-45d6-b82d-f52a3e7bc9a3Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAAjbpghglB1wE=Tue, 04 May 2021 17:18:39 GMT", + "x-ms-client-request-id" : "98f72e8a-355d-43ad-b3ca-4d5c9a59b3d4", + "Date" : "Tue, 04 May 2021 17:18:39 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/13349f3913349f3993b05197b7ced14d817e49219f/messages?peekonly=true&numofmessages=10", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "b6b9956c-57e9-44bd-ad1f-2c4afd43890c" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "90ba11da-f003-00bb-7b09-414c83000000", + "Body" : "6bb9b26f-fe4a-45c4-967e-c3760a41fc23Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMT0test message39dc6109-5cd2-45d6-b82d-f52a3e7bc9a3Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMT0dGVzdCBtZXNzYWdl", + "x-ms-client-request-id" : "b6b9956c-57e9-44bd-ad1f-2c4afd43890c", + "Date" : "Tue, 04 May 2021 17:18:39 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "13349f3913349f3993b05197b7ced14d817e49219f" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsPeekWithSyncHandler.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsPeekWithSyncHandler.json new file mode 100644 index 0000000000000..b68761772f878 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsPeekWithSyncHandler.json @@ -0,0 +1,110 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/4ba0c1f34ba0c1f30ba017228c2e6a2f39c9454fb8", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "2687afa3-c732-4ff8-818b-c52856042a83" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "b7beabf9-a003-0052-2109-418ac9000000", + "x-ms-client-request-id" : "2687afa3-c732-4ff8-818b-c52856042a83", + "Date" : "Tue, 04 May 2021 17:18:39 GMT" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/4ba0c1f34ba0c1f30ba017228c2e6a2f39c9454fb8/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "64f84fd5-d2aa-49da-94b3-d5d9377d0c5a", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "4a84b504-a003-007d-5f09-418702000000", + "Body" : "81048a7f-d39e-4fa3-ac69-acb5855ddc70Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAAGMxGhglB1wE=Tue, 04 May 2021 17:18:39 GMT", + "x-ms-client-request-id" : "64f84fd5-d2aa-49da-94b3-d5d9377d0c5a", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/4ba0c1f34ba0c1f30ba017228c2e6a2f39c9454fb8/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "c768c4bf-13c1-48cc-b535-86c6f2a074bf", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "7b7386a1-2003-002e-2509-41a436000000", + "Body" : "93fad7ab-1665-49c7-9d17-cb50db2364ccTue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAAXR5ghglB1wE=Tue, 04 May 2021 17:18:39 GMT", + "x-ms-client-request-id" : "c768c4bf-13c1-48cc-b535-86c6f2a074bf", + "Date" : "Tue, 04 May 2021 17:18:39 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/4ba0c1f34ba0c1f30ba017228c2e6a2f39c9454fb8/messages?peekonly=true&numofmessages=10", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "8ed73454-1ab0-4c3a-9bbc-95edc31ebe1e" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "721d912f-4003-005a-1b09-4190c6000000", + "Body" : "81048a7f-d39e-4fa3-ac69-acb5855ddc70Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMT0test message93fad7ab-1665-49c7-9d17-cb50db2364ccTue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMT0dGVzdCBtZXNzYWdl", + "x-ms-client-request-id" : "8ed73454-1ab0-4c3a-9bbc-95edc31ebe1e", + "Date" : "Tue, 04 May 2021 17:18:39 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/4ba0c1f34ba0c1f30ba017228c2e6a2f39c9454fb8?comp=metadata", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "6f68b8f4-3d93-4836-8703-b16142ea3051" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "x-ms-approximate-messages-count" : "2", + "StatusCode" : "200", + "x-ms-request-id" : "35bf7ad6-a003-00d4-5b09-414670000000", + "x-ms-client-request-id" : "6f68b8f4-3d93-4836-8703-b16142ea3051", + "Date" : "Tue, 04 May 2021 17:18:39 GMT" + }, + "Exception" : null + } ], + "variables" : [ "4ba0c1f34ba0c1f30ba017228c2e6a2f39c9454fb8" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsSetAccessPolicy.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsSetAccessPolicy.json new file mode 100644 index 0000000000000..1649495c86ed2 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsSetAccessPolicy.json @@ -0,0 +1,65 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/810fa993810fa9934c404342fbe21b7fe53843bbb7", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "d94931e5-4c5b-4331-9541-334f3383b68c" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "1382ccd5-b003-002c-4b09-411a8e000000", + "x-ms-client-request-id" : "d94931e5-4c5b-4331-9541-334f3383b68c", + "Date" : "Tue, 04 May 2021 17:18:36 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/810fa993810fa9934c404342fbe21b7fe53843bbb7?comp=acl", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "5490379f-7bac-4dd5-8186-681fe3c79a2a", + "Content-Type" : "application/xml" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "fde042c2-8003-00a1-2e09-412d5c000000", + "x-ms-client-request-id" : "5490379f-7bac-4dd5-8186-681fe3c79a2a", + "Date" : "Tue, 04 May 2021 17:18:37 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/810fa993810fa9934c404342fbe21b7fe53843bbb7?comp=acl", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "2bdfec94-1a2e-415a-8480-ccec91351f3a" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "34fa7a54-1003-0078-1309-4155d9000000", + "Body" : "testpermission2000-01-01T00:00:00.0000000Z2020-01-01T00:00:00.0000000Zraup", + "x-ms-client-request-id" : "2bdfec94-1a2e-415a-8480-ccec91351f3a", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "810fa993810fa9934c404342fbe21b7fe53843bbb7" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsSetAndClearMetadata[0].json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsSetAndClearMetadata[0].json new file mode 100644 index 0000000000000..f52c8231c2e37 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsSetAndClearMetadata[0].json @@ -0,0 +1,85 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/5882eacb5882eacb20b87495d5486a2be262484db5", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "2ed08185-2d5b-429c-b585-597ba667ed84" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "26562d3f-0003-004b-6509-410a72000000", + "x-ms-client-request-id" : "2ed08185-2d5b-429c-b585-597ba667ed84", + "Date" : "Tue, 04 May 2021 17:18:36 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/5882eacb5882eacb20b87495d5486a2be262484db5?comp=metadata", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "8aab7da4-d645-45d0-866f-e9a35181a98e" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "x-ms-approximate-messages-count" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "721d908b-4003-005a-0309-4190c6000000", + "x-ms-client-request-id" : "8aab7da4-d645-45d0-866f-e9a35181a98e", + "Date" : "Tue, 04 May 2021 17:18:37 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/5882eacb5882eacb20b87495d5486a2be262484db5?comp=metadata", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "572f9b1a-e261-471b-9976-34aea793db9a" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "fdcb0089-7003-0033-5809-41a98a000000", + "x-ms-client-request-id" : "572f9b1a-e261-471b-9976-34aea793db9a", + "Date" : "Tue, 04 May 2021 17:18:38 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/5882eacb5882eacb20b87495d5486a2be262484db5?comp=metadata", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "c156c58a-035d-4a5a-bd18-0fa93f78046e" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-meta-metadata" : "value", + "retry-after" : "0", + "x-ms-approximate-messages-count" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "ea8df1a8-5003-009d-6b09-41049b000000", + "x-ms-client-request-id" : "c156c58a-035d-4a5a-bd18-0fa93f78046e", + "Date" : "Tue, 04 May 2021 17:18:37 GMT" + }, + "Exception" : null + } ], + "variables" : [ "5882eacb5882eacb20b87495d5486a2be262484db5" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsSetAndClearMetadata[1].json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsSetAndClearMetadata[1].json new file mode 100644 index 0000000000000..d281b62a173f3 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsSetAndClearMetadata[1].json @@ -0,0 +1,86 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/4199db8a4199db8a3520649368f62f08bbd34184a3", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "18e61343-cc2c-42c7-8445-f3cd4337f8b5" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "6c1f5701-d003-0077-3409-4123b5000000", + "x-ms-client-request-id" : "18e61343-cc2c-42c7-8445-f3cd4337f8b5", + "Date" : "Tue, 04 May 2021 17:18:37 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/4199db8a4199db8a3520649368f62f08bbd34184a3?comp=metadata", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "12509b12-8294-42dd-bb37-db042a2c0975" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "x-ms-approximate-messages-count" : "0", + "x-ms-meta-metadata1" : "value", + "StatusCode" : "200", + "x-ms-request-id" : "78b23418-8003-0008-3b09-41ec2e000000", + "x-ms-client-request-id" : "12509b12-8294-42dd-bb37-db042a2c0975", + "Date" : "Tue, 04 May 2021 17:18:37 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/4199db8a4199db8a3520649368f62f08bbd34184a3?comp=metadata", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "a41d3cbe-334d-4cc7-a99f-0b49db6ab5b6" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "fde042fa-8003-00a1-5d09-412d5c000000", + "x-ms-client-request-id" : "a41d3cbe-334d-4cc7-a99f-0b49db6ab5b6", + "Date" : "Tue, 04 May 2021 17:18:38 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/4199db8a4199db8a3520649368f62f08bbd34184a3?comp=metadata", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "0bf1d668-b043-4c23-88ac-a60869d51733" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-meta-metadata" : "value", + "retry-after" : "0", + "x-ms-approximate-messages-count" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "af9d24cd-5003-0046-0f09-41c2a6000000", + "x-ms-client-request-id" : "0bf1d668-b043-4c23-88ac-a60869d51733", + "Date" : "Tue, 04 May 2021 17:18:38 GMT" + }, + "Exception" : null + } ], + "variables" : [ "4199db8a4199db8a3520649368f62f08bbd34184a3" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsSetAndClearMetadata[2].json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsSetAndClearMetadata[2].json new file mode 100644 index 0000000000000..015741916aad5 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsSetAndClearMetadata[2].json @@ -0,0 +1,85 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/6ab488496ab48849a9013930deb8909b78cb4fd591", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "5a878787-8f80-45fc-a13a-676fcc15f82c" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "b7beabdf-a003-0052-0b09-418ac9000000", + "x-ms-client-request-id" : "5a878787-8f80-45fc-a13a-676fcc15f82c", + "Date" : "Tue, 04 May 2021 17:18:38 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/6ab488496ab48849a9013930deb8909b78cb4fd591?comp=metadata", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "b3e2422c-8ec8-4f06-a8aa-af85c37c86b6" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "x-ms-approximate-messages-count" : "0", + "x-ms-meta-metadata1" : "value", + "StatusCode" : "200", + "x-ms-request-id" : "7c5d39c8-2003-0011-0909-416c95000000", + "x-ms-client-request-id" : "b3e2422c-8ec8-4f06-a8aa-af85c37c86b6", + "Date" : "Tue, 04 May 2021 17:18:38 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/6ab488496ab48849a9013930deb8909b78cb4fd591?comp=metadata", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "62c6c6cc-9ee1-4118-a641-eace139c7a8d" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "7c5d39cd-2003-0011-0b09-416c95000000", + "x-ms-client-request-id" : "62c6c6cc-9ee1-4118-a641-eace139c7a8d", + "Date" : "Tue, 04 May 2021 17:18:38 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/6ab488496ab48849a9013930deb8909b78cb4fd591?comp=metadata", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "fe3cc170-104d-456d-8f92-c12105f7c165" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "x-ms-approximate-messages-count" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "78b23428-8003-0008-4809-41ec2e000000", + "x-ms-client-request-id" : "fe3cc170-104d-456d-8f92-c12105f7c165", + "Date" : "Tue, 04 May 2021 17:18:38 GMT" + }, + "Exception" : null + } ], + "variables" : [ "6ab488496ab48849a9013930deb8909b78cb4fd591" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsSetAndClearMetadata[3].json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsSetAndClearMetadata[3].json new file mode 100644 index 0000000000000..56194d42e393e --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsSetAndClearMetadata[3].json @@ -0,0 +1,86 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/73afb90873afb908b7227413bc5d372cd32849e899", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "490f58a5-cac7-415c-9078-ac13f3657b8e" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "7b73868a-2003-002e-1409-41a436000000", + "x-ms-client-request-id" : "490f58a5-cac7-415c-9078-ac13f3657b8e", + "Date" : "Tue, 04 May 2021 17:18:38 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/73afb90873afb908b7227413bc5d372cd32849e899?comp=metadata", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "dfc8b7db-69b3-4ecb-a544-1c526d52f7d6" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-meta-metadata" : "value", + "retry-after" : "0", + "x-ms-approximate-messages-count" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "536624ba-4003-00dc-0109-415c7f000000", + "x-ms-client-request-id" : "dfc8b7db-69b3-4ecb-a544-1c526d52f7d6", + "Date" : "Tue, 04 May 2021 17:18:39 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/73afb90873afb908b7227413bc5d372cd32849e899?comp=metadata", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "d7fab3f5-67c6-4e85-b031-784e38a0d547" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "895e7b74-6003-00a9-3509-413753000000", + "x-ms-client-request-id" : "d7fab3f5-67c6-4e85-b031-784e38a0d547", + "Date" : "Tue, 04 May 2021 17:18:39 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/73afb90873afb908b7227413bc5d372cd32849e899?comp=metadata", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "1074f9d8-2542-44bd-8415-46d6e7b142a7" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-meta-metadata" : "value", + "retry-after" : "0", + "x-ms-approximate-messages-count" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "80fe113d-6003-002f-0109-41fbea000000", + "x-ms-client-request-id" : "1074f9d8-2542-44bd-8415-46d6e7b142a7", + "Date" : "Tue, 04 May 2021 17:18:39 GMT" + }, + "Exception" : null + } ], + "variables" : [ "73afb90873afb908b7227413bc5d372cd32849e899" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsSetAndClearMetadata[4].json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsSetAndClearMetadata[4].json new file mode 100644 index 0000000000000..551d2950596df --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsSetAndClearMetadata[4].json @@ -0,0 +1,84 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/3cee2fcf3cee2fcf777015849e6d7fd49b75417bb7", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "43020377-81cb-404b-bbd8-833ceda99d44" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "66d7cf4d-0003-0074-0809-41c2d1000000", + "x-ms-client-request-id" : "43020377-81cb-404b-bbd8-833ceda99d44", + "Date" : "Tue, 04 May 2021 17:18:38 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/3cee2fcf3cee2fcf777015849e6d7fd49b75417bb7?comp=metadata", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "e44f942f-b615-4259-a23f-2dd899843344" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "x-ms-approximate-messages-count" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "fde04320-8003-00a1-7c09-412d5c000000", + "x-ms-client-request-id" : "e44f942f-b615-4259-a23f-2dd899843344", + "Date" : "Tue, 04 May 2021 17:18:38 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/3cee2fcf3cee2fcf777015849e6d7fd49b75417bb7?comp=metadata", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "cd556d45-08e9-4cb8-9b92-c30fbf6f7fee" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "536624c3-4003-00dc-0909-415c7f000000", + "x-ms-client-request-id" : "cd556d45-08e9-4cb8-9b92-c30fbf6f7fee", + "Date" : "Tue, 04 May 2021 17:18:39 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/3cee2fcf3cee2fcf777015849e6d7fd49b75417bb7?comp=metadata", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "8a8154ca-2b2e-477d-a815-a7bf0389ade9" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "x-ms-approximate-messages-count" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "7c5d39e5-2003-0011-2009-416c95000000", + "x-ms-client-request-id" : "8a8154ca-2b2e-477d-a815-a7bf0389ade9", + "Date" : "Tue, 04 May 2021 17:18:38 GMT" + }, + "Exception" : null + } ], + "variables" : [ "3cee2fcf3cee2fcf777015849e6d7fd49b75417bb7" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsSetInvalidAccessPolicy.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsSetInvalidAccessPolicy.json new file mode 100644 index 0000000000000..7edeaeb509dc6 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsSetInvalidAccessPolicy.json @@ -0,0 +1,46 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/0812016c0812016cd0207466f49bc4adf60549f283", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "e758ddef-e438-4441-88d6-0bbd670e8f8f" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "10a7c4c5-c003-0044-7109-417c1e000000", + "x-ms-client-request-id" : "e758ddef-e438-4441-88d6-0bbd670e8f8f", + "Date" : "Tue, 04 May 2021 17:18:37 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/0812016c0812016cd0207466f49bc4adf60549f283?comp=acl", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "6575ff6b-43e2-4736-a55f-2e2f47e9a096", + "Content-Type" : "application/xml" + }, + "Response" : { + "content-length" : "371", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "InvalidXmlDocument", + "retry-after" : "0", + "StatusCode" : "400", + "x-ms-request-id" : "895e7a88-6003-00a9-4c09-413753000000", + "Body" : "InvalidXmlDocumentXML specified is not syntactically valid.\nRequestId:895e7a88-6003-00a9-4c09-413753000000\nTime:2021-05-04T17:18:38.2683170Z1304Signed identifier ID cannot be empty or over 64 characters in length", + "x-ms-client-request-id" : "6575ff6b-43e2-4736-a55f-2e2f47e9a096", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "0812016c0812016cd0207466f49bc4adf60549f283" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsSetInvalidMeta[0].json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsSetInvalidMeta[0].json new file mode 100644 index 0000000000000..a949f21d505f3 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsSetInvalidMeta[0].json @@ -0,0 +1,45 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/b665e2bfb665e2bf47a666246c0d5fb266814a8b8c", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "4b76f3b3-61ef-42c4-9c66-1f0b59a9b959" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "42b033ab-2003-0073-3709-41aeb2000000", + "x-ms-client-request-id" : "4b76f3b3-61ef-42c4-9c66-1f0b59a9b959", + "Date" : "Tue, 04 May 2021 17:18:37 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/b665e2bfb665e2bf47a666246c0d5fb266814a8b8c?comp=metadata", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "0ab216b4-71d9-48fa-8db8-b4f39fea6f7f" + }, + "Response" : { + "content-length" : "260", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "InvalidMetadata", + "retry-after" : "0", + "StatusCode" : "400", + "x-ms-request-id" : "4c99f6bf-8003-00d3-3909-412a13000000", + "Body" : "InvalidMetadataThe metadata specified is invalid. It has characters that are not permitted.\nRequestId:4c99f6bf-8003-00d3-3909-412a13000000\nTime:2021-05-04T17:18:38.7222171Z", + "x-ms-client-request-id" : "0ab216b4-71d9-48fa-8db8-b4f39fea6f7f", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "b665e2bfb665e2bf47a666246c0d5fb266814a8b8c" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsSetInvalidMeta[1].json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsSetInvalidMeta[1].json new file mode 100644 index 0000000000000..4bb57c7a721f4 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsSetInvalidMeta[1].json @@ -0,0 +1,45 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/af7ed3feaf7ed3feb1e2302362d2ffcce2db47bd8e", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "f7898f4b-4493-45c6-bc1a-0e9d1f1d4197" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "90ba1193-f003-00bb-3f09-414c83000000", + "x-ms-client-request-id" : "f7898f4b-4493-45c6-bc1a-0e9d1f1d4197", + "Date" : "Tue, 04 May 2021 17:18:37 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/af7ed3feaf7ed3feb1e2302362d2ffcce2db47bd8e?comp=metadata", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "d0459de1-65c7-415d-aaa7-fe6d815697cc" + }, + "Response" : { + "content-length" : "260", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "InvalidMetadata", + "retry-after" : "0", + "StatusCode" : "400", + "x-ms-request-id" : "7c5d39ab-2003-0011-6f09-416c95000000", + "Body" : "InvalidMetadataThe metadata specified is invalid. It has characters that are not permitted.\nRequestId:7c5d39ab-2003-0011-6f09-416c95000000\nTime:2021-05-04T17:18:37.8713965Z", + "x-ms-client-request-id" : "d0459de1-65c7-415d-aaa7-fe6d815697cc", + "Date" : "Tue, 04 May 2021 17:18:37 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "af7ed3feaf7ed3feb1e2302362d2ffcce2db47bd8e" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsSetInvalidMeta[2].json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsSetInvalidMeta[2].json new file mode 100644 index 0000000000000..a7a500a3eac39 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsSetInvalidMeta[2].json @@ -0,0 +1,45 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/8453803d8453803d3a705733cce0f0821c51432aae", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "91114b74-5439-4350-97a3-72eaf7e6633e" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "d1814e2e-2003-00e5-5509-41a763000000", + "x-ms-client-request-id" : "91114b74-5439-4350-97a3-72eaf7e6633e", + "Date" : "Tue, 04 May 2021 17:18:37 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/8453803d8453803d3a705733cce0f0821c51432aae?comp=metadata", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "c7ebe441-1bce-483d-aa67-c1342973d6a5" + }, + "Response" : { + "content-length" : "278", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "EmptyMetadataKey", + "retry-after" : "0", + "StatusCode" : "400", + "x-ms-request-id" : "ddc2fa9c-e003-0053-7409-41d515000000", + "Body" : "EmptyMetadataKeyThe key for one of the metadata key-value pairs is empty.\nRequestId:ddc2fa9c-e003-0053-7409-41d515000000\nTime:2021-05-04T17:18:38.8991329Zvalue", + "x-ms-client-request-id" : "c7ebe441-1bce-483d-aa67-c1342973d6a5", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "8453803d8453803d3a705733cce0f0821c51432aae" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsSetMetadataQueueError.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsSetMetadataQueueError.json new file mode 100644 index 0000000000000..270dbd0a11be8 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsSetMetadataQueueError.json @@ -0,0 +1,26 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/8fa85be18fa85be1a3742007ce3e327eb484449fae?comp=metadata", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "ae700288-833a-4ca4-b1a8-9541d507a4f1" + }, + "Response" : { + "content-length" : "217", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "QueueNotFound", + "retry-after" : "0", + "StatusCode" : "404", + "x-ms-request-id" : "d9b8998f-f003-0012-6709-418df1000000", + "Body" : "QueueNotFoundThe specified queue does not exist.\nRequestId:d9b8998f-f003-0012-6709-418df1000000\nTime:2021-05-04T17:18:37.4830616Z", + "x-ms-client-request-id" : "ae700288-833a-4ca4-b1a8-9541d507a4f1", + "Date" : "Tue, 04 May 2021 17:18:36 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "8fa85be18fa85be1a3742007ce3e327eb484449fae" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsSetMultipleAccessPolicies.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsSetMultipleAccessPolicies.json new file mode 100644 index 0000000000000..f7f5e33f46fd6 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsSetMultipleAccessPolicies.json @@ -0,0 +1,65 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/847f2765847f276535f93665167dd0ea8e554e44b3", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "fad8df9b-c961-433b-9ec6-75d317d7c338" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "90ba1197-f003-00bb-4209-414c83000000", + "x-ms-client-request-id" : "fad8df9b-c961-433b-9ec6-75d317d7c338", + "Date" : "Tue, 04 May 2021 17:18:37 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/847f2765847f276535f93665167dd0ea8e554e44b3?comp=acl", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "0e94f456-2324-429a-aeb4-bea63215c749", + "Content-Type" : "application/xml" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "80fe110e-6003-002f-5a09-41fbea000000", + "x-ms-client-request-id" : "0e94f456-2324-429a-aeb4-bea63215c749", + "Date" : "Tue, 04 May 2021 17:18:38 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/847f2765847f276535f93665167dd0ea8e554e44b3?comp=acl", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "d7123d0c-97c9-4c87-9ac9-d31877179389" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "10a7c4de-c003-0044-0609-417c1e000000", + "Body" : "policy02000-01-01T00:00:00.0000000Z2020-01-01T00:00:00.0000000Zrpolicy12000-01-01T00:00:00.0000000Z2020-01-01T00:00:00.0000000Zrpolicy22000-01-01T00:00:00.0000000Z2020-01-01T00:00:00.0000000Zr", + "x-ms-client-request-id" : "d7123d0c-97c9-4c87-9ac9-d31877179389", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "847f2765847f276535f93665167dd0ea8e554e44b3" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsSetTooManyAccessPolicies.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsSetTooManyAccessPolicies.json new file mode 100644 index 0000000000000..f5382a10c6d3f --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsSetTooManyAccessPolicies.json @@ -0,0 +1,46 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/6ff164f46ff164f4d5822895d0a8a67136e74e6da0", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "0fef110e-94bf-40c3-ad1a-cdd30f7c1048" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "7b73861e-2003-002e-3109-41a436000000", + "x-ms-client-request-id" : "0fef110e-94bf-40c3-ad1a-cdd30f7c1048", + "Date" : "Tue, 04 May 2021 17:18:37 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/6ff164f46ff164f4d5822895d0a8a67136e74e6da0?comp=acl", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "b14cc712-b824-4f78-a9d6-4965a9c74008", + "Content-Type" : "application/xml" + }, + "Response" : { + "content-length" : "294", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "InvalidXmlDocument", + "retry-after" : "0", + "StatusCode" : "400", + "x-ms-request-id" : "4c99f6b4-8003-00d3-3009-412a13000000", + "Body" : "InvalidXmlDocumentXML specified is not syntactically valid.\nRequestId:4c99f6b4-8003-00d3-3009-412a13000000\nTime:2021-05-04T17:18:38.1214141Z00", + "x-ms-client-request-id" : "b14cc712-b824-4f78-a9d6-4965a9c74008", + "Date" : "Tue, 04 May 2021 17:18:37 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "6ff164f46ff164f4d5822895d0a8a67136e74e6da0" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsUpdateMessage.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsUpdateMessage.json new file mode 100644 index 0000000000000..8512dff41ba89 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsUpdateMessage.json @@ -0,0 +1,111 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/71e9616571e96165cd848872fd7a38bc404147ecae", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "0d4fd06a-e691-4b41-a8c1-007e206b46b0" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "76d9438b-e003-0021-1609-41d25a000000", + "x-ms-client-request-id" : "0d4fd06a-e691-4b41-a8c1-007e206b46b0", + "Date" : "Tue, 04 May 2021 17:18:38 GMT" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/71e9616571e96165cd848872fd7a38bc404147ecae/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "8185d8c9-c659-43ca-ad6b-ef64ff56e245", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "433a3030-e003-00a7-2a09-411ee3000000", + "Body" : "25c8225a-0956-4ee3-b9a8-8bcce6ec528aTue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAASDhvhglB1wE=Tue, 04 May 2021 17:18:39 GMT", + "x-ms-client-request-id" : "8185d8c9-c659-43ca-ad6b-ef64ff56e245", + "Date" : "Tue, 04 May 2021 17:18:39 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/71e9616571e96165cd848872fd7a38bc404147ecae/messages?numofmessages=1", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "19b5bd26-0df7-4e30-a7e8-667a93e3ef9f" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "d1814e6e-2003-00e5-0f09-41a763000000", + "Body" : "25c8225a-0956-4ee3-b9a8-8bcce6ec528aTue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAAdatdmAlB1wE=Tue, 04 May 2021 17:19:09 GMT1test message before update", + "x-ms-client-request-id" : "19b5bd26-0df7-4e30-a7e8-667a93e3ef9f", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/71e9616571e96165cd848872fd7a38bc404147ecae/messages/25c8225a-0956-4ee3-b9a8-8bcce6ec528a?popreceipt=AgAAAAMAAAAAAAAAdatdmAlB1wE%3D&visibilitytimeout=1", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "afe2fa39-a225-4c9b-a126-12fca4c7867d", + "Content-Type" : "application/xml" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-time-next-visible" : "Tue, 04 May 2021 17:18:40 GMT", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "ea4bba70-6003-0086-5e09-413a98000000", + "x-ms-popreceipt" : "AwAAAAMAAAAAAAAAjacihwlB1wEBAAAA", + "x-ms-client-request-id" : "afe2fa39-a225-4c9b-a126-12fca4c7867d", + "Date" : "Tue, 04 May 2021 17:18:39 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/71e9616571e96165cd848872fd7a38bc404147ecae/messages?peekonly=true", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "cd9324ee-a2dc-4116-8396-008f334e84ef" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "90ba121f-f003-00bb-3609-414c83000000", + "Body" : "25c8225a-0956-4ee3-b9a8-8bcce6ec528aTue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMT1Updated test message", + "x-ms-client-request-id" : "cd9324ee-a2dc-4116-8396-008f334e84ef", + "Date" : "Tue, 04 May 2021 17:18:41 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "71e9616571e96165cd848872fd7a38bc404147ecae" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsUpdateMessageInvalidArgs[0].json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsUpdateMessageInvalidArgs[0].json new file mode 100644 index 0000000000000..48f4a0f0d6a8c --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsUpdateMessageInvalidArgs[0].json @@ -0,0 +1,90 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/92264d2292264d22cd4348098a3ce8cc1e964af68a", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "f2102169-c9f5-4d95-83a6-e8df70d23e7f" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "e2d48dca-d003-00ce-2b09-4127af000000", + "x-ms-client-request-id" : "f2102169-c9f5-4d95-83a6-e8df70d23e7f", + "Date" : "Tue, 04 May 2021 17:18:38 GMT" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/92264d2292264d22cd4348098a3ce8cc1e964af68a/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "a10fe388-7ce3-49af-a8d0-6ac7fdbdba32", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "beffcc27-b003-00c8-0c09-411410000000", + "Body" : "c56954a2-bd32-4f27-9c5b-8dd85f59e04bTue, 04 May 2021 17:18:38 GMTTue, 11 May 2021 17:18:38 GMTAgAAAAMAAAAAAAAAQx/ihQlB1wE=Tue, 04 May 2021 17:18:38 GMT", + "x-ms-client-request-id" : "a10fe388-7ce3-49af-a8d0-6ac7fdbdba32", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/92264d2292264d22cd4348098a3ce8cc1e964af68a/messages?numofmessages=1", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "b2957d52-0aa3-44fa-b6ae-fadbb5b4b756" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "92671e72-a003-000f-4a09-41804d000000", + "Body" : "c56954a2-bd32-4f27-9c5b-8dd85f59e04bTue, 04 May 2021 17:18:38 GMTTue, 11 May 2021 17:18:38 GMTAgAAAAMAAAAAAAAAXp/clwlB1wE=Tue, 04 May 2021 17:19:08 GMT1test message before update", + "x-ms-client-request-id" : "b2957d52-0aa3-44fa-b6ae-fadbb5b4b756", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/92264d2292264d22cd4348098a3ce8cc1e964af68a/messages/c56954a2-bd32-4f27-9c5b-8dd85f59e04b?popreceipt=AgAAAAMAAAAAAAAAXp/clwlB1wE%3DRandom&visibilitytimeout=1", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "93255099-53b8-429f-b5b6-65bb1ff1c38a", + "Content-Type" : "application/xml" + }, + "Response" : { + "content-length" : "444", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "InvalidQueryParameterValue", + "retry-after" : "0", + "StatusCode" : "400", + "x-ms-request-id" : "e2d48e32-d003-00ce-1009-4127af000000", + "Body" : "InvalidQueryParameterValueValue for one of the query parameters specified in the request URI is invalid.\nRequestId:e2d48e32-d003-00ce-1009-4127af000000\nTime:2021-05-04T17:18:39.0110552ZpopreceiptAgAAAAMAAAAAAAAAXp/clwlB1wE=RandomInvalid pop receipt format", + "x-ms-client-request-id" : "93255099-53b8-429f-b5b6-65bb1ff1c38a", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "92264d2292264d22cd4348098a3ce8cc1e964af68a" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsUpdateMessageInvalidArgs[1].json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsUpdateMessageInvalidArgs[1].json new file mode 100644 index 0000000000000..9cdb1ec62a285 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsUpdateMessageInvalidArgs[1].json @@ -0,0 +1,90 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/8b3d7c638b3d7c63ee7423330223a7b0d4464924bd", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "64cc1a3a-abab-4624-956f-6ea99b1ffc08" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "ea8df1db-5003-009d-1709-41049b000000", + "x-ms-client-request-id" : "64cc1a3a-abab-4624-956f-6ea99b1ffc08", + "Date" : "Tue, 04 May 2021 17:18:38 GMT" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/8b3d7c638b3d7c63ee7423330223a7b0d4464924bd/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "5b54697d-7629-4a3c-92ac-275ab3160e92", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "90ba11d4-f003-00bb-7609-414c83000000", + "Body" : "6e386574-3e4e-4977-8124-72a3aca35a5dTue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAAoMdahglB1wE=Tue, 04 May 2021 17:18:39 GMT", + "x-ms-client-request-id" : "5b54697d-7629-4a3c-92ac-275ab3160e92", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/8b3d7c638b3d7c63ee7423330223a7b0d4464924bd/messages?numofmessages=1", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "6f5606f3-ce90-4cfa-ad60-6eac23b59dd0" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "ea4bba5e-6003-0086-4d09-413a98000000", + "Body" : "6e386574-3e4e-4977-8124-72a3aca35a5dTue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAA/NZJmAlB1wE=Tue, 04 May 2021 17:19:09 GMT1test message before update", + "x-ms-client-request-id" : "6f5606f3-ce90-4cfa-ad60-6eac23b59dd0", + "Date" : "Tue, 04 May 2021 17:18:39 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/8b3d7c638b3d7c63ee7423330223a7b0d4464924bd/messages/6e386574-3e4e-4977-8124-72a3aca35a5dRandom?popreceipt=AgAAAAMAAAAAAAAA/NZJmAlB1wE%3D&visibilitytimeout=1", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "7f2a05ab-4896-4ea1-9ecc-d8a4971fbd13", + "Content-Type" : "application/xml" + }, + "Response" : { + "content-length" : "221", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "MessageNotFound", + "retry-after" : "0", + "StatusCode" : "404", + "x-ms-request-id" : "536624d3-4003-00dc-1709-415c7f000000", + "Body" : "MessageNotFoundThe specified message does not exist.\nRequestId:536624d3-4003-00dc-1709-415c7f000000\nTime:2021-05-04T17:18:39.8053827Z", + "x-ms-client-request-id" : "7f2a05ab-4896-4ea1-9ecc-d8a4971fbd13", + "Date" : "Tue, 04 May 2021 17:18:39 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "8b3d7c638b3d7c63ee7423330223a7b0d4464924bd" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsUpdateMessageInvalidArgs[2].json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsUpdateMessageInvalidArgs[2].json new file mode 100644 index 0000000000000..34e5bfc9b92fc --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsUpdateMessageInvalidArgs[2].json @@ -0,0 +1,90 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/a0102fa0a0102fa05ca8037072e7cb28221042a196", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "c172a76b-d1f6-4752-8977-7caaf5c6c4dd" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "35bf7acb-a003-00d4-5109-414670000000", + "x-ms-client-request-id" : "c172a76b-d1f6-4752-8977-7caaf5c6c4dd", + "Date" : "Tue, 04 May 2021 17:18:39 GMT" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/a0102fa0a0102fa05ca8037072e7cb28221042a196/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "7212c92f-ffff-4722-ae2a-332dde23b6f2", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "6980d267-1003-0035-2609-419a35000000", + "Body" : "248e74b9-93b7-4b8a-bdf7-95d0dac6fd62Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAALepuhglB1wE=Tue, 04 May 2021 17:18:39 GMT", + "x-ms-client-request-id" : "7212c92f-ffff-4722-ae2a-332dde23b6f2", + "Date" : "Tue, 04 May 2021 17:18:39 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/a0102fa0a0102fa05ca8037072e7cb28221042a196/messages?numofmessages=1", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "e0dafd49-e5f7-45a9-913f-8329caf82250" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "d99b06c1-6003-004d-3009-4139cd000000", + "Body" : "248e74b9-93b7-4b8a-bdf7-95d0dac6fd62Tue, 04 May 2021 17:18:39 GMTTue, 11 May 2021 17:18:39 GMTAgAAAAMAAAAAAAAAdatdmAlB1wE=Tue, 04 May 2021 17:19:09 GMT1test message before update", + "x-ms-client-request-id" : "e0dafd49-e5f7-45a9-913f-8329caf82250", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/a0102fa0a0102fa05ca8037072e7cb28221042a196/messages/248e74b9-93b7-4b8a-bdf7-95d0dac6fd62Random?popreceipt=AgAAAAMAAAAAAAAAdatdmAlB1wE%3DRandom&visibilitytimeout=1", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "b695818f-133a-4184-802b-61daecb61dbf", + "Content-Type" : "application/xml" + }, + "Response" : { + "content-length" : "444", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "InvalidQueryParameterValue", + "retry-after" : "0", + "StatusCode" : "400", + "x-ms-request-id" : "b050afe7-6003-00cb-4c09-41f574000000", + "Body" : "InvalidQueryParameterValueValue for one of the query parameters specified in the request URI is invalid.\nRequestId:b050afe7-6003-00cb-4c09-41f574000000\nTime:2021-05-04T17:18:39.8276553ZpopreceiptAgAAAAMAAAAAAAAAdatdmAlB1wE=RandomInvalid pop receipt format", + "x-ms-client-request-id" : "b695818f-133a-4184-802b-61daecb61dbf", + "Date" : "Tue, 04 May 2021 17:18:39 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "a0102fa0a0102fa05ca8037072e7cb28221042a196" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsAccountSASCreateDeleteQueue.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsAccountSASCreateDeleteQueue.json new file mode 100644 index 0000000000000..89cfde244b9c3 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsAccountSASCreateDeleteQueue.json @@ -0,0 +1,42 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/cf320dddcf320ddd71971375275b773e1ce247a6b5?sv=2022-11-02&ss=q&srt=sco&se=2021-06-12T23%3A00%3A48Z&sp=rdc&sig=REDACTED", + "Headers" : { + "x-ms-version" : "2020-08-04", + "User-Agent" : "azsdk-java-azure-storage-queue/12.11.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "7d73cb73-40ea-44a8-9433-16064a1b5b80" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-08-04", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "a3a1ae18-f003-003f-0715-5f0212000000", + "x-ms-client-request-id" : "7d73cb73-40ea-44a8-9433-16064a1b5b80", + "Date" : "Fri, 11 Jun 2021 23:00:49 GMT" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.queue.core.windows.net/cf320dddcf320ddd71971375275b773e1ce247a6b5?sv=2022-11-02&ss=q&srt=sco&se=2021-06-12T23%3A00%3A48Z&sp=rdc&sig=REDACTED", + "Headers" : { + "x-ms-version" : "2020-08-04", + "User-Agent" : "azsdk-java-azure-storage-queue/12.11.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "ed7dbbd4-4433-4cea-9feb-e05081d524ae" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-08-04", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "a3a1ae87-f003-003f-6c15-5f0212000000", + "x-ms-client-request-id" : "ed7dbbd4-4433-4cea-9feb-e05081d524ae", + "Date" : "Fri, 11 Jun 2021 23:00:50 GMT" + }, + "Exception" : null + } ], + "variables" : [ "cf320dddcf320ddd719373645103c68a347749a394", "2021-06-11T23:00:48.051306Z", "cf320dddcf320ddd71971375275b773e1ce247a6b5" ] +} diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsAccountSASListQueues.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsAccountSASListQueues.json new file mode 100644 index 0000000000000..05ef40df6c38f --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsAccountSASListQueues.json @@ -0,0 +1,4 @@ +{ + "networkCallRecords" : [ ], + "variables" : [ "f3c5a2f7f3c5a2f748f66131ee705a97c4b744439f", "2021-05-14T21:57:33.025832900Z" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsAccountSASNetworkOnEndpoint.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsAccountSASNetworkOnEndpoint.json new file mode 100644 index 0000000000000..ff0b622146230 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsAccountSASNetworkOnEndpoint.json @@ -0,0 +1,42 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/150557ed150557edf035256614ae00ec96a54eae8a?sv=2022-11-02&se=2021-05-15T21%3A57%3A33Z&sp=rwdlc&sig=REDACTED&ss=q&srt=sco", + "Headers" : { + "x-ms-version" : "2020-10-02", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e3d1cf66-7ff3-4377-87a2-591464523d73" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-10-02", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "6362bba6-1003-0065-370c-497486000000", + "x-ms-client-request-id" : "e3d1cf66-7ff3-4377-87a2-591464523d73", + "Date" : "Fri, 14 May 2021 21:57:35 GMT" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.queue.core.windows.net/150557ed150557edf035256614ae00ec96a54eae8a?sv=2022-11-02&se=2021-05-15T21%3A57%3A33Z&sp=rwdlc&sig=REDACTED&ss=q&srt=sco", + "Headers" : { + "x-ms-version" : "2020-10-02", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "53906865-deb4-4ac7-a02f-1619eb8865e8" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-10-02", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "353bf73e-0003-008d-470c-49ed10000000", + "x-ms-client-request-id" : "53906865-deb4-4ac7-a02f-1619eb8865e8", + "Date" : "Fri, 14 May 2021 21:57:35 GMT" + }, + "Exception" : null + } ], + "variables" : [ "150557ed150557edf03469697133ac2550694d19b8", "2021-05-14T21:57:33.025832900Z", "150557ed150557edf035256614ae00ec96a54eae8a" ] +} diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsCanUseSasToAuthenticate.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsCanUseSasToAuthenticate.json new file mode 100644 index 0000000000000..15fc7a82a1993 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsCanUseSasToAuthenticate.json @@ -0,0 +1,152 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/829ac529829ac5294377070029f4d7cfc1e440e7a6", + "Headers" : { + "x-ms-version" : "2020-10-02", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7f305471-68e2-4262-844a-1c89cf80ecc7" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-10-02", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "727fd779-d003-0037-0d0c-49086e000000", + "x-ms-client-request-id" : "7f305471-68e2-4262-844a-1c89cf80ecc7", + "Date" : "Fri, 14 May 2021 21:57:35 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/829ac529829ac5294377070029f4d7cfc1e440e7a6?comp=metadata&sv=2022-11-02&ss=q&srt=sco&se=2021-05-15T21%3A57%3A33Z&sp=r&sig=REDACTED", + "Headers" : { + "x-ms-version" : "2020-10-02", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5ac928d8-5004-4600-aa33-ed761d7132c0" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-10-02", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "x-ms-approximate-messages-count" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "c2372edb-2003-008a-740c-498173000000", + "x-ms-client-request-id" : "5ac928d8-5004-4600-aa33-ed761d7132c0", + "Date" : "Fri, 14 May 2021 21:57:36 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/829ac529829ac5294377070029f4d7cfc1e440e7a6?comp=metadata&sv=2022-11-02&ss=q&srt=sco&se=2021-05-15T21%3A57%3A33Z&sp=r&sig=REDACTED", + "Headers" : { + "x-ms-version" : "2020-10-02", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "cc657f57-c295-447c-88d9-176fa428411e" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-10-02", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "x-ms-approximate-messages-count" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "c2372efa-2003-008a-0e0c-498173000000", + "x-ms-client-request-id" : "cc657f57-c295-447c-88d9-176fa428411e", + "Date" : "Fri, 14 May 2021 21:57:36 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/829ac529829ac5294377070029f4d7cfc1e440e7a6?comp=metadata&sv=2022-11-02&se=2021-05-15T21%3A57%3A33Z&sp=r&sig=REDACTED&ss=q&srt=sco", + "Headers" : { + "x-ms-version" : "2020-10-02", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "972c8147-6c5d-4160-953e-02f6b5fe6107" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-10-02", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "x-ms-approximate-messages-count" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "07c75fa7-9003-0054-480c-499595000000", + "x-ms-client-request-id" : "972c8147-6c5d-4160-953e-02f6b5fe6107", + "Date" : "Fri, 14 May 2021 21:57:36 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net?restype=service&comp=properties&sv=2022-11-02&ss=q&srt=sco&se=2021-05-15T21%3A57%3A33Z&sp=r&sig=REDACTED", + "Headers" : { + "x-ms-version" : "2020-10-02", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "aa0d79b6-af00-4fc5-9a8d-b19c608a1cfa" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-10-02", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "07c75fb3-9003-0054-510c-499595000000", + "Body" : "1.0falsefalsefalsefalse1.0truetruetrue71.0falsefalse", + "x-ms-client-request-id" : "aa0d79b6-af00-4fc5-9a8d-b19c608a1cfa", + "Date" : "Fri, 14 May 2021 21:57:36 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net?restype=service&comp=properties&sv=2022-11-02&ss=q&srt=sco&se=2021-05-15T21%3A57%3A33Z&sp=r&sig=REDACTED", + "Headers" : { + "x-ms-version" : "2020-10-02", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6fd26bab-a1be-4131-bfd7-1a8060f9648e" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-10-02", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "07c75fd2-9003-0054-6c0c-499595000000", + "Body" : "1.0falsefalsefalsefalse1.0truetruetrue71.0falsefalse", + "x-ms-client-request-id" : "6fd26bab-a1be-4131-bfd7-1a8060f9648e", + "Date" : "Fri, 14 May 2021 21:57:36 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net?restype=service&comp=properties&sv=2022-11-02&se=2021-05-15T21%3A57%3A33Z&sp=r&sig=REDACTED&ss=q&srt=sco", + "Headers" : { + "x-ms-version" : "2020-10-02", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ccdcbb73-7025-4d88-91e1-584def8355a4" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-10-02", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "1aa63bfa-1003-0081-530c-497a18000000", + "Body" : "1.0falsefalsefalsefalse1.0truetruetrue71.0falsefalse", + "x-ms-client-request-id" : "ccdcbb73-7025-4d88-91e1-584def8355a4", + "Date" : "Fri, 14 May 2021 21:57:37 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "829ac529829ac5294377070029f4d7cfc1e440e7a6", "2021-05-14T21:57:33.025832900Z" ] +} diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsQueueSASEnqueueDequeueWithIdentifier.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsQueueSASEnqueueDequeueWithIdentifier.json new file mode 100644 index 0000000000000..7a517a2a52adf --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsQueueSASEnqueueDequeueWithIdentifier.json @@ -0,0 +1,109 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/9902f01f9902f01f163549254a290b491423480cb3", + "Headers" : { + "x-ms-version" : "2020-10-02", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b503fdb3-e8b0-411e-98b6-f52bf3d922c2" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-10-02", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "20c32b3a-9003-0009-0f0c-499f11000000", + "x-ms-client-request-id" : "b503fdb3-e8b0-411e-98b6-f52bf3d922c2", + "Date" : "Fri, 14 May 2021 21:57:35 GMT" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/9902f01f9902f01f163549254a290b491423480cb3/messages", + "Headers" : { + "x-ms-version" : "2020-10-02", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "51a1c429-955c-41c4-a964-ab8879539503", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-10-02", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "07c75f53-9003-0054-7e0c-499595000000", + "Body" : "62097785-2f47-4e24-b5e9-6cb475b6239fFri, 14 May 2021 21:57:36 GMTFri, 21 May 2021 21:57:36 GMTAgAAAAMAAAAAAAAAKhZ5JgxJ1wE=Fri, 14 May 2021 21:57:36 GMT", + "x-ms-client-request-id" : "51a1c429-955c-41c4-a964-ab8879539503", + "Date" : "Fri, 14 May 2021 21:57:36 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/9902f01f9902f01f163549254a290b491423480cb3?comp=acl", + "Headers" : { + "x-ms-version" : "2020-10-02", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "82a1f2db-92f6-4113-9372-59855ba97ce0", + "Content-Type" : "application/xml" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-10-02", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "c2372f19-2003-008a-270c-498173000000", + "x-ms-client-request-id" : "82a1f2db-92f6-4113-9372-59855ba97ce0", + "Date" : "Fri, 14 May 2021 21:57:36 GMT" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/9902f01f9902f01f163549254a290b491423480cb3/messages?sv=2022-11-02&si=415b8d8e-a893-4dc1-abba-d7b3d6b7761d&sig=REDACTED", + "Headers" : { + "x-ms-version" : "2020-10-02", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b767d24e-068d-4347-9d24-198f0298ed3e", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-10-02", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "1aa648dd-1003-0081-290c-497a18000000", + "Body" : "da0e9f2f-c127-4cd1-9019-5f7752145f51Fri, 14 May 2021 21:58:06 GMTFri, 21 May 2021 21:58:06 GMTAgAAAAMAAAAAAAAAsO+WOAxJ1wE=Fri, 14 May 2021 21:58:06 GMT", + "x-ms-client-request-id" : "b767d24e-068d-4347-9d24-198f0298ed3e", + "Date" : "Fri, 14 May 2021 21:58:06 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/9902f01f9902f01f163549254a290b491423480cb3/messages?numofmessages=2&visibilitytimeout=30&sv=2022-11-02&si=415b8d8e-a893-4dc1-abba-d7b3d6b7761d&sig=REDACTED", + "Headers" : { + "x-ms-version" : "2020-10-02", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a0d2ca6f-b307-4b55-92ed-79134f96910b" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-10-02", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "1aa648e7-1003-0081-2e0c-497a18000000", + "Body" : "62097785-2f47-4e24-b5e9-6cb475b6239fFri, 14 May 2021 21:57:36 GMTFri, 21 May 2021 21:57:36 GMTAgAAAAMAAAAAAAAAkX+CSgxJ1wE=Fri, 14 May 2021 21:58:36 GMT1testda0e9f2f-c127-4cd1-9019-5f7752145f51Fri, 14 May 2021 21:58:06 GMTFri, 21 May 2021 21:58:06 GMTAgAAAAMAAAAAAAAAkX+CSgxJ1wE=Fri, 14 May 2021 21:58:36 GMT1sastest", + "x-ms-client-request-id" : "a0d2ca6f-b307-4b55-92ed-79134f96910b", + "Date" : "Fri, 14 May 2021 21:58:06 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "9902f01f9902f01f163549254a290b491423480cb3", "2021-05-14T21:57:36.633826900Z", "2021-05-14T21:57:36.642821900Z", "415b8d8e-a893-4dc1-abba-d7b3d6b7761d", "9902f01f9902f01f16362931a9c02756460a4e38a9" ] +} diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsQueueSASEnqueueDequeueWithPermissions.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsQueueSASEnqueueDequeueWithPermissions.json new file mode 100644 index 0000000000000..63dc668f6079c --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsQueueSASEnqueueDequeueWithPermissions.json @@ -0,0 +1,112 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/0d6c65af0d6c65afbdc659003bcffb3d36f747c5b7", + "Headers" : { + "x-ms-version" : "2020-10-02", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "275b5efa-996f-4ccd-824e-d45e1d338462" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-10-02", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "40e62661-6003-000d-4f0c-491216000000", + "x-ms-client-request-id" : "275b5efa-996f-4ccd-824e-d45e1d338462", + "Date" : "Fri, 14 May 2021 21:57:35 GMT" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/0d6c65af0d6c65afbdc659003bcffb3d36f747c5b7/messages", + "Headers" : { + "x-ms-version" : "2020-10-02", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6faab1e6-cdd3-4149-9c8a-e24963a21111", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-10-02", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "b7c71e77-8003-0077-410c-490f56000000", + "Body" : "65833ca3-28d9-4a31-b4e6-ca227597d59bFri, 14 May 2021 21:57:36 GMTFri, 21 May 2021 21:57:36 GMTAgAAAAMAAAAAAAAAPz15JgxJ1wE=Fri, 14 May 2021 21:57:36 GMT", + "x-ms-client-request-id" : "6faab1e6-cdd3-4149-9c8a-e24963a21111", + "Date" : "Fri, 14 May 2021 21:57:36 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/0d6c65af0d6c65afbdc659003bcffb3d36f747c5b7/messages?sv=2022-11-02&spr=https%2Chttp&st=2021-05-13T21%3A57%3A36Z&se=2021-05-15T21%3A57%3A36Z&sp=rap&sig=REDACTED", + "Headers" : { + "x-ms-version" : "2020-10-02", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "03a024f9-7bcc-4584-bf0a-786065ff5930", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-10-02", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "07c75f67-9003-0054-100c-499595000000", + "Body" : "cede2521-3e76-4603-981f-48ce4ed8b322Fri, 14 May 2021 21:57:36 GMTFri, 21 May 2021 21:57:36 GMTAgAAAAMAAAAAAAAA3p2OJgxJ1wE=Fri, 14 May 2021 21:57:36 GMT", + "x-ms-client-request-id" : "03a024f9-7bcc-4584-bf0a-786065ff5930", + "Date" : "Fri, 14 May 2021 21:57:36 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/0d6c65af0d6c65afbdc659003bcffb3d36f747c5b7/messages?numofmessages=2&visibilitytimeout=30&sv=2022-11-02&spr=https%2Chttp&st=2021-05-13T21%3A57%3A36Z&se=2021-05-15T21%3A57%3A36Z&sp=rap&sig=REDACTED", + "Headers" : { + "x-ms-version" : "2020-10-02", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5bbbf517-4498-4cb0-bfdd-f182e1ddefc5" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-10-02", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "353bf759-0003-008d-5f0c-49ed10000000", + "Body" : "65833ca3-28d9-4a31-b4e6-ca227597d59bFri, 14 May 2021 21:57:36 GMTFri, 21 May 2021 21:57:36 GMTAgAAAAMAAAAAAAAAoMiFOAxJ1wE=Fri, 14 May 2021 21:58:06 GMT1testcede2521-3e76-4603-981f-48ce4ed8b322Fri, 14 May 2021 21:57:36 GMTFri, 21 May 2021 21:57:36 GMTAgAAAAMAAAAAAAAAoMiFOAxJ1wE=Fri, 14 May 2021 21:58:06 GMT1sastest", + "x-ms-client-request-id" : "5bbbf517-4498-4cb0-bfdd-f182e1ddefc5", + "Date" : "Fri, 14 May 2021 21:57:36 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/0d6c65af0d6c65afbdc659003bcffb3d36f747c5b7/messages/65833ca3-28d9-4a31-b4e6-ca227597d59b?popreceipt=AgAAAAMAAAAAAAAAPz15JgxJ1wE%3D&visibilitytimeout=3600&sv=2022-11-02&spr=https%2Chttp&st=2021-05-13T21%3A57%3A36Z&se=2021-05-15T21%3A57%3A36Z&sp=rap&sig=REDACTED", + "Headers" : { + "x-ms-version" : "2020-10-02", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "1efd2cca-05d9-45cc-8907-e1cabacd625b", + "Content-Type" : "application/xml" + }, + "Response" : { + "content-length" : "279", + "x-ms-version" : "2020-10-02", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "AuthorizationPermissionMismatch", + "retry-after" : "0", + "StatusCode" : "403", + "x-ms-request-id" : "353bf764-0003-008d-670c-49ed10000000", + "Body" : "AuthorizationPermissionMismatchThis request is not authorized to perform this operation using this permission.\nRequestId:353bf764-0003-008d-670c-49ed10000000\nTime:2021-05-14T21:57:37.1146027Z", + "x-ms-client-request-id" : "1efd2cca-05d9-45cc-8907-e1cabacd625b", + "Date" : "Fri, 14 May 2021 21:57:36 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "0d6c65af0d6c65afbdc659003bcffb3d36f747c5b7", "2021-05-14T21:57:36.632824100Z", "2021-05-14T21:57:36.632824100Z", "0d6c65af0d6c65afbdc26465025e21470be14bad9c" ] +} diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsQueueSASPermissionParseIA.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsQueueSASPermissionParseIA.json new file mode 100644 index 0000000000000..ffbad99ae6a17 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsQueueSASPermissionParseIA.json @@ -0,0 +1,4 @@ +{ + "networkCallRecords" : [ ], + "variables" : [ "bcf73627bcf736278a030573f6e6bd4e061641eba1" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsQueueSASPermissionParse[0].json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsQueueSASPermissionParse[0].json new file mode 100644 index 0000000000000..2595f6cbeb315 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsQueueSASPermissionParse[0].json @@ -0,0 +1,4 @@ +{ + "networkCallRecords" : [ ], + "variables" : [ "4be8bf304be8bf30fe10528508938acf2db1404fae" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsQueueSASPermissionParse[1].json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsQueueSASPermissionParse[1].json new file mode 100644 index 0000000000000..13dec516e52a6 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsQueueSASPermissionParse[1].json @@ -0,0 +1,4 @@ +{ + "networkCallRecords" : [ ], + "variables" : [ "52f38e7152f38e712809594438fff6d4a08a4ba985" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsQueueSASPermissionParse[2].json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsQueueSASPermissionParse[2].json new file mode 100644 index 0000000000000..a77074cf48735 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsQueueSASPermissionParse[2].json @@ -0,0 +1,4 @@ +{ + "networkCallRecords" : [ ], + "variables" : [ "79deddb279deddb2ccb703072bf077154a5b4f6091" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsQueueSASPermissionParse[3].json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsQueueSASPermissionParse[3].json new file mode 100644 index 0000000000000..782f7064b3b0e --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsQueueSASPermissionParse[3].json @@ -0,0 +1,4 @@ +{ + "networkCallRecords" : [ ], + "variables" : [ "60c5ecf360c5ecf370901766ffd3c5ff70e84f248a" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsQueueSASPermissionParse[4].json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsQueueSASPermissionParse[4].json new file mode 100644 index 0000000000000..75cc210957b62 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsQueueSASPermissionParse[4].json @@ -0,0 +1,4 @@ +{ + "networkCallRecords" : [ ], + "variables" : [ "2f847a342f847a349ee82444e67ea042aeec4fe8a2" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsQueueSASPermissionParse[5].json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsQueueSASPermissionParse[5].json new file mode 100644 index 0000000000000..93a361938a9cb --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsQueueSASPermissionParse[5].json @@ -0,0 +1,4 @@ +{ + "networkCallRecords" : [ ], + "variables" : [ "369f4b75369f4b75c137633717b1586a4f4d4ce6b6" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsQueueSASPermissionParse[6].json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsQueueSASPermissionParse[6].json new file mode 100644 index 0000000000000..f65ae8b3174d3 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsQueueSASPermissionParse[6].json @@ -0,0 +1,4 @@ +{ + "networkCallRecords" : [ ], + "variables" : [ "1db218b61db218b637356294963cb505f6e64ceca6" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsQueueSASPermissionParse[7].json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsQueueSASPermissionParse[7].json new file mode 100644 index 0000000000000..9c2d38c91e5b9 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsQueueSASPermissionParse[7].json @@ -0,0 +1,4 @@ +{ + "networkCallRecords" : [ ], + "variables" : [ "04a929f704a929f7bf63360022c4730a9af44afda4" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsQueueSASPermissionToString[0].json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsQueueSASPermissionToString[0].json new file mode 100644 index 0000000000000..b88e80d2137d5 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsQueueSASPermissionToString[0].json @@ -0,0 +1,4 @@ +{ + "networkCallRecords" : [ ], + "variables" : [ "7ef28f5e7ef28f5e40c735399cabb37b4811439693" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsQueueSASPermissionToString[1].json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsQueueSASPermissionToString[1].json new file mode 100644 index 0000000000000..574885229369c --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsQueueSASPermissionToString[1].json @@ -0,0 +1,4 @@ +{ + "networkCallRecords" : [ ], + "variables" : [ "67e9be1f67e9be1fec956479809c8126011f41fc94" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsQueueSASPermissionToString[2].json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsQueueSASPermissionToString[2].json new file mode 100644 index 0000000000000..3a9380ebb456d --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsQueueSASPermissionToString[2].json @@ -0,0 +1,4 @@ +{ + "networkCallRecords" : [ ], + "variables" : [ "4cc4eddc4cc4eddcade213809b664817980a46c88a" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsQueueSASPermissionToString[3].json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsQueueSASPermissionToString[3].json new file mode 100644 index 0000000000000..fda1281a80cc8 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsQueueSASPermissionToString[3].json @@ -0,0 +1,4 @@ +{ + "networkCallRecords" : [ ], + "variables" : [ "55dfdc9d55dfdc9d1cc0026878808c448d624db285" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsQueueSASPermissionToString[4].json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsQueueSASPermissionToString[4].json new file mode 100644 index 0000000000000..37bb524470e20 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsQueueSASPermissionToString[4].json @@ -0,0 +1,4 @@ +{ + "networkCallRecords" : [ ], + "variables" : [ "1a9e4a5a1a9e4a5a93452966426f23cb51fe4a50b0" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsQueueSASPermissionToString[5].json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsQueueSASPermissionToString[5].json new file mode 100644 index 0000000000000..6478a88b72793 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsQueueSASPermissionToString[5].json @@ -0,0 +1,4 @@ +{ + "networkCallRecords" : [ ], + "variables" : [ "03857b1b03857b1bdb094145c7b29b6efb91404381" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsQueueSASUpdateDeleteWithPermissions.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsQueueSASUpdateDeleteWithPermissions.json new file mode 100644 index 0000000000000..856c50c3c1911 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsQueueSASUpdateDeleteWithPermissions.json @@ -0,0 +1,111 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/237c0753237c0753af621932ead01e4bd6cc43ce82", + "Headers" : { + "x-ms-version" : "2020-10-02", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "40193197-58d3-4782-92cd-b550b08d3bb9" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-10-02", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "353bf723-0003-008d-340c-49ed10000000", + "x-ms-client-request-id" : "40193197-58d3-4782-92cd-b550b08d3bb9", + "Date" : "Fri, 14 May 2021 21:57:35 GMT" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/237c0753237c0753af621932ead01e4bd6cc43ce82/messages", + "Headers" : { + "x-ms-version" : "2020-10-02", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "cc28e49f-8c7d-49e9-9b4f-6057f9b4d8dc", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-10-02", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "1aa63b8e-1003-0081-010c-497a18000000", + "Body" : "7f9a5b21-72ad-4e27-bc75-1d3eb2689b29Fri, 14 May 2021 21:57:36 GMTFri, 21 May 2021 21:57:36 GMTAgAAAAMAAAAAAAAAiJuFJgxJ1wE=Fri, 14 May 2021 21:57:36 GMT", + "x-ms-client-request-id" : "cc28e49f-8c7d-49e9-9b4f-6057f9b4d8dc", + "Date" : "Fri, 14 May 2021 21:57:36 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/237c0753237c0753af621932ead01e4bd6cc43ce82/messages/7f9a5b21-72ad-4e27-bc75-1d3eb2689b29?popreceipt=AgAAAAMAAAAAAAAAiJuFJgxJ1wE%3D&visibilitytimeout=0&sv=2022-11-02&spr=https%2Chttp&st=2021-05-13T21%3A57%3A36Z&se=2021-05-15T21%3A57%3A36Z&sp=raup&sig=REDACTED", + "Headers" : { + "x-ms-version" : "2020-10-02", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "865a15cf-a33d-439c-bea7-aadbebe29803", + "Content-Type" : "application/xml" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-10-02", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-time-next-visible" : "Fri, 14 May 2021 21:57:37 GMT", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "1aa63bd9-1003-0081-380c-497a18000000", + "x-ms-popreceipt" : "AwAAAAMAAAAAAAAAdiPOJgxJ1wEAAAAA", + "x-ms-client-request-id" : "865a15cf-a33d-439c-bea7-aadbebe29803", + "Date" : "Fri, 14 May 2021 21:57:36 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/237c0753237c0753af621932ead01e4bd6cc43ce82/messages?numofmessages=1&visibilitytimeout=30&sv=2022-11-02&spr=https%2Chttp&st=2021-05-13T21%3A57%3A36Z&se=2021-05-15T21%3A57%3A36Z&sp=raup&sig=REDACTED", + "Headers" : { + "x-ms-version" : "2020-10-02", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "8334cd91-10bb-41ae-b8a6-e243ac98d358" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-10-02", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "1aa63be6-1003-0081-420c-497a18000000", + "Body" : "7f9a5b21-72ad-4e27-bc75-1d3eb2689b29Fri, 14 May 2021 21:57:36 GMTFri, 21 May 2021 21:57:36 GMTAgAAAAMAAAAAAAAAfV29OAxJ1wE=Fri, 14 May 2021 21:58:07 GMT1testing", + "x-ms-client-request-id" : "8334cd91-10bb-41ae-b8a6-e243ac98d358", + "Date" : "Fri, 14 May 2021 21:57:36 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.queue.core.windows.net/237c0753237c0753af621932ead01e4bd6cc43ce82?sv=2022-11-02&spr=https%2Chttp&st=2021-05-13T21%3A57%3A36Z&se=2021-05-15T21%3A57%3A36Z&sp=raup&sig=REDACTED", + "Headers" : { + "x-ms-version" : "2020-10-02", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "8f4f13e9-1e46-44e0-8c71-6dd8fc01441c" + }, + "Response" : { + "content-length" : "246", + "x-ms-version" : "2020-10-02", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "AuthorizationFailure", + "retry-after" : "0", + "StatusCode" : "403", + "x-ms-request-id" : "07c75fc6-9003-0054-620c-499595000000", + "Body" : "AuthorizationFailureThis request is not authorized to perform this operation.\nRequestId:07c75fc6-9003-0054-620c-499595000000\nTime:2021-05-14T21:57:37.1951429Z", + "x-ms-client-request-id" : "8f4f13e9-1e46-44e0-8c71-6dd8fc01441c", + "Date" : "Fri, 14 May 2021 21:57:36 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "237c0753237c0753af621932ead01e4bd6cc43ce82", "2021-05-14T21:57:36.708820700Z", "2021-05-14T21:57:36.709820300Z", "237c0753237c0753af65551436a13d7d929e497c87" ] +} diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsQueueServiceSASCanonicalizedResource.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsQueueServiceSASCanonicalizedResource.json new file mode 100644 index 0000000000000..7679e6c2ca363 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsQueueServiceSASCanonicalizedResource.json @@ -0,0 +1,4 @@ +{ + "networkCallRecords" : [ ], + "variables" : [ "3d6758323d67583288028991e3090f5c350941c0af" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSasClientTestsAccountSASCreateQueue.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSasClientTestsAccountSASCreateQueue.json new file mode 100644 index 0000000000000..67c6c45f1e6b1 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSasClientTestsAccountSASCreateQueue.json @@ -0,0 +1,83 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/5053d9375053d9379be702689949d198ff764", + "Headers" : { + "x-ms-version" : "2020-10-02", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "97d93e36-8ed8-44f7-8eb4-0a525b4c371b" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-10-02", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "7d8175f6-7003-003e-2d0b-494dbd000000", + "x-ms-client-request-id" : "97d93e36-8ed8-44f7-8eb4-0a525b4c371b", + "Date" : "Fri, 14 May 2021 21:56:21 GMT" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/5053d9375053d9379be702689949d198ff764/messages", + "Headers" : { + "x-ms-version" : "2020-10-02", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "86b834df-1449-442b-916f-c7c1c585c1e2", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-10-02", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "e2cc853c-2003-0041-620b-498226000000", + "Body" : "c49bcf31-7e8e-42f1-8934-99a369db378dFri, 14 May 2021 21:56:23 GMTFri, 21 May 2021 21:56:23 GMTAgAAAAMAAAAAAAAARDyy+gtJ1wE=Fri, 14 May 2021 21:56:23 GMT", + "x-ms-client-request-id" : "86b834df-1449-442b-916f-c7c1c585c1e2", + "Date" : "Fri, 14 May 2021 21:56:22 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/5053d9375053d9379be38561c4196c5a52bd4?sv=2022-11-02&ss=q&srt=sco&se=2021-05-15T21%3A56%3A23Z&sp=rdc&sig=REDACTED", + "Headers" : { + "x-ms-version" : "2020-10-02", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "46c1088f-5abf-4c48-94c8-f5748fd01eb6" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-10-02", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "a8e76a0a-9003-0036-0d0b-4957b2000000", + "x-ms-client-request-id" : "46c1088f-5abf-4c48-94c8-f5748fd01eb6", + "Date" : "Fri, 14 May 2021 21:56:22 GMT" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.queue.core.windows.net/5053d9375053d9379be38561c4196c5a52bd4?sv=2022-11-02&ss=q&srt=sco&se=2021-05-15T21%3A56%3A23Z&sp=rdc&sig=REDACTED", + "Headers" : { + "x-ms-version" : "2020-10-02", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0d5e0d28-33d7-4275-884c-50ea07cf74b9" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-10-02", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "a8e76a16-9003-0036-170b-4957b2000000", + "x-ms-client-request-id" : "0d5e0d28-33d7-4275-884c-50ea07cf74b9", + "Date" : "Fri, 14 May 2021 21:56:22 GMT" + }, + "Exception" : null + } ], + "variables" : [ "5053d9375053d9379be702689949d198ff764", "2021-05-14T21:56:23.277848400Z", "5053d9375053d9379be38561c4196c5a52bd4" ] +} diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSasClientTestsAccountSASListQueues.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSasClientTestsAccountSASListQueues.json new file mode 100644 index 0000000000000..6756dfcf003d6 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSasClientTestsAccountSASListQueues.json @@ -0,0 +1,45 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/a8c5be13a8c5be13a2c03997e51e87e7d2c14", + "Headers" : { + "x-ms-version" : "2020-10-02", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3136bbac-480e-4e76-a439-8bd07fd49e35" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-10-02", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "e2cc84ed-2003-0041-1d0b-498226000000", + "x-ms-client-request-id" : "3136bbac-480e-4e76-a439-8bd07fd49e35", + "Date" : "Fri, 14 May 2021 21:56:22 GMT" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/a8c5be13a8c5be13a2c03997e51e87e7d2c14/messages", + "Headers" : { + "x-ms-version" : "2020-10-02", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "8ae7f1ef-f32a-401f-a7e5-14100a40250e", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-10-02", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "aeea6bee-6003-0050-130b-491892000000", + "Body" : "7f61b5d7-fe1e-4413-85a2-60b5ebb4daafFri, 14 May 2021 21:56:23 GMTFri, 21 May 2021 21:56:23 GMTAgAAAAMAAAAAAAAALhWy+gtJ1wE=Fri, 14 May 2021 21:56:23 GMT", + "x-ms-client-request-id" : "8ae7f1ef-f32a-401f-a7e5-14100a40250e", + "Date" : "Fri, 14 May 2021 21:56:22 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "a8c5be13a8c5be13a2c03997e51e87e7d2c14", "2021-05-14T21:56:23.275846800Z" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSasClientTestsQueueSASEnqueueWithId.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSasClientTestsQueueSASEnqueueWithId.json new file mode 100644 index 0000000000000..1a50e0a2e5398 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSasClientTestsQueueSASEnqueueWithId.json @@ -0,0 +1,109 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/43451aff43451affdb705981b134bec520c14", + "Headers" : { + "x-ms-version" : "2020-10-02", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "beeb2a18-ba35-404d-b87a-f0161de2fc40" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-10-02", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "aeea6ba3-6003-0050-530b-491892000000", + "x-ms-client-request-id" : "beeb2a18-ba35-404d-b87a-f0161de2fc40", + "Date" : "Fri, 14 May 2021 21:56:22 GMT" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/43451aff43451affdb705981b134bec520c14/messages", + "Headers" : { + "x-ms-version" : "2020-10-02", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "831fc0de-0135-4e34-8a75-86b68adee7a4", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-10-02", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "a8e769df-9003-0036-680b-4957b2000000", + "Body" : "d6d49748-815a-4ee5-a2da-bc96272fb43dFri, 14 May 2021 21:56:23 GMTFri, 21 May 2021 21:56:23 GMTAgAAAAMAAAAAAAAALxWy+gtJ1wE=Fri, 14 May 2021 21:56:23 GMT", + "x-ms-client-request-id" : "831fc0de-0135-4e34-8a75-86b68adee7a4", + "Date" : "Fri, 14 May 2021 21:56:22 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/43451aff43451affdb705981b134bec520c14?comp=acl", + "Headers" : { + "x-ms-version" : "2020-10-02", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c9aedb87-2202-458a-bec8-5cbec533692a", + "Content-Type" : "application/xml" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-10-02", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "20c2b7a1-9003-0009-130b-499f11000000", + "x-ms-client-request-id" : "c9aedb87-2202-458a-bec8-5cbec533692a", + "Date" : "Fri, 14 May 2021 21:56:22 GMT" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/43451aff43451affdb705981b134bec520c14/messages?sv=2022-11-02&si=4ebe99e7-9cd2-4955-81af-3871c7b44a16&sig=REDACTED", + "Headers" : { + "x-ms-version" : "2020-10-02", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0aefd582-cb1d-48a2-8738-3431734e9de3", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-10-02", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "e2cc99c8-2003-0041-370c-498226000000", + "Body" : "f61eef36-3e6b-4bf3-bfc4-528002674bacFri, 14 May 2021 21:56:53 GMTFri, 21 May 2021 21:56:53 GMTAgAAAAMAAAAAAAAA1P7bDAxJ1wE=Fri, 14 May 2021 21:56:53 GMT", + "x-ms-client-request-id" : "0aefd582-cb1d-48a2-8738-3431734e9de3", + "Date" : "Fri, 14 May 2021 21:56:53 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/43451aff43451affdb705981b134bec520c14/messages?numofmessages=2&visibilitytimeout=30&sv=2022-11-02&si=4ebe99e7-9cd2-4955-81af-3871c7b44a16&sig=REDACTED", + "Headers" : { + "x-ms-version" : "2020-10-02", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c287090a-1159-452d-b8ac-d4140147370d" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-10-02", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "e2cc99db-2003-0041-460c-498226000000", + "Body" : "d6d49748-815a-4ee5-a2da-bc96272fb43dFri, 14 May 2021 21:56:23 GMTFri, 21 May 2021 21:56:23 GMTAgAAAAMAAAAAAAAAbRnHHgxJ1wE=Fri, 14 May 2021 21:57:23 GMT1testf61eef36-3e6b-4bf3-bfc4-528002674bacFri, 14 May 2021 21:56:53 GMTFri, 21 May 2021 21:56:53 GMTAgAAAAMAAAAAAAAAbRnHHgxJ1wE=Fri, 14 May 2021 21:57:23 GMT1sastest", + "x-ms-client-request-id" : "c287090a-1159-452d-b8ac-d4140147370d", + "Date" : "Fri, 14 May 2021 21:56:53 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "43451aff43451affdb705981b134bec520c14", "2021-05-14T21:56:23.262848100Z", "2021-05-14T21:56:23.278849500Z", "4ebe99e7-9cd2-4955-81af-3871c7b44a16", "43451aff43451affdb7667492247810fbf1a41f6b4" ] +} diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSasClientTestsQueueSASEnqueueWithPerm.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSasClientTestsQueueSASEnqueueWithPerm.json new file mode 100644 index 0000000000000..54e76c227daac --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSasClientTestsQueueSASEnqueueWithPerm.json @@ -0,0 +1,112 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/2d4621012d462101f09356469fae92a56bcb4", + "Headers" : { + "x-ms-version" : "2020-10-02", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e7be3ff5-84a8-43c5-b3c0-93089395ff5e" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-10-02", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "a8e76995-9003-0036-2c0b-4957b2000000", + "x-ms-client-request-id" : "e7be3ff5-84a8-43c5-b3c0-93089395ff5e", + "Date" : "Fri, 14 May 2021 21:56:21 GMT" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/2d4621012d462101f09356469fae92a56bcb4/messages", + "Headers" : { + "x-ms-version" : "2020-10-02", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "855a5e22-558f-4abe-a283-4b45cf612661", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-10-02", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "20c2b72d-9003-0009-270b-499f11000000", + "Body" : "064fb5a2-2fd8-40d8-834a-56054d4b086cFri, 14 May 2021 21:56:23 GMTFri, 21 May 2021 21:56:23 GMTAgAAAAMAAAAAAAAAQzyy+gtJ1wE=Fri, 14 May 2021 21:56:23 GMT", + "x-ms-client-request-id" : "855a5e22-558f-4abe-a283-4b45cf612661", + "Date" : "Fri, 14 May 2021 21:56:22 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/2d4621012d462101f09356469fae92a56bcb4/messages?sv=2022-11-02&spr=https%2Chttp&st=2021-05-13T21%3A56%3A23Z&se=2021-05-15T21%3A56%3A23Z&sp=rap&sig=REDACTED", + "Headers" : { + "x-ms-version" : "2020-10-02", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f9a68de5-b88e-4f74-a256-356e4694d325", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-10-02", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "e2cc856b-2003-0041-070b-498226000000", + "Body" : "be6311cb-6ab0-4318-88b3-d1ce545da861Fri, 14 May 2021 21:56:23 GMTFri, 21 May 2021 21:56:23 GMTAgAAAAMAAAAAAAAAY6XX+gtJ1wE=Fri, 14 May 2021 21:56:23 GMT", + "x-ms-client-request-id" : "f9a68de5-b88e-4f74-a256-356e4694d325", + "Date" : "Fri, 14 May 2021 21:56:23 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/2d4621012d462101f09356469fae92a56bcb4/messages?numofmessages=2&visibilitytimeout=30&sv=2022-11-02&spr=https%2Chttp&st=2021-05-13T21%3A56%3A23Z&se=2021-05-15T21%3A56%3A23Z&sp=rap&sig=REDACTED", + "Headers" : { + "x-ms-version" : "2020-10-02", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "20f4a70f-8132-42a1-b688-cd8a1ebd51ea" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-10-02", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "aeea6c1a-6003-0050-390b-491892000000", + "Body" : "064fb5a2-2fd8-40d8-834a-56054d4b086cFri, 14 May 2021 21:56:23 GMTFri, 21 May 2021 21:56:23 GMTAgAAAAMAAAAAAAAAEkPGDAxJ1wE=Fri, 14 May 2021 21:56:53 GMT1testbe6311cb-6ab0-4318-88b3-d1ce545da861Fri, 14 May 2021 21:56:23 GMTFri, 21 May 2021 21:56:23 GMTAgAAAAMAAAAAAAAAEkPGDAxJ1wE=Fri, 14 May 2021 21:56:53 GMT1sastest", + "x-ms-client-request-id" : "20f4a70f-8132-42a1-b688-cd8a1ebd51ea", + "Date" : "Fri, 14 May 2021 21:56:23 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/2d4621012d462101f09356469fae92a56bcb4/messages/064fb5a2-2fd8-40d8-834a-56054d4b086c?popreceipt=AgAAAAMAAAAAAAAAQzyy%2BgtJ1wE%3D&visibilitytimeout=3600&sv=2022-11-02&spr=https%2Chttp&st=2021-05-13T21%3A56%3A23Z&se=2021-05-15T21%3A56%3A23Z&sp=rap&sig=REDACTED", + "Headers" : { + "x-ms-version" : "2020-10-02", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "723e3f56-c88c-48ac-b222-f03f697605e4", + "Content-Type" : "application/xml" + }, + "Response" : { + "content-length" : "279", + "x-ms-version" : "2020-10-02", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "AuthorizationPermissionMismatch", + "retry-after" : "0", + "StatusCode" : "403", + "x-ms-request-id" : "7d81765c-7003-003e-050b-494dbd000000", + "Body" : "AuthorizationPermissionMismatchThis request is not authorized to perform this operation using this permission.\nRequestId:7d81765c-7003-003e-050b-494dbd000000\nTime:2021-05-14T21:56:23.4606196Z", + "x-ms-client-request-id" : "723e3f56-c88c-48ac-b222-f03f697605e4", + "Date" : "Fri, 14 May 2021 21:56:22 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "2d4621012d462101f09356469fae92a56bcb4", "2021-05-14T21:56:23.264848100Z", "2021-05-14T21:56:23.298847300Z", "2d4621012d462101f09610095aed31d0eab248b98c" ] +} diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSasClientTestsQueueSASUpdateWithPerm.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSasClientTestsQueueSASUpdateWithPerm.json new file mode 100644 index 0000000000000..ba92553137704 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSasClientTestsQueueSASUpdateWithPerm.json @@ -0,0 +1,111 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/3797702f3797702ff569887853e1a39c737a4", + "Headers" : { + "x-ms-version" : "2020-10-02", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "20758de7-a360-463e-a499-1a809434533e" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-10-02", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "20c2b670-9003-0009-770b-499f11000000", + "x-ms-client-request-id" : "20758de7-a360-463e-a499-1a809434533e", + "Date" : "Fri, 14 May 2021 21:56:22 GMT" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/3797702f3797702ff569887853e1a39c737a4/messages", + "Headers" : { + "x-ms-version" : "2020-10-02", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ae42a373-2153-4465-b1b2-b7a5e5e41ea8", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-10-02", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "7d817622-7003-003e-520b-494dbd000000", + "Body" : "3b9134ee-3680-4643-9a92-ce732861ef32Fri, 14 May 2021 21:56:23 GMTFri, 21 May 2021 21:56:23 GMTAgAAAAMAAAAAAAAAQjyy+gtJ1wE=Fri, 14 May 2021 21:56:23 GMT", + "x-ms-client-request-id" : "ae42a373-2153-4465-b1b2-b7a5e5e41ea8", + "Date" : "Fri, 14 May 2021 21:56:22 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/3797702f3797702ff569887853e1a39c737a4/messages/3b9134ee-3680-4643-9a92-ce732861ef32?popreceipt=AgAAAAMAAAAAAAAAQjyy%2BgtJ1wE%3D&visibilitytimeout=0&sv=2022-11-02&spr=https%2Chttp&st=2021-05-13T21%3A56%3A23Z&se=2021-05-15T21%3A56%3A23Z&sp=raup&sig=REDACTED", + "Headers" : { + "x-ms-version" : "2020-10-02", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6a719857-be81-43a6-b980-afe5a9abf6ab", + "Content-Type" : "application/xml" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-10-02", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-time-next-visible" : "Fri, 14 May 2021 21:56:23 GMT", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "7d817641-7003-003e-6f0b-494dbd000000", + "x-ms-popreceipt" : "AwAAAAMAAAAAAAAA/xLc+gtJ1wEAAAAA", + "x-ms-client-request-id" : "6a719857-be81-43a6-b980-afe5a9abf6ab", + "Date" : "Fri, 14 May 2021 21:56:22 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net/3797702f3797702ff569887853e1a39c737a4/messages?numofmessages=1&visibilitytimeout=30&sv=2022-11-02&spr=https%2Chttp&st=2021-05-13T21%3A56%3A23Z&se=2021-05-15T21%3A56%3A23Z&sp=raup&sig=REDACTED", + "Headers" : { + "x-ms-version" : "2020-10-02", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7a8eb054-354a-4903-887b-29a2c0bd04da" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-10-02", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "7d81764f-7003-003e-7a0b-494dbd000000", + "Body" : "3b9134ee-3680-4643-9a92-ce732861ef32Fri, 14 May 2021 21:56:23 GMTFri, 21 May 2021 21:56:23 GMTAgAAAAMAAAAAAAAADvHHDAxJ1wE=Fri, 14 May 2021 21:56:53 GMT1testing", + "x-ms-client-request-id" : "7a8eb054-354a-4903-887b-29a2c0bd04da", + "Date" : "Fri, 14 May 2021 21:56:22 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.queue.core.windows.net/3797702f3797702ff569887853e1a39c737a4?sv=2022-11-02&spr=https%2Chttp&st=2021-05-13T21%3A56%3A23Z&se=2021-05-15T21%3A56%3A23Z&sp=raup&sig=REDACTED", + "Headers" : { + "x-ms-version" : "2020-10-02", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "599453c5-d8af-48ad-b37e-ddb1f5d64b31" + }, + "Response" : { + "content-length" : "246", + "x-ms-version" : "2020-10-02", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "AuthorizationFailure", + "retry-after" : "0", + "StatusCode" : "403", + "x-ms-request-id" : "20c2b7f2-9003-0009-610b-499f11000000", + "Body" : "AuthorizationFailureThis request is not authorized to perform this operation.\nRequestId:20c2b7f2-9003-0009-610b-499f11000000\nTime:2021-05-14T21:56:23.4617991Z", + "x-ms-client-request-id" : "599453c5-d8af-48ad-b37e-ddb1f5d64b31", + "Date" : "Fri, 14 May 2021 21:56:22 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "3797702f3797702ff569887853e1a39c737a4", "2021-05-14T21:56:23.263848700Z", "2021-05-14T21:56:23.297846800Z", "3797702f3797702ff5675318e72b5f3dad344392a3" ] +} diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSasClientTestsRememberAboutStringToSignDeprecation.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSasClientTestsRememberAboutStringToSignDeprecation.json new file mode 100644 index 0000000000000..c902d209098c7 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSasClientTestsRememberAboutStringToSignDeprecation.json @@ -0,0 +1,45 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/7b20caae7b20caaefd9233257e2db5c327f14", + "Headers" : { + "x-ms-version" : "2020-08-04", + "User-Agent" : "azsdk-java-azure-storage-queue/12.11.0-beta.1 (11; Windows 10; 10.0)", + "x-ms-client-request-id" : "a746ea46-f524-4565-976a-90c9871baa3f" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-08-04", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "004650a2-1003-0055-7320-62da3a000000", + "x-ms-client-request-id" : "a746ea46-f524-4565-976a-90c9871baa3f", + "Date" : "Tue, 15 Jun 2021 19:57:28 GMT" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/7b20caae7b20caaefd9233257e2db5c327f14/messages", + "Headers" : { + "x-ms-version" : "2020-08-04", + "User-Agent" : "azsdk-java-azure-storage-queue/12.11.0-beta.1 (11; Windows 10; 10.0)", + "x-ms-client-request-id" : "5ad9daf0-1646-4d15-9a37-87adafe324da", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-08-04", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "004650ff-1003-0055-4a20-62da3a000000", + "Body" : "0e3b8c38-612c-46b6-92f8-22a2009c76b0Tue, 15 Jun 2021 19:57:28 GMTTue, 22 Jun 2021 19:57:28 GMTAgAAAAMAAAAAAAAAk9+pqyBi1wE=Tue, 15 Jun 2021 19:57:28 GMT", + "x-ms-client-request-id" : "5ad9daf0-1646-4d15-9a37-87adafe324da", + "Date" : "Tue, 15 Jun 2021 19:57:28 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "7b20caae7b20caaefd9233257e2db5c327f14", "7b20caae7b20caaefd923837411191e6be874c8786", "2021-06-15T19:57:29.125555500Z" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsBuilderBearerTokenValidation.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsBuilderBearerTokenValidation.json new file mode 100644 index 0000000000000..ba5f37f8f8555 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsBuilderBearerTokenValidation.json @@ -0,0 +1,4 @@ +{ + "networkCallRecords" : [ ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsCreateNull.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsCreateNull.json new file mode 100644 index 0000000000000..ba5f37f8f8555 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsCreateNull.json @@ -0,0 +1,4 @@ +{ + "networkCallRecords" : [ ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsCreateQueue.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsCreateQueue.json new file mode 100644 index 0000000000000..b51474e555041 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsCreateQueue.json @@ -0,0 +1,45 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/c3293b4fc3293b4f82374960a349848b46594d139c", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "1c52d264-099a-4030-afa1-b2ac8b382bdd" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "d1814e0a-2003-00e5-3409-41a763000000", + "x-ms-client-request-id" : "1c52d264-099a-4030-afa1-b2ac8b382bdd", + "Date" : "Tue, 04 May 2021 17:18:35 GMT" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/c3293b4fc3293b4f82374960a349848b46594d139c/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "d1eff90d-a8e8-4141-9622-d131b9b2be8e", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "d1814e22-2003-00e5-4a09-41a763000000", + "Body" : "c1937d11-a831-403c-8660-3f9b428eb59bTue, 04 May 2021 17:18:37 GMTTue, 11 May 2021 17:18:37 GMTAgAAAAMAAAAAAAAAYTYbhQlB1wE=Tue, 04 May 2021 17:18:37 GMT", + "x-ms-client-request-id" : "d1eff90d-a8e8-4141-9622-d131b9b2be8e", + "Date" : "Tue, 04 May 2021 17:18:36 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "c3293b4fc3293b4f82374960a349848b46594d139c" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsCreateQueueMaxOverload[0].json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsCreateQueueMaxOverload[0].json new file mode 100644 index 0000000000000..bd434dc6cce79 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsCreateQueueMaxOverload[0].json @@ -0,0 +1,45 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/d5248583d52485833653469383f5bc7f78744d449e", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "6f0e2754-a13f-441f-aba6-73be807f6e3a" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "fde0426e-8003-00a1-6609-412d5c000000", + "x-ms-client-request-id" : "6f0e2754-a13f-441f-aba6-73be807f6e3a", + "Date" : "Tue, 04 May 2021 17:18:36 GMT" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/d5248583d52485833653469383f5bc7f78744d449e/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "05f6d639-7719-48c6-947e-3638ed3b1f9a", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "e87114f7-4003-0081-2d09-4156fb000000", + "Body" : "03f5da43-a1b0-4854-a960-90841acadafeTue, 04 May 2021 17:18:37 GMTTue, 11 May 2021 17:18:37 GMTAgAAAAMAAAAAAAAAKz8OhQlB1wE=Tue, 04 May 2021 17:18:37 GMT", + "x-ms-client-request-id" : "05f6d639-7719-48c6-947e-3638ed3b1f9a", + "Date" : "Tue, 04 May 2021 17:18:36 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "d5248583d52485833653469383f5bc7f78744d449e" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsCreateQueueMaxOverload[1].json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsCreateQueueMaxOverload[1].json new file mode 100644 index 0000000000000..2dbaf81444d28 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsCreateQueueMaxOverload[1].json @@ -0,0 +1,45 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/cc3fb4c2cc3fb4c250d239331aea16a8ac524f40a7", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "4d4ec9bb-f1a1-48f0-9452-bdaf292af606" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "895e7a65-6003-00a9-2d09-413753000000", + "x-ms-client-request-id" : "4d4ec9bb-f1a1-48f0-9452-bdaf292af606", + "Date" : "Tue, 04 May 2021 17:18:37 GMT" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/cc3fb4c2cc3fb4c250d239331aea16a8ac524f40a7/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "1df6c715-45f7-47a3-9f21-041d221991c5", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "2b9510f3-0003-0006-3809-41c59e000000", + "Body" : "8db589cf-ce90-449f-9da2-a8039b4de91aTue, 04 May 2021 17:18:37 GMTTue, 11 May 2021 17:18:37 GMTAgAAAAMAAAAAAAAAzz5EhQlB1wE=Tue, 04 May 2021 17:18:37 GMT", + "x-ms-client-request-id" : "1df6c715-45f7-47a3-9f21-041d221991c5", + "Date" : "Tue, 04 May 2021 17:18:36 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "cc3fb4c2cc3fb4c250d239331aea16a8ac524f40a7" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsCreateQueueMaxOverload[2].json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsCreateQueueMaxOverload[2].json new file mode 100644 index 0000000000000..bc645f0254933 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsCreateQueueMaxOverload[2].json @@ -0,0 +1,45 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/e712e701e712e7013e321404401407b270a442218b", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "fb876120-1326-4507-ac71-060cff41e97d" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "53662479-4003-00dc-4a09-415c7f000000", + "x-ms-client-request-id" : "fb876120-1326-4507-ac71-060cff41e97d", + "Date" : "Tue, 04 May 2021 17:18:37 GMT" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/e712e701e712e7013e321404401407b270a442218b/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "77828d97-7133-49ea-b828-ab8655fdb0f2", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "fde042b9-8003-00a1-2709-412d5c000000", + "Body" : "c249561b-ab8a-45b0-9cdc-3f6070150cbeTue, 04 May 2021 17:18:37 GMTTue, 11 May 2021 17:18:37 GMTAgAAAAMAAAAAAAAAdgZDhQlB1wE=Tue, 04 May 2021 17:18:37 GMT", + "x-ms-client-request-id" : "77828d97-7133-49ea-b828-ab8655fdb0f2", + "Date" : "Tue, 04 May 2021 17:18:37 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "e712e701e712e7013e321404401407b270a442218b" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsCreateQueueWithInvalidMetadata.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsCreateQueueWithInvalidMetadata.json new file mode 100644 index 0000000000000..04250739827c5 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsCreateQueueWithInvalidMetadata.json @@ -0,0 +1,26 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/ef7b0df799586b", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "d2e06975-3910-4dea-a918-d6090f468448" + }, + "Response" : { + "content-length" : "260", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "InvalidMetadata", + "retry-after" : "0", + "StatusCode" : "400", + "x-ms-request-id" : "78b233f6-8003-0008-1f09-41ec2e000000", + "Body" : "InvalidMetadataThe metadata specified is invalid. It has characters that are not permitted.\nRequestId:78b233f6-8003-0008-1f09-41ec2e000000\nTime:2021-05-04T17:18:36.7586137Z", + "x-ms-client-request-id" : "d2e06975-3910-4dea-a918-d6090f468448", + "Date" : "Tue, 04 May 2021 17:18:36 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "ef7b0df799586b" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsCreateQueueWithInvalidName[0].json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsCreateQueueWithInvalidName[0].json new file mode 100644 index 0000000000000..7c7ddbe3eddde --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsCreateQueueWithInvalidName[0].json @@ -0,0 +1,26 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/a_b", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "9aac9a3c-bdaf-46eb-9985-37c87e668931" + }, + "Response" : { + "content-length" : "243", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "InvalidResourceName", + "retry-after" : "0", + "StatusCode" : "400", + "x-ms-request-id" : "b7beabbe-a003-0052-6d09-418ac9000000", + "Body" : "InvalidResourceNameThe specifed resource name contains invalid characters.\nRequestId:b7beabbe-a003-0052-6d09-418ac9000000\nTime:2021-05-04T17:18:36.7846254Z", + "x-ms-client-request-id" : "9aac9a3c-bdaf-46eb-9985-37c87e668931", + "Date" : "Tue, 04 May 2021 17:18:36 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsCreateQueueWithInvalidName[1].json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsCreateQueueWithInvalidName[1].json new file mode 100644 index 0000000000000..3da965ed63274 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsCreateQueueWithInvalidName[1].json @@ -0,0 +1,26 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/-ab", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "af2b2b03-0c98-4b15-a33b-157760979c21" + }, + "Response" : { + "content-length" : "243", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "InvalidResourceName", + "retry-after" : "0", + "StatusCode" : "400", + "x-ms-request-id" : "5ef6fb38-8003-0055-1309-41e6aa000000", + "Body" : "InvalidResourceNameThe specifed resource name contains invalid characters.\nRequestId:5ef6fb38-8003-0055-1309-41e6aa000000\nTime:2021-05-04T17:18:38.1632736Z", + "x-ms-client-request-id" : "af2b2b03-0c98-4b15-a33b-157760979c21", + "Date" : "Tue, 04 May 2021 17:18:37 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsCreateQueueWithInvalidName[2].json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsCreateQueueWithInvalidName[2].json new file mode 100644 index 0000000000000..fa95a39a28aef --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsCreateQueueWithInvalidName[2].json @@ -0,0 +1,26 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/a--b", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "d7b3c5c9-b2e6-4dfe-a512-991d86c9b5c3" + }, + "Response" : { + "content-length" : "243", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "InvalidResourceName", + "retry-after" : "0", + "StatusCode" : "400", + "x-ms-request-id" : "4a84b4a3-a003-007d-0809-418702000000", + "Body" : "InvalidResourceNameThe specifed resource name contains invalid characters.\nRequestId:4a84b4a3-a003-007d-0809-418702000000\nTime:2021-05-04T17:18:37.4651981Z", + "x-ms-client-request-id" : "d7b3c5c9-b2e6-4dfe-a512-991d86c9b5c3", + "Date" : "Tue, 04 May 2021 17:18:36 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsCreateQueueWithInvalidName[3].json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsCreateQueueWithInvalidName[3].json new file mode 100644 index 0000000000000..0210d9540884e --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsCreateQueueWithInvalidName[3].json @@ -0,0 +1,26 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/Abc", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "f03d1fc5-da20-4ed5-809b-78e7cc839402" + }, + "Response" : { + "content-length" : "243", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "InvalidResourceName", + "retry-after" : "0", + "StatusCode" : "400", + "x-ms-request-id" : "34fa7a3b-1003-0078-7a09-4155d9000000", + "Body" : "InvalidResourceNameThe specifed resource name contains invalid characters.\nRequestId:34fa7a3b-1003-0078-7a09-4155d9000000\nTime:2021-05-04T17:18:37.8717893Z", + "x-ms-client-request-id" : "f03d1fc5-da20-4ed5-809b-78e7cc839402", + "Date" : "Tue, 04 May 2021 17:18:37 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsCreateQueueWithInvalidName[4].json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsCreateQueueWithInvalidName[4].json new file mode 100644 index 0000000000000..ddd3627b611c7 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsCreateQueueWithInvalidName[4].json @@ -0,0 +1,26 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/ab", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "2e43d553-dc9f-46b5-be26-d72843452482" + }, + "Response" : { + "content-length" : "256", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "OutOfRangeInput", + "retry-after" : "0", + "StatusCode" : "400", + "x-ms-request-id" : "7b738651-2003-002e-5f09-41a436000000", + "Body" : "OutOfRangeInputThe specified resource name length is not within the permissible limits.\nRequestId:7b738651-2003-002e-5f09-41a436000000\nTime:2021-05-04T17:18:38.6272971Z", + "x-ms-client-request-id" : "2e43d553-dc9f-46b5-be26-d72843452482", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsCreateQueueWithInvalidName[5].json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsCreateQueueWithInvalidName[5].json new file mode 100644 index 0000000000000..df3a87f77344c --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsCreateQueueWithInvalidName[5].json @@ -0,0 +1,26 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/verylongverylongverylongverylongverylongverylongverylongverylong", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "268d7b8f-88e9-4195-8049-8f510d80f74a" + }, + "Response" : { + "content-length" : "256", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "OutOfRangeInput", + "retry-after" : "0", + "StatusCode" : "400", + "x-ms-request-id" : "2b951118-0003-0006-5709-41c59e000000", + "Body" : "OutOfRangeInputThe specified resource name length is not within the permissible limits.\nRequestId:2b951118-0003-0006-5709-41c59e000000\nTime:2021-05-04T17:18:38.9250108Z", + "x-ms-client-request-id" : "268d7b8f-88e9-4195-8049-8f510d80f74a", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsDeleteQueue.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsDeleteQueue.json new file mode 100644 index 0000000000000..4ba77b324e4e9 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsDeleteQueue.json @@ -0,0 +1,65 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/07890cfc07890cfc5e0940177360efb1ef2140ac92", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "ba9d444d-5cb7-4a87-9671-3007ddb9d51d" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "fdcaffcd-7003-0033-2109-41a98a000000", + "x-ms-client-request-id" : "ba9d444d-5cb7-4a87-9671-3007ddb9d51d", + "Date" : "Tue, 04 May 2021 17:18:36 GMT" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.queue.core.windows.net/07890cfc07890cfc5e0940177360efb1ef2140ac92", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "938d1267-3515-46d9-a2b1-4383525f622a" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "7c5d3991-2003-0011-5609-416c95000000", + "x-ms-client-request-id" : "938d1267-3515-46d9-a2b1-4383525f622a", + "Date" : "Tue, 04 May 2021 17:18:36 GMT" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/07890cfc07890cfc5e0940177360efb1ef2140ac92/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "005018ff-a8c9-4d79-917a-0dfb9e89ae5a", + "Content-Type" : "application/xml" + }, + "Response" : { + "content-length" : "217", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "QueueNotFound", + "retry-after" : "0", + "StatusCode" : "404", + "x-ms-request-id" : "fde042a8-8003-00a1-1809-412d5c000000", + "Body" : "QueueNotFoundThe specified queue does not exist.\nRequestId:fde042a8-8003-00a1-1809-412d5c000000\nTime:2021-05-04T17:18:37.4746055Z", + "x-ms-client-request-id" : "005018ff-a8c9-4d79-917a-0dfb9e89ae5a", + "Date" : "Tue, 04 May 2021 17:18:37 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "07890cfc07890cfc5e0940177360efb1ef2140ac92" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsDeleteQueueError.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsDeleteQueueError.json new file mode 100644 index 0000000000000..fd50bcee4ac14 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsDeleteQueueError.json @@ -0,0 +1,26 @@ +{ + "networkCallRecords" : [ { + "Method" : "DELETE", + "Uri" : "https://REDACTED.queue.core.windows.net/faab2759faab2759e2f810622ba7276a8c994c87b9", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "5b40779f-feff-412b-b47c-24d82c53ee77" + }, + "Response" : { + "content-length" : "217", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "QueueNotFound", + "retry-after" : "0", + "StatusCode" : "404", + "x-ms-request-id" : "fa8afa77-b003-0013-0309-41d22d000000", + "Body" : "QueueNotFoundThe specified queue does not exist.\nRequestId:fa8afa77-b003-0013-0309-41d22d000000\nTime:2021-05-04T17:18:36.7644288Z", + "x-ms-client-request-id" : "5b40779f-feff-412b-b47c-24d82c53ee77", + "Date" : "Tue, 04 May 2021 17:18:36 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "faab2759faab2759e2f810622ba7276a8c994c87b9" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsGetAndSetProperties.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsGetAndSetProperties.json new file mode 100644 index 0000000000000..333196b3d892b --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsGetAndSetProperties.json @@ -0,0 +1,90 @@ +{ + "networkCallRecords" : [ { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net?restype=service&comp=properties", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "a4447024-97ac-484f-b288-a1f3f285415c" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "26562d21-0003-004b-4909-410a72000000", + "Body" : "1.0falsetruetruetrue31.0truefalsetrue31.0truefalsetrue3", + "x-ms-client-request-id" : "a4447024-97ac-484f-b288-a1f3f285415c", + "Date" : "Tue, 04 May 2021 17:18:36 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net?restype=service&comp=properties", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "8c7ce810-6ace-4430-92d8-f706735a59c8" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "76d9431e-e003-0021-3809-41d25a000000", + "Body" : "1.0falsetruetruetrue31.0truefalsetrue31.0truefalsetrue3", + "x-ms-client-request-id" : "8c7ce810-6ace-4430-92d8-f706735a59c8", + "Date" : "Tue, 04 May 2021 17:18:36 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net?restype=service&comp=properties", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "7ec3e994-b149-4f18-8245-a189414040a1", + "Content-Type" : "application/xml" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "76d94329-e003-0021-4309-41d25a000000", + "x-ms-client-request-id" : "7ec3e994-b149-4f18-8245-a189414040a1", + "Date" : "Tue, 04 May 2021 17:18:37 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net?restype=service&comp=properties", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "6ec107c3-a171-4985-ae6e-4934b317760b" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "e2d48df4-d003-00ce-5309-4127af000000", + "Body" : "1.0falsetruetruetrue31.0truefalsetrue31.0truefalsetrue3", + "x-ms-client-request-id" : "6ec107c3-a171-4985-ae6e-4934b317760b", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsGetQueueClient.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsGetQueueClient.json new file mode 100644 index 0000000000000..f13da85a5d06b --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsGetQueueClient.json @@ -0,0 +1,4 @@ +{ + "networkCallRecords" : [ ], + "variables" : [ "74716c9574716c95a4e625679c052b347adc47bfb4" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsListEmptyQueues.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsListEmptyQueues.json new file mode 100644 index 0000000000000..f7c37ae080571 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsListEmptyQueues.json @@ -0,0 +1,26 @@ +{ + "networkCallRecords" : [ { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net?comp=list&prefix=0189c0b0&include=", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "24c492a8-e612-439a-8f69-0d5aa56eb0a4" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "af9d2432-5003-0046-7e09-41c2a6000000", + "Body" : "0189c0b0", + "x-ms-client-request-id" : "24c492a8-e612-439a-8f69-0d5aa56eb0a4", + "Date" : "Tue, 04 May 2021 17:18:36 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsListQueuesMaxResultsByPage.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsListQueuesMaxResultsByPage.json new file mode 100644 index 0000000000000..3a03b1be42823 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsListQueuesMaxResultsByPage.json @@ -0,0 +1,105 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/382517b4382517b46d107804ba79b01116204e8bac0", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "f5a1484f-0be4-4d31-a83f-78d00d139965" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "e87114de-4003-0081-1909-4156fb000000", + "x-ms-client-request-id" : "f5a1484f-0be4-4d31-a83f-78d00d139965", + "Date" : "Tue, 04 May 2021 17:18:36 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/382517b4382517b46d107804ba79b01116204e8bac1", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "b39aa2b2-7274-4a22-9221-4628c60e3b1d" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "d99b0662-6003-004d-6109-4139cd000000", + "x-ms-client-request-id" : "b39aa2b2-7274-4a22-9221-4628c60e3b1d", + "Date" : "Tue, 04 May 2021 17:18:36 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/382517b4382517b46d107804ba79b01116204e8bac2", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "ec8e75e0-dc9a-4d09-8860-42a0da19d551" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "d99b0667-6003-004d-6509-4139cd000000", + "x-ms-client-request-id" : "ec8e75e0-dc9a-4d09-8860-42a0da19d551", + "Date" : "Tue, 04 May 2021 17:18:36 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net?comp=list&prefix=382517b4&maxresults=2&include=", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "cd876018-cb1a-4483-8fd6-efed9e2fc6b7" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "66d7cf25-0003-0074-6509-41c2d1000000", + "Body" : "382517b42382517b4382517b46d107804ba79b01116204e8bac0382517b4382517b46d107804ba79b01116204e8bac1/kasobolcanarytest2/382517b4382517b46d107804ba79b01116204e8bac2", + "x-ms-client-request-id" : "cd876018-cb1a-4483-8fd6-efed9e2fc6b7", + "Date" : "Tue, 04 May 2021 17:18:37 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net?comp=list&prefix=382517b4&marker=/kasobolcanarytest2/382517b4382517b46d107804ba79b01116204e8bac2&maxresults=2&include=", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "3b313ac4-8ec0-4027-81f6-b17b58ffd03b" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "e871150d-4003-0081-4009-4156fb000000", + "Body" : "382517b4/kasobolcanarytest2/382517b4382517b46d107804ba79b01116204e8bac22382517b4382517b46d107804ba79b01116204e8bac2", + "x-ms-client-request-id" : "3b313ac4-8ec0-4027-81f6-b17b58ffd03b", + "Date" : "Tue, 04 May 2021 17:18:37 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "382517b4382517b46d107804ba79b01116204e8bac" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsListQueues[0].json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsListQueues[0].json new file mode 100644 index 0000000000000..6bb6dddf72e9c --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsListQueues[0].json @@ -0,0 +1,140 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/73fe48a1q73fe48a11b631493718bc5196cf50", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "181a117a-543b-4f86-9508-222c782274bf" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "946d0441-0003-00dd-2509-4103a3000000", + "x-ms-client-request-id" : "181a117a-543b-4f86-9508-222c782274bf", + "Date" : "Tue, 04 May 2021 17:18:36 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/73fe48a1q73fe48a11b631493718bc5196cf51", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "1bac3582-c8fa-412c-8f6a-0b32afdef69b" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "78b23402-8003-0008-2909-41ec2e000000", + "x-ms-client-request-id" : "1bac3582-c8fa-412c-8f6a-0b32afdef69b", + "Date" : "Tue, 04 May 2021 17:18:36 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/73fe48a1q73fe48a11b631493718bc5196cf52", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "8e30d27b-a918-4e26-941e-bbe81044d543" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "78b23409-8003-0008-2f09-41ec2e000000", + "x-ms-client-request-id" : "8e30d27b-a918-4e26-941e-bbe81044d543", + "Date" : "Tue, 04 May 2021 17:18:37 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net?comp=list&prefix=73fe48a1q&include=", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "a77206bd-294a-41dc-ab85-67faa9e4e362" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "3c7b1795-c003-0054-2309-41b976000000", + "Body" : "73fe48a1q73fe48a1q73fe48a11b631493718bc5196cf5073fe48a1q73fe48a11b631493718bc5196cf5173fe48a1q73fe48a11b631493718bc5196cf52", + "x-ms-client-request-id" : "a77206bd-294a-41dc-ab85-67faa9e4e362", + "Date" : "Tue, 04 May 2021 17:18:37 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.queue.core.windows.net/73fe48a1q73fe48a11b631493718bc5196cf50", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "9b983a1b-e360-4af0-afbe-bd4f30202af3" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "d99b068b-6003-004d-0409-4139cd000000", + "x-ms-client-request-id" : "9b983a1b-e360-4af0-afbe-bd4f30202af3", + "Date" : "Tue, 04 May 2021 17:18:37 GMT" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.queue.core.windows.net/73fe48a1q73fe48a11b631493718bc5196cf51", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "3d5dd1d1-6971-4069-931e-b77c2b617a06" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "6980d22f-1003-0035-7609-419a35000000", + "x-ms-client-request-id" : "3d5dd1d1-6971-4069-931e-b77c2b617a06", + "Date" : "Tue, 04 May 2021 17:18:38 GMT" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.queue.core.windows.net/73fe48a1q73fe48a11b631493718bc5196cf52", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "75b0dfa0-9190-4ad9-b722-6dfd4667a13e" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "66d7cf45-0003-0074-0309-41c2d1000000", + "x-ms-client-request-id" : "75b0dfa0-9190-4ad9-b722-6dfd4667a13e", + "Date" : "Tue, 04 May 2021 17:18:38 GMT" + }, + "Exception" : null + } ], + "variables" : [ "73fe48a1q73fe48a11b631493718bc5196cf5" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsListQueues[1].json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsListQueues[1].json new file mode 100644 index 0000000000000..ff81bb29bfbee --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsListQueues[1].json @@ -0,0 +1,162 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/6ae579e0q6ae579e03d037032f79239a51e920", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "669e03a7-ec18-4436-b6b4-dc8f1f4fd54f" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "e8711505-4003-0081-3a09-4156fb000000", + "x-ms-client-request-id" : "669e03a7-ec18-4436-b6b4-dc8f1f4fd54f", + "Date" : "Tue, 04 May 2021 17:18:37 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/6ae579e0q6ae579e03d037032f79239a51e921", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "82bd5fa8-0e8c-4ddd-a91d-9eace5bc93e2" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "af9d247e-5003-0046-4609-41c2a6000000", + "x-ms-client-request-id" : "82bd5fa8-0e8c-4ddd-a91d-9eace5bc93e2", + "Date" : "Tue, 04 May 2021 17:18:37 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/6ae579e0q6ae579e03d037032f79239a51e922", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "ebc5a0e1-3d85-44f8-96fa-3362c21ec88a" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "66d7cf2a-0003-0074-6a09-41c2d1000000", + "x-ms-client-request-id" : "ebc5a0e1-3d85-44f8-96fa-3362c21ec88a", + "Date" : "Tue, 04 May 2021 17:18:37 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net?comp=list&prefix=6ae579e0q&maxresults=2&include=", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "04641085-43a2-4365-ba14-6e6cb0766120" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "beffcc1d-b003-00c8-0209-411410000000", + "Body" : "6ae579e0q26ae579e0q6ae579e03d037032f79239a51e9206ae579e0q6ae579e03d037032f79239a51e921/kasobolcanarytest2/6ae579e0q6ae579e03d037032f79239a51e922", + "x-ms-client-request-id" : "04641085-43a2-4365-ba14-6e6cb0766120", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.queue.core.windows.net/6ae579e0q6ae579e03d037032f79239a51e920", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "7d0ec5f9-5858-4569-90b6-cbf69c131842" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "66d7cf40-0003-0074-7e09-41c2d1000000", + "x-ms-client-request-id" : "7d0ec5f9-5858-4569-90b6-cbf69c131842", + "Date" : "Tue, 04 May 2021 17:18:38 GMT" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.queue.core.windows.net/6ae579e0q6ae579e03d037032f79239a51e921", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "77823c2b-a932-4cf3-aa5a-1cfad201f39a" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "3c7b17b2-c003-0054-3a09-41b976000000", + "x-ms-client-request-id" : "77823c2b-a932-4cf3-aa5a-1cfad201f39a", + "Date" : "Tue, 04 May 2021 17:18:37 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net?comp=list&prefix=6ae579e0q&marker=/kasobolcanarytest2/6ae579e0q6ae579e03d037032f79239a51e922&maxresults=2&include=", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "e555fb22-b27a-4634-9fdc-a9b83a97d21d" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "80fe111f-6003-002f-6809-41fbea000000", + "Body" : "6ae579e0q/kasobolcanarytest2/6ae579e0q6ae579e03d037032f79239a51e92226ae579e0q6ae579e03d037032f79239a51e922", + "x-ms-client-request-id" : "e555fb22-b27a-4634-9fdc-a9b83a97d21d", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.queue.core.windows.net/6ae579e0q6ae579e03d037032f79239a51e922", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "07ea917c-5cf4-4c68-bd07-fd4dadaabef7" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "b7beabf7-a003-0052-1f09-418ac9000000", + "x-ms-client-request-id" : "07ea917c-5cf4-4c68-bd07-fd4dadaabef7", + "Date" : "Tue, 04 May 2021 17:18:38 GMT" + }, + "Exception" : null + } ], + "variables" : [ "6ae579e0q6ae579e03d037032f79239a51e92" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsListQueues[2].json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsListQueues[2].json new file mode 100644 index 0000000000000..2a6a3d83e7e31 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsListQueues[2].json @@ -0,0 +1,140 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/41c82a23q41c82a23bcf68034621f954638480", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "0f22af33-33fa-4628-a443-24c6f8221e52" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "ec6c637a-7003-00e8-0209-416fb7000000", + "x-ms-client-request-id" : "0f22af33-33fa-4628-a443-24c6f8221e52", + "Date" : "Tue, 04 May 2021 17:18:37 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/41c82a23q41c82a23bcf68034621f954638481", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "c88c29f9-5dff-4019-a8c5-13b6f40b97ef" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "3c7b179f-c003-0054-2b09-41b976000000", + "x-ms-client-request-id" : "c88c29f9-5dff-4019-a8c5-13b6f40b97ef", + "Date" : "Tue, 04 May 2021 17:18:37 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/41c82a23q41c82a23bcf68034621f954638482", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "6e99cfa0-4921-4d87-a23f-efdd1e475c33" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "26562d76-0003-004b-1709-410a72000000", + "x-ms-client-request-id" : "6e99cfa0-4921-4d87-a23f-efdd1e475c33", + "Date" : "Tue, 04 May 2021 17:18:38 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net?comp=list&prefix=41c82a23q&include=metadata", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "1ad3a2c3-92da-448f-8250-2c90eb424224" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "76d9435b-e003-0021-6f09-41d25a000000", + "Body" : "41c82a23q41c82a23q41c82a23bcf68034621f954638480value041c82a23q41c82a23bcf68034621f954638481value141c82a23q41c82a23bcf68034621f954638482value2", + "x-ms-client-request-id" : "1ad3a2c3-92da-448f-8250-2c90eb424224", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.queue.core.windows.net/41c82a23q41c82a23bcf68034621f954638480", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "75f99b0c-b0c4-425b-b3ca-9c206ca03484" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "1382cd1a-b003-002c-0309-411a8e000000", + "x-ms-client-request-id" : "75f99b0c-b0c4-425b-b3ca-9c206ca03484", + "Date" : "Tue, 04 May 2021 17:18:38 GMT" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.queue.core.windows.net/41c82a23q41c82a23bcf68034621f954638481", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "e78ba546-7059-4f57-9664-0a705d263aa0" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "2b95111c-0003-0006-5b09-41c59e000000", + "x-ms-client-request-id" : "e78ba546-7059-4f57-9664-0a705d263aa0", + "Date" : "Tue, 04 May 2021 17:18:38 GMT" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.queue.core.windows.net/41c82a23q41c82a23bcf68034621f954638482", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "6146a840-6fb5-4aea-978b-e0c8438cf844" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "ea8df1cf-5003-009d-0d09-41049b000000", + "x-ms-client-request-id" : "6146a840-6fb5-4aea-978b-e0c8438cf844", + "Date" : "Tue, 04 May 2021 17:18:38 GMT" + }, + "Exception" : null + } ], + "variables" : [ "41c82a23q41c82a23bcf68034621f95463848" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsPerCallPolicy.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsPerCallPolicy.json new file mode 100644 index 0000000000000..4277cd7219ee2 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsPerCallPolicy.json @@ -0,0 +1,25 @@ +{ + "networkCallRecords" : [ { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net?restype=service&comp=properties", + "Headers" : { + "x-ms-version" : "2017-11-09", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "acd3cd3b-729c-4099-974e-065819836e3f" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2017-11-09", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "34fa79a0-1003-0078-6409-4155d9000000", + "Body" : "1.0falsetruetruetrue31.0truefalsetrue31.0truefalsetrue3", + "Date" : "Tue, 04 May 2021 17:18:36 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsCreateNull.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsCreateNull.json new file mode 100644 index 0000000000000..ba5f37f8f8555 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsCreateNull.json @@ -0,0 +1,4 @@ +{ + "networkCallRecords" : [ ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsCreateQueue.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsCreateQueue.json new file mode 100644 index 0000000000000..1c174f097ecbf --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsCreateQueue.json @@ -0,0 +1,45 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/872e612d872e612d07c130290c1ec3fb30654ce583", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "a5b7073e-7178-461e-a2b9-b091d7f3cda2" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "6c1f56df-d003-0077-1709-4123b5000000", + "x-ms-client-request-id" : "a5b7073e-7178-461e-a2b9-b091d7f3cda2", + "Date" : "Tue, 04 May 2021 17:18:35 GMT" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/872e612d872e612d07c130290c1ec3fb30654ce583/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "37ccb28a-3446-47e1-b510-c24b83b8b923", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "2b9510e8-0003-0006-2e09-41c59e000000", + "Body" : "44e508ab-e450-4fad-a406-e08a31356bf9Tue, 04 May 2021 17:18:37 GMTTue, 11 May 2021 17:18:37 GMTAgAAAAMAAAAAAAAA+hcghQlB1wE=Tue, 04 May 2021 17:18:37 GMT", + "x-ms-client-request-id" : "37ccb28a-3446-47e1-b510-c24b83b8b923", + "Date" : "Tue, 04 May 2021 17:18:36 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "872e612d872e612d07c130290c1ec3fb30654ce583" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsCreateQueueMaxOverload[0].json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsCreateQueueMaxOverload[0].json new file mode 100644 index 0000000000000..aa244b2cd7f1c --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsCreateQueueMaxOverload[0].json @@ -0,0 +1,45 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/994b1cb2994b1cb244879040304b05c7c5134bf89e", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "7b166c8f-3e95-4c77-9306-23a5df1034de" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "6980d1a9-1003-0035-7d09-419a35000000", + "x-ms-client-request-id" : "7b166c8f-3e95-4c77-9306-23a5df1034de", + "Date" : "Tue, 04 May 2021 17:18:36 GMT" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/994b1cb2994b1cb244879040304b05c7c5134bf89e/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "eddd5b64-6387-4693-9e71-741a9dd6b373", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "6c1f56f2-d003-0077-2709-4123b5000000", + "Body" : "049e9b01-f5fc-4890-a411-9e793f5abe26Tue, 04 May 2021 17:18:37 GMTTue, 11 May 2021 17:18:37 GMTAgAAAAMAAAAAAAAAUzYkhQlB1wE=Tue, 04 May 2021 17:18:37 GMT", + "x-ms-client-request-id" : "eddd5b64-6387-4693-9e71-741a9dd6b373", + "Date" : "Tue, 04 May 2021 17:18:36 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "994b1cb2994b1cb244879040304b05c7c5134bf89e" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsCreateQueueMaxOverload[1].json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsCreateQueueMaxOverload[1].json new file mode 100644 index 0000000000000..09efc6036aea2 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsCreateQueueMaxOverload[1].json @@ -0,0 +1,45 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/80502df380502df3b743340219b11dd0dbb740efac", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "e3f48f1b-0773-4a62-8d1a-e623ee896e5a" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "895e7a2c-6003-00a9-7609-413753000000", + "x-ms-client-request-id" : "e3f48f1b-0773-4a62-8d1a-e623ee896e5a", + "Date" : "Tue, 04 May 2021 17:18:36 GMT" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/80502df380502df3b743340219b11dd0dbb740efac/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "46971e35-ddfd-4cb7-b199-2b642bdf4531", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "433a2fb6-e003-00a7-4009-411ee3000000", + "Body" : "13883a5d-6b7d-476e-ab02-a1741f672b97Tue, 04 May 2021 17:18:38 GMTTue, 11 May 2021 17:18:38 GMTAgAAAAMAAAAAAAAAmcB0hQlB1wE=Tue, 04 May 2021 17:18:38 GMT", + "x-ms-client-request-id" : "46971e35-ddfd-4cb7-b199-2b642bdf4531", + "Date" : "Tue, 04 May 2021 17:18:37 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "80502df380502df3b743340219b11dd0dbb740efac" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsCreateQueueMaxOverload[2].json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsCreateQueueMaxOverload[2].json new file mode 100644 index 0000000000000..c7aa1f5f01d49 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsCreateQueueMaxOverload[2].json @@ -0,0 +1,45 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/ab7d7e30ab7d7e30292936955580657171dd4f8eac", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "5a328e01-f90a-4217-88d4-20343917bb62" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "c54fcbfa-e003-000e-0609-41df91000000", + "x-ms-client-request-id" : "5a328e01-f90a-4217-88d4-20343917bb62", + "Date" : "Tue, 04 May 2021 17:18:37 GMT" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/ab7d7e30ab7d7e30292936955580657171dd4f8eac/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "0097976d-a666-4435-b485-ee2eb743ca8d", + "Content-Type" : "application/xml" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "433a2fef-e003-00a7-7109-411ee3000000", + "Body" : "a92aafdb-2882-4f44-83b3-52a65943e416Tue, 04 May 2021 17:18:38 GMTTue, 11 May 2021 17:18:38 GMTAgAAAAMAAAAAAAAAmVfshQlB1wE=Tue, 04 May 2021 17:18:38 GMT", + "x-ms-client-request-id" : "0097976d-a666-4435-b485-ee2eb743ca8d", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "ab7d7e30ab7d7e30292936955580657171dd4f8eac" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsCreateQueueWithInvalidMetadata.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsCreateQueueWithInvalidMetadata.json new file mode 100644 index 0000000000000..91ab3cd26a33e --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsCreateQueueWithInvalidMetadata.json @@ -0,0 +1,26 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/ac35befbac35befb7f0742859e94b9c865e44238aa", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "7599ad4a-4a80-4953-8500-61ed03be6f2a" + }, + "Response" : { + "content-length" : "260", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "InvalidMetadata", + "retry-after" : "0", + "StatusCode" : "400", + "x-ms-request-id" : "5366245e-4003-00dc-3009-415c7f000000", + "Body" : "InvalidMetadataThe metadata specified is invalid. It has characters that are not permitted.\nRequestId:5366245e-4003-00dc-3009-415c7f000000\nTime:2021-05-04T17:18:36.7543864Z", + "x-ms-client-request-id" : "7599ad4a-4a80-4953-8500-61ed03be6f2a", + "Date" : "Tue, 04 May 2021 17:18:36 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "ac35befbac35befb7f0742859e94b9c865e44238aa" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsCreateQueueWithInvalidName[0].json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsCreateQueueWithInvalidName[0].json new file mode 100644 index 0000000000000..1344164503f38 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsCreateQueueWithInvalidName[0].json @@ -0,0 +1,26 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/a_b", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "73c76bc4-9ef6-4b65-b3dc-643bc13a4421" + }, + "Response" : { + "content-length" : "243", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "InvalidResourceName", + "retry-after" : "0", + "StatusCode" : "400", + "x-ms-request-id" : "66d7cef2-0003-0074-3409-41c2d1000000", + "Body" : "InvalidResourceNameThe specifed resource name contains invalid characters.\nRequestId:66d7cef2-0003-0074-3409-41c2d1000000\nTime:2021-05-04T17:18:36.7649897Z", + "x-ms-client-request-id" : "73c76bc4-9ef6-4b65-b3dc-643bc13a4421", + "Date" : "Tue, 04 May 2021 17:18:36 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsCreateQueueWithInvalidName[1].json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsCreateQueueWithInvalidName[1].json new file mode 100644 index 0000000000000..ccd0845ad5c9e --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsCreateQueueWithInvalidName[1].json @@ -0,0 +1,26 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/-ab", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "de3d1d0d-1451-4932-b583-1b209a30b14c" + }, + "Response" : { + "content-length" : "243", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "InvalidResourceName", + "retry-after" : "0", + "StatusCode" : "400", + "x-ms-request-id" : "26562d34-0003-004b-5b09-410a72000000", + "Body" : "InvalidResourceNameThe specifed resource name contains invalid characters.\nRequestId:26562d34-0003-004b-5b09-410a72000000\nTime:2021-05-04T17:18:37.2995524Z", + "x-ms-client-request-id" : "de3d1d0d-1451-4932-b583-1b209a30b14c", + "Date" : "Tue, 04 May 2021 17:18:36 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsCreateQueueWithInvalidName[2].json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsCreateQueueWithInvalidName[2].json new file mode 100644 index 0000000000000..59a876f0137a0 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsCreateQueueWithInvalidName[2].json @@ -0,0 +1,26 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/a--b", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "57fc45dd-6ca3-40bb-97ed-6d54eaf0e5b8" + }, + "Response" : { + "content-length" : "243", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "InvalidResourceName", + "retry-after" : "0", + "StatusCode" : "400", + "x-ms-request-id" : "ea4bb9cd-6003-0086-4f09-413a98000000", + "Body" : "InvalidResourceNameThe specifed resource name contains invalid characters.\nRequestId:ea4bb9cd-6003-0086-4f09-413a98000000\nTime:2021-05-04T17:18:37.3921990Z", + "x-ms-client-request-id" : "57fc45dd-6ca3-40bb-97ed-6d54eaf0e5b8", + "Date" : "Tue, 04 May 2021 17:18:37 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsCreateQueueWithInvalidName[3].json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsCreateQueueWithInvalidName[3].json new file mode 100644 index 0000000000000..cd792b33f7943 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsCreateQueueWithInvalidName[3].json @@ -0,0 +1,26 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/Abc", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "67320498-6b13-4a2d-8866-678836ce1b3b" + }, + "Response" : { + "content-length" : "243", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "InvalidResourceName", + "retry-after" : "0", + "StatusCode" : "400", + "x-ms-request-id" : "34fa7a21-1003-0078-6309-4155d9000000", + "Body" : "InvalidResourceNameThe specifed resource name contains invalid characters.\nRequestId:34fa7a21-1003-0078-6309-4155d9000000\nTime:2021-05-04T17:18:37.5778845Z", + "x-ms-client-request-id" : "67320498-6b13-4a2d-8866-678836ce1b3b", + "Date" : "Tue, 04 May 2021 17:18:37 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsCreateQueueWithInvalidName[4].json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsCreateQueueWithInvalidName[4].json new file mode 100644 index 0000000000000..aa0b87cba0a2a --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsCreateQueueWithInvalidName[4].json @@ -0,0 +1,26 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/ab", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "63a8803f-62fb-4e56-946a-166e51cf8e9f" + }, + "Response" : { + "content-length" : "256", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "OutOfRangeInput", + "retry-after" : "0", + "StatusCode" : "400", + "x-ms-request-id" : "4a84b4b0-a003-007d-1509-418702000000", + "Body" : "OutOfRangeInputThe specified resource name length is not within the permissible limits.\nRequestId:4a84b4b0-a003-007d-1509-418702000000\nTime:2021-05-04T17:18:37.7241132Z", + "x-ms-client-request-id" : "63a8803f-62fb-4e56-946a-166e51cf8e9f", + "Date" : "Tue, 04 May 2021 17:18:37 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsCreateQueueWithInvalidName[5].json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsCreateQueueWithInvalidName[5].json new file mode 100644 index 0000000000000..a2eba80e2c110 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsCreateQueueWithInvalidName[5].json @@ -0,0 +1,26 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/verylongverylongverylongverylongverylongverylongverylongverylong", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "66232970-c198-4491-bd01-07301a9500e7" + }, + "Response" : { + "content-length" : "256", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "OutOfRangeInput", + "retry-after" : "0", + "StatusCode" : "400", + "x-ms-request-id" : "d1814e2b-2003-00e5-5209-41a763000000", + "Body" : "OutOfRangeInputThe specified resource name length is not within the permissible limits.\nRequestId:d1814e2b-2003-00e5-5209-41a763000000\nTime:2021-05-04T17:18:37.8458748Z", + "x-ms-client-request-id" : "66232970-c198-4491-bd01-07301a9500e7", + "Date" : "Tue, 04 May 2021 17:18:37 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsDeleteQueue.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsDeleteQueue.json new file mode 100644 index 0000000000000..2ce62077be81a --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsDeleteQueue.json @@ -0,0 +1,65 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/438e569e438e569e58013749ff02154273ff406fbb", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "242440a6-2fd7-4950-a50f-afa65650eb7b" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "7b738602-2003-002e-1b09-41a436000000", + "x-ms-client-request-id" : "242440a6-2fd7-4950-a50f-afa65650eb7b", + "Date" : "Tue, 04 May 2021 17:18:36 GMT" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.queue.core.windows.net/438e569e438e569e58013749ff02154273ff406fbb", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "49ffa53a-8cc1-4250-9711-66fe7996b825" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "1382cccf-b003-002c-4509-411a8e000000", + "x-ms-client-request-id" : "49ffa53a-8cc1-4250-9711-66fe7996b825", + "Date" : "Tue, 04 May 2021 17:18:36 GMT" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.queue.core.windows.net/438e569e438e569e58013749ff02154273ff406fbb/messages", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "3d4f86d1-c517-426a-add9-19ff3987ded7", + "Content-Type" : "application/xml" + }, + "Response" : { + "content-length" : "217", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "QueueNotFound", + "retry-after" : "0", + "StatusCode" : "404", + "x-ms-request-id" : "b050af71-6003-00cb-6109-41f574000000", + "Body" : "QueueNotFoundThe specified queue does not exist.\nRequestId:b050af71-6003-00cb-6109-41f574000000\nTime:2021-05-04T17:18:37.6953555Z", + "x-ms-client-request-id" : "3d4f86d1-c517-426a-add9-19ff3987ded7", + "Date" : "Tue, 04 May 2021 17:18:36 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "438e569e438e569e58013749ff02154273ff406fbb" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsDeleteQueueError.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsDeleteQueueError.json new file mode 100644 index 0000000000000..125d25a7fbdb6 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsDeleteQueueError.json @@ -0,0 +1,26 @@ +{ + "networkCallRecords" : [ { + "Method" : "DELETE", + "Uri" : "https://REDACTED.queue.core.windows.net/2cb37036342832", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "904fb54e-6cb8-4be1-b3b2-3733b4e26af8" + }, + "Response" : { + "content-length" : "217", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "QueueNotFound", + "retry-after" : "0", + "StatusCode" : "404", + "x-ms-request-id" : "ea4bb9a0-6003-0086-2809-413a98000000", + "Body" : "QueueNotFoundThe specified queue does not exist.\nRequestId:ea4bb9a0-6003-0086-2809-413a98000000\nTime:2021-05-04T17:18:36.7714002Z", + "x-ms-client-request-id" : "904fb54e-6cb8-4be1-b3b2-3733b4e26af8", + "Date" : "Tue, 04 May 2021 17:18:36 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "2cb37036342832" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsGetAndSetProperties.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsGetAndSetProperties.json new file mode 100644 index 0000000000000..f5d2f3b44a1be --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsGetAndSetProperties.json @@ -0,0 +1,90 @@ +{ + "networkCallRecords" : [ { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net?restype=service&comp=properties", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "71d96b30-b56e-471f-bc7e-c53867674874" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "d9b89970-f003-0012-4c09-418df1000000", + "Body" : "1.0falsetruetruetrue31.0truefalsetrue31.0truefalsetrue3", + "x-ms-client-request-id" : "71d96b30-b56e-471f-bc7e-c53867674874", + "Date" : "Tue, 04 May 2021 17:18:36 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net?restype=service&comp=properties", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "b5dfeeb3-86f5-4e63-abd7-8ade8dbf1bbc" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "721d9061-4003-005a-5b09-4190c6000000", + "Body" : "1.0falsetruetruetrue31.0truefalsetrue31.0truefalsetrue3", + "x-ms-client-request-id" : "b5dfeeb3-86f5-4e63-abd7-8ade8dbf1bbc", + "Date" : "Tue, 04 May 2021 17:18:36 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net?restype=service&comp=properties", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "04623480-9e3e-49f3-872e-28610c004c56", + "Content-Type" : "application/xml" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "ea4bb9da-6003-0086-5b09-413a98000000", + "x-ms-client-request-id" : "04623480-9e3e-49f3-872e-28610c004c56", + "Date" : "Tue, 04 May 2021 17:18:38 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net?restype=service&comp=properties", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "879ed74c-253d-4605-b285-de4ccf4070eb" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "c54fcc0a-e003-000e-1409-41df91000000", + "Body" : "1.0falsetruetruetrue31.0truefalsetrue31.0truefalsetrue3", + "x-ms-client-request-id" : "879ed74c-253d-4605-b285-de4ccf4070eb", + "Date" : "Tue, 04 May 2021 17:18:37 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsGetQueueClient.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsGetQueueClient.json new file mode 100644 index 0000000000000..b5e899d6304e5 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsGetQueueClient.json @@ -0,0 +1,4 @@ +{ + "networkCallRecords" : [ ], + "variables" : [ "e11253e2e11253e243a34421b204ee50e0394dfa82" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsListEmptyQueues.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsListEmptyQueues.json new file mode 100644 index 0000000000000..0ca38bae10a95 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsListEmptyQueues.json @@ -0,0 +1,26 @@ +{ + "networkCallRecords" : [ { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net?comp=list&prefix=cf7d4710&include=", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "10d8b2ee-3195-4689-957a-5891536a1a46" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "7c5d3984-2003-0011-4b09-416c95000000", + "Body" : "cf7d4710", + "x-ms-client-request-id" : "10d8b2ee-3195-4689-957a-5891536a1a46", + "Date" : "Tue, 04 May 2021 17:18:36 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsListQueues[0].json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsListQueues[0].json new file mode 100644 index 0000000000000..fafbe97b5435f --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsListQueues[0].json @@ -0,0 +1,83 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/af8bbd69af8bbd691ff5922076ac796d4b654bd3a90", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "3e095941-1c5e-478d-8f34-df0f5f0072ae" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "beffcbf5-b003-00c8-5e09-411410000000", + "x-ms-client-request-id" : "3e095941-1c5e-478d-8f34-df0f5f0072ae", + "Date" : "Tue, 04 May 2021 17:18:36 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/af8bbd69af8bbd691ff5922076ac796d4b654bd3a91", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "37272335-f1e7-45a4-8d3f-1e051a53f715" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "73eb55a2-2003-003e-6009-41615e000000", + "x-ms-client-request-id" : "37272335-f1e7-45a4-8d3f-1e051a53f715", + "Date" : "Tue, 04 May 2021 17:18:36 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/af8bbd69af8bbd691ff5922076ac796d4b654bd3a92", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "05ecc1d5-0e9d-43b6-8e64-32a1b94f18cf" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "80fe10ec-6003-002f-3c09-41fbea000000", + "x-ms-client-request-id" : "05ecc1d5-0e9d-43b6-8e64-32a1b94f18cf", + "Date" : "Tue, 04 May 2021 17:18:38 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net?comp=list&prefix=af8bbd69&include=", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "1e401376-efaa-4ed4-83fb-dc01237594db" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "d1814e46-2003-00e5-6c09-41a763000000", + "Body" : "af8bbd69af8bbd69af8bbd691ff5922076ac796d4b654bd3a90af8bbd69af8bbd691ff5922076ac796d4b654bd3a91af8bbd69af8bbd691ff5922076ac796d4b654bd3a92", + "x-ms-client-request-id" : "1e401376-efaa-4ed4-83fb-dc01237594db", + "Date" : "Tue, 04 May 2021 17:18:37 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "af8bbd69af8bbd691ff5922076ac796d4b654bd3a9" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsListQueues[1].json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsListQueues[1].json new file mode 100644 index 0000000000000..95b397858613a --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsListQueues[1].json @@ -0,0 +1,105 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/b6908c28b6908c2862860710c44b14339ce443d0b30", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "c226ec8a-d157-4ce0-be11-eb39a65a8898" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "10a7c4b3-c003-0044-6109-417c1e000000", + "x-ms-client-request-id" : "c226ec8a-d157-4ce0-be11-eb39a65a8898", + "Date" : "Tue, 04 May 2021 17:18:36 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/b6908c28b6908c2862860710c44b14339ce443d0b31", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "daabb0fa-ada3-4ccb-8b48-ab4ccf4472ce" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "ea8df190-5003-009d-5709-41049b000000", + "x-ms-client-request-id" : "daabb0fa-ada3-4ccb-8b48-ab4ccf4472ce", + "Date" : "Tue, 04 May 2021 17:18:37 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/b6908c28b6908c2862860710c44b14339ce443d0b32", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "46eab651-46ce-484e-8c32-632c845a11b9" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "e8711525-4003-0081-5309-4156fb000000", + "x-ms-client-request-id" : "46eab651-46ce-484e-8c32-632c845a11b9", + "Date" : "Tue, 04 May 2021 17:18:37 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net?comp=list&prefix=b6908c28&maxresults=2&include=", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "250d7d13-072c-4bfa-926b-815fbef45fd1" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "42b033cc-2003-0073-5309-41aeb2000000", + "Body" : "b6908c282b6908c28b6908c2862860710c44b14339ce443d0b30b6908c28b6908c2862860710c44b14339ce443d0b31/kasobolcanarytest2/b6908c28b6908c2862860710c44b14339ce443d0b32", + "x-ms-client-request-id" : "250d7d13-072c-4bfa-926b-815fbef45fd1", + "Date" : "Tue, 04 May 2021 17:18:37 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net?comp=list&prefix=b6908c28&marker=/kasobolcanarytest2/b6908c28b6908c2862860710c44b14339ce443d0b32&maxresults=2&include=", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "71b60293-d734-4225-9c65-fa500f9fbd91" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "ec6c6398-7003-00e8-1e09-416fb7000000", + "Body" : "b6908c28/kasobolcanarytest2/b6908c28b6908c2862860710c44b14339ce443d0b322b6908c28b6908c2862860710c44b14339ce443d0b32", + "x-ms-client-request-id" : "71b60293-d734-4225-9c65-fa500f9fbd91", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "b6908c28b6908c2862860710c44b14339ce443d0b3" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsListQueues[2].json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsListQueues[2].json new file mode 100644 index 0000000000000..8eac49eb3be06 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsListQueues[2].json @@ -0,0 +1,83 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/9dbddfeb9dbddfeb32c64971112564b4d2ed429d980", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "6443e1e3-e695-480c-8983-077799124dd0" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "7c5d39a0-2003-0011-6509-416c95000000", + "x-ms-client-request-id" : "6443e1e3-e695-480c-8983-077799124dd0", + "Date" : "Tue, 04 May 2021 17:18:36 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/9dbddfeb9dbddfeb32c64971112564b4d2ed429d981", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "54fdca95-7ffa-4092-a5b8-83250a1487f5" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "73eb55b4-2003-003e-7009-41615e000000", + "x-ms-client-request-id" : "54fdca95-7ffa-4092-a5b8-83250a1487f5", + "Date" : "Tue, 04 May 2021 17:18:36 GMT" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.queue.core.windows.net/9dbddfeb9dbddfeb32c64971112564b4d2ed429d982", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "92d0476c-b73d-47c1-8aad-4860789bf9c0" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "721d9094-4003-005a-0b09-4190c6000000", + "x-ms-client-request-id" : "92d0476c-b73d-47c1-8aad-4860789bf9c0", + "Date" : "Tue, 04 May 2021 17:18:37 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.queue.core.windows.net?comp=list&prefix=9dbddfeb&include=metadata", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-queue/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "0901d07f-6a4c-48f9-8701-b1eed1ba6d08" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Cache-Control" : "no-cache", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "433a2fce-e003-00a7-5409-411ee3000000", + "Body" : "9dbddfeb9dbddfeb9dbddfeb32c64971112564b4d2ed429d980value09dbddfeb9dbddfeb32c64971112564b4d2ed429d981value19dbddfeb9dbddfeb32c64971112564b4d2ed429d982value2", + "x-ms-client-request-id" : "0901d07f-6a4c-48f9-8701-b1eed1ba6d08", + "Date" : "Tue, 04 May 2021 17:18:38 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "9dbddfeb9dbddfeb32c64971112564b4d2ed429d98" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/swagger/pom.xml b/sdk/storage/azure-storage-queue/swagger/pom.xml index 12c08a6ad2fb3..7cb44d9992eaf 100644 --- a/sdk/storage/azure-storage-queue/swagger/pom.xml +++ b/sdk/storage/azure-storage-queue/swagger/pom.xml @@ -3,15 +3,23 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - - com.azure - azure-code-customization-parent - 1.0.0-beta.1 - ../../../parents/azure-code-customization-parent - - com.azure azure-storage-queue-customization 1.0.0-beta.1 4.0.0 + + + UTF-8 + UTF-8 + 1.8 + 1.8 + + + + + com.azure.tools + azure-autorest-customization + 1.0.0-beta.6 + +