diff --git a/sdk/translation/Azure.AI.Translation.Document/tests/DocumentTranslationClientLiveTests.cs b/sdk/translation/Azure.AI.Translation.Document/tests/DocumentTranslationClientLiveTests.cs index 5c9f757ec606..79420cf5ede3 100644 --- a/sdk/translation/Azure.AI.Translation.Document/tests/DocumentTranslationClientLiveTests.cs +++ b/sdk/translation/Azure.AI.Translation.Document/tests/DocumentTranslationClientLiveTests.cs @@ -21,7 +21,6 @@ public DocumentTranslationClientLiveTests(bool isAsync) } [RecordedTest] - [Ignore("https://github.com/Azure/azure-sdk-for-net/issues/21305")] public void ClientCannotAuthenticateWithFakeApiKey() { DocumentTranslationClient client = GetClient(credential: new AzureKeyCredential("fakeKey")); diff --git a/sdk/translation/Azure.AI.Translation.Document/tests/SessionRecords/DocumentTranslationClientLiveTests/ClientCannotAuthenticateWithFakeApiKey.json b/sdk/translation/Azure.AI.Translation.Document/tests/SessionRecords/DocumentTranslationClientLiveTests/ClientCannotAuthenticateWithFakeApiKey.json index 2ab58591cf68..4cf66b320493 100644 --- a/sdk/translation/Azure.AI.Translation.Document/tests/SessionRecords/DocumentTranslationClientLiveTests/ClientCannotAuthenticateWithFakeApiKey.json +++ b/sdk/translation/Azure.AI.Translation.Document/tests/SessionRecords/DocumentTranslationClientLiveTests/ClientCannotAuthenticateWithFakeApiKey.json @@ -1,32 +1,34 @@ { "Entries": [ { - "RequestUri": "https://python-doctranslation.cognitiveservices.azure.com/translator/text/batch/v1.0-preview.1/documents/formats", + "RequestUri": "https://document-translator.cognitiveservices.azure.com/translator/text/batch/v1.0/documents/formats", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-8fe62deffb8efe458a77eca2a67cb993-17165b708921e846-00", - "User-Agent": "azsdk-net-AI.DocumentTranslation/1.0.0-alpha.20210315.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", + "traceparent": "00-80fddd03670f43439a66b71a47900f7d-fd240a5ecb1ed046-00", + "User-Agent": "azsdk-net-AI.Translation.Document/1.0.0-alpha.20210713.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-ms-client-request-id": "e06680268e6e78bc5f6645588508e0a5", "x-ms-return-client-request-id": "true" }, "RequestBody": null, "StatusCode": 401, "ResponseHeaders": { - "apim-request-id": "17f16766-3c9b-41cb-aa23-1643c3f47798", - "Content-Length": "225", + "apim-request-id": "3670f326-c073-47e9-b412-c14a05e54ddb", + "Content-Length": "224", "Content-Type": "application/json", - "Date": "Tue, 16 Mar 2021 00:08:05 GMT", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "WWW-Authenticate": "AzureApiManagementKey realm=\u0022https://python-doctranslation.cognitiveservices.azure.com/translator/text/batch/v1.0-preview.1\u0022,name=\u0022Ocp-Apim-Subscription-Key\u0022,type=\u0022header\u0022", - "x-content-type-options": "nosniff" + "Date": "Tue, 13 Jul 2021 19:23:06 GMT" }, - "ResponseBody": "{\u0022error\u0022:{\u0022code\u0022:\u0022401\u0022,\u0022message\u0022: \u0022Access denied due to invalid subscription key or wrong API endpoint. Make sure to provide a valid key for an active subscription and use a correct regional API endpoint for your resource.\u0022}}" + "ResponseBody": { + "error": { + "code": "401", + "message": "Access denied due to invalid subscription key or wrong API endpoint. Make sure to provide a valid key for an active subscription and use a correct regional API endpoint for your resource." + } + } } ], "Variables": { - "DOCUMENT_TRANSLATION_ENDPOINT": "https://python-doctranslation.cognitiveservices.azure.com", + "DOCUMENT_TRANSLATION_ENDPOINT": "https://document-translator.cognitiveservices.azure.com/", "RandomSeed": "30113775" } } \ No newline at end of file diff --git a/sdk/translation/Azure.AI.Translation.Document/tests/SessionRecords/DocumentTranslationClientLiveTests/ClientCannotAuthenticateWithFakeApiKeyAsync.json b/sdk/translation/Azure.AI.Translation.Document/tests/SessionRecords/DocumentTranslationClientLiveTests/ClientCannotAuthenticateWithFakeApiKeyAsync.json index e8086b1ee926..b695fa4495b9 100644 --- a/sdk/translation/Azure.AI.Translation.Document/tests/SessionRecords/DocumentTranslationClientLiveTests/ClientCannotAuthenticateWithFakeApiKeyAsync.json +++ b/sdk/translation/Azure.AI.Translation.Document/tests/SessionRecords/DocumentTranslationClientLiveTests/ClientCannotAuthenticateWithFakeApiKeyAsync.json @@ -1,32 +1,34 @@ { "Entries": [ { - "RequestUri": "https://python-doctranslation.cognitiveservices.azure.com/translator/text/batch/v1.0-preview.1/documents/formats", + "RequestUri": "https://document-translator.cognitiveservices.azure.com/translator/text/batch/v1.0/documents/formats", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-7da6335eabe350458c519281dd067918-15d76a6626037d48-00", - "User-Agent": "azsdk-net-AI.DocumentTranslation/1.0.0-alpha.20210315.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", + "traceparent": "00-3b593f103712b04eadd9e5f57b9c2c96-c82d6244a15cb748-00", + "User-Agent": "azsdk-net-AI.Translation.Document/1.0.0-alpha.20210713.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-ms-client-request-id": "77e217cc5db732d8514f21f3990f3e80", "x-ms-return-client-request-id": "true" }, "RequestBody": null, "StatusCode": 401, "ResponseHeaders": { - "apim-request-id": "c19ce5a0-f76d-44bc-8930-cde0cf300d18", - "Content-Length": "225", + "apim-request-id": "b4640867-b66c-4858-9bf2-bf6c0e7ff993", + "Content-Length": "224", "Content-Type": "application/json", - "Date": "Tue, 16 Mar 2021 00:08:06 GMT", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "WWW-Authenticate": "AzureApiManagementKey realm=\u0022https://python-doctranslation.cognitiveservices.azure.com/translator/text/batch/v1.0-preview.1\u0022,name=\u0022Ocp-Apim-Subscription-Key\u0022,type=\u0022header\u0022", - "x-content-type-options": "nosniff" + "Date": "Tue, 13 Jul 2021 19:23:06 GMT" }, - "ResponseBody": "{\u0022error\u0022:{\u0022code\u0022:\u0022401\u0022,\u0022message\u0022: \u0022Access denied due to invalid subscription key or wrong API endpoint. Make sure to provide a valid key for an active subscription and use a correct regional API endpoint for your resource.\u0022}}" + "ResponseBody": { + "error": { + "code": "401", + "message": "Access denied due to invalid subscription key or wrong API endpoint. Make sure to provide a valid key for an active subscription and use a correct regional API endpoint for your resource." + } + } } ], "Variables": { - "DOCUMENT_TRANSLATION_ENDPOINT": "https://python-doctranslation.cognitiveservices.azure.com", + "DOCUMENT_TRANSLATION_ENDPOINT": "https://document-translator.cognitiveservices.azure.com/", "RandomSeed": "2081617657" } } \ No newline at end of file