Skip to content

Commit

Permalink
update error code in tests (Azure#21362)
Browse files Browse the repository at this point in the history
  • Loading branch information
kristapratico authored Oct 22, 2021
1 parent a2a8d47 commit 03186ba
Show file tree
Hide file tree
Showing 4 changed files with 344 additions and 108 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,29 +11,29 @@ interactions:
Content-Length:
- '0'
User-Agent:
- azsdk-python-storage-blob/12.9.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0)
- azsdk-python-storage-blob/12.9.0 Python/3.9.0 (Windows-10-10.0.19041-SP0)
x-ms-date:
- Wed, 02 Jun 2021 07:02:42 GMT
- Thu, 21 Oct 2021 16:24:19 GMT
x-ms-version:
- '2020-08-04'
- '2020-10-02'
method: PUT
uri: https://redacted.blob.core.windows.net/srcdf416b05-6dc9-4082-abe5-eb606774efdd?restype=container
uri: https://redacted.blob.core.windows.net/src36942309-8863-46f6-936b-5d575faaa14f?restype=container
response:
body:
string: ''
headers:
content-length:
- '0'
date:
- Wed, 02 Jun 2021 07:02:42 GMT
- Thu, 21 Oct 2021 16:24:17 GMT
etag:
- '"0x8D925946AC6F8E9"'
- '"0x8D994AF3AFF7E11"'
last-modified:
- Wed, 02 Jun 2021 07:02:42 GMT
- Thu, 21 Oct 2021 16:24:17 GMT
server:
- Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
x-ms-version:
- '2020-08-04'
- '2020-10-02'
status:
code: 201
message: Created
Expand All @@ -53,15 +53,15 @@ interactions:
If-None-Match:
- '*'
User-Agent:
- azsdk-python-storage-blob/12.9.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0)
- azsdk-python-storage-blob/12.9.0 Python/3.9.0 (Windows-10-10.0.19041-SP0)
x-ms-blob-type:
- BlockBlob
x-ms-date:
- Wed, 02 Jun 2021 07:02:42 GMT
- Thu, 21 Oct 2021 16:24:19 GMT
x-ms-version:
- '2020-08-04'
- '2020-10-02'
method: PUT
uri: https://redacted.blob.core.windows.net/srcdf416b05-6dc9-4082-abe5-eb606774efdd/5989239b-a0bc-4f05-a12a-b461af735d1b.txt
uri: https://redacted.blob.core.windows.net/src36942309-8863-46f6-936b-5d575faaa14f/c5313540-4db3-4459-b092-fa031504ea64.txt
response:
body:
string: ''
Expand All @@ -71,19 +71,19 @@ interactions:
content-md5:
- 1B2M2Y8AsgTpgAmY7PhCfg==
date:
- Wed, 02 Jun 2021 07:02:42 GMT
- Thu, 21 Oct 2021 16:24:17 GMT
etag:
- '"0x8D925946ACF3C6B"'
- '"0x8D994AF3B07A945"'
last-modified:
- Wed, 02 Jun 2021 07:02:42 GMT
- Thu, 21 Oct 2021 16:24:18 GMT
server:
- Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
x-ms-content-crc64:
- AAAAAAAAAAA=
x-ms-request-server-encrypted:
- 'true'
x-ms-version:
- '2020-08-04'
- '2020-10-02'
status:
code: 201
message: Created
Expand All @@ -99,35 +99,35 @@ interactions:
Content-Length:
- '0'
User-Agent:
- azsdk-python-storage-blob/12.9.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0)
- azsdk-python-storage-blob/12.9.0 Python/3.9.0 (Windows-10-10.0.19041-SP0)
x-ms-date:
- Wed, 02 Jun 2021 07:02:42 GMT
- Thu, 21 Oct 2021 16:24:19 GMT
x-ms-version:
- '2020-08-04'
- '2020-10-02'
method: PUT
uri: https://redacted.blob.core.windows.net/targetdb7fbf42-e0b4-4631-bb13-f934337437a8?restype=container
uri: https://redacted.blob.core.windows.net/target817d9058-d097-4068-8af7-4b85ddee1af2?restype=container
response:
body:
string: ''
headers:
content-length:
- '0'
date:
- Wed, 02 Jun 2021 07:02:42 GMT
- Thu, 21 Oct 2021 16:24:17 GMT
etag:
- '"0x8D925946AF0B2D7"'
- '"0x8D994AF3B245CA4"'
last-modified:
- Wed, 02 Jun 2021 07:02:42 GMT
- Thu, 21 Oct 2021 16:24:18 GMT
server:
- Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
x-ms-version:
- '2020-08-04'
- '2020-10-02'
status:
code: 201
message: Created
- request:
body: '{"inputs": [{"source": {"sourceUrl": "https://redacted.blob.core.windows.net/srcdf416b05-6dc9-4082-abe5-eb606774efdd?se=end&sp=rl&sv=2020-08-04&sr=c&sig=fake_token_value",
"filter": {}}, "targets": [{"targetUrl": "https://redacted.blob.core.windows.net/targetdb7fbf42-e0b4-4631-bb13-f934337437a8?se=end&sp=rw&sv=2020-08-04&sr=c&sig=fake_token_value",
body: '{"inputs": [{"source": {"sourceUrl": "https://redacted.blob.core.windows.net/src36942309-8863-46f6-936b-5d575faaa14f?se=end&sp=rl&sv=2020-10-02&sr=c&sig=fake_token_value",
"filter": {}}, "targets": [{"targetUrl": "https://redacted.blob.core.windows.net/target817d9058-d097-4068-8af7-4b85ddee1af2?se=end&sp=wl&sv=2020-10-02&sr=c&sig=fake_token_value",
"language": "es"}]}]}'
headers:
Accept:
Expand All @@ -141,32 +141,32 @@ interactions:
Content-Type:
- application/json
User-Agent:
- azsdk-python-ai-translation-document/1.0.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0)
- azsdk-python-ai-translation-document/1.0.0b5 Python/3.9.0 (Windows-10-10.0.19041-SP0)
method: POST
uri: https://redacted.cognitiveservices.azure.com/translator/text/batch/v1.0/batches
response:
body:
string: ''
headers:
apim-request-id:
- a7436c72-e39b-4ff8-b6a3-32f096beef49
- 4d177129-d57a-4bb2-ad81-aad2d9756531
content-length:
- '0'
date:
- Wed, 02 Jun 2021 07:02:42 GMT
- Thu, 21 Oct 2021 16:24:18 GMT
operation-location:
- https://redacted.cognitiveservices.azure.com/translator/text/batch/v1.0/batches/5948f436-c1b1-414c-9b2c-6d3af57f3021
- https://redacted.cognitiveservices.azure.com/translator/text/batch/v1.0/batches/1722e8e6-3bc4-48dd-8fa5-cf1aaf978bdb
set-cookie:
- ARRAffinity=0ff46fa6d58b00f2d44b7073721903c0eace480139d8ecfc38f61130af5e1587;Path=/;HttpOnly;Secure;Domain=mtbatch.nam.microsofttranslator.com
- ARRAffinitySameSite=0ff46fa6d58b00f2d44b7073721903c0eace480139d8ecfc38f61130af5e1587;Path=/;HttpOnly;SameSite=None;Secure;Domain=mtbatch.nam.microsofttranslator.com
- ARRAffinity=09a10d9e036c982a6acf1ed7f4e9558b44845127dddc55af67b87cd656dd4d77;Path=/;HttpOnly;Secure;Domain=mtbatch.nam.microsofttranslator.com
- ARRAffinitySameSite=09a10d9e036c982a6acf1ed7f4e9558b44845127dddc55af67b87cd656dd4d77;Path=/;HttpOnly;SameSite=None;Secure;Domain=mtbatch.nam.microsofttranslator.com
strict-transport-security:
- max-age=31536000; includeSubDomains; preload
x-content-type-options:
- nosniff
x-powered-by:
- ASP.NET
x-requestid:
- a7436c72-e39b-4ff8-b6a3-32f096beef49
- 4d177129-d57a-4bb2-ad81-aad2d9756531
status:
code: 202
message: Accepted
Expand All @@ -180,28 +180,75 @@ interactions:
Connection:
- keep-alive
User-Agent:
- azsdk-python-ai-translation-document/1.0.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0)
- azsdk-python-ai-translation-document/1.0.0b5 Python/3.9.0 (Windows-10-10.0.19041-SP0)
method: GET
uri: https://redacted.cognitiveservices.azure.com/translator/text/batch/v1.0/batches/5948f436-c1b1-414c-9b2c-6d3af57f3021
uri: https://redacted.cognitiveservices.azure.com/translator/text/batch/v1.0/batches/1722e8e6-3bc4-48dd-8fa5-cf1aaf978bdb
response:
body:
string: '{"id":"5948f436-c1b1-414c-9b2c-6d3af57f3021","createdDateTimeUtc":"2021-06-02T07:02:43.6134937Z","lastActionDateTimeUtc":"2021-06-02T07:02:46.2264979Z","status":"Failed","summary":{"total":1,"failed":1,"success":0,"inProgress":0,"notYetStarted":0,"cancelled":0,"totalCharacterCharged":0}}'
string: '{"id":"1722e8e6-3bc4-48dd-8fa5-cf1aaf978bdb","createdDateTimeUtc":"2021-10-21T16:24:18.9192862Z","lastActionDateTimeUtc":"2021-10-21T16:24:19.0946808Z","status":"NotStarted","summary":{"total":1,"failed":0,"success":0,"inProgress":0,"notYetStarted":1,"cancelled":0,"totalCharacterCharged":0}}'
headers:
apim-request-id:
- 66a1627c-042c-47af-8813-f0a31dc87cdc
- 31d16fc8-831b-418e-8f53-5888b7b51ecc
cache-control:
- public,max-age=1
content-length:
- '292'
content-type:
- application/json; charset=utf-8
date:
- Thu, 21 Oct 2021 16:24:19 GMT
etag:
- '"3D20CA8B8E01C88AC06D5FECF91D6B3F82EAAD3C1639AB616027418908C758C0"'
set-cookie:
- ARRAffinity=8cda94a7913d3ab33ee9f4c90adb24581c27bc03c71f0482ecf77d7381f35e6d;Path=/;HttpOnly;Secure;Domain=mtbatch.nam.microsofttranslator.com
- ARRAffinitySameSite=8cda94a7913d3ab33ee9f4c90adb24581c27bc03c71f0482ecf77d7381f35e6d;Path=/;HttpOnly;SameSite=None;Secure;Domain=mtbatch.nam.microsofttranslator.com
strict-transport-security:
- max-age=31536000; includeSubDomains; preload
transfer-encoding:
- chunked
vary:
- Accept-Encoding
x-content-type-options:
- nosniff
x-powered-by:
- ASP.NET
x-requestid:
- 31d16fc8-831b-418e-8f53-5888b7b51ecc
status:
code: 200
message: OK
- request:
body: null
headers:
Accept:
- '*/*'
Accept-Encoding:
- gzip, deflate
Connection:
- keep-alive
User-Agent:
- azsdk-python-ai-translation-document/1.0.0b5 Python/3.9.0 (Windows-10-10.0.19041-SP0)
method: GET
uri: https://redacted.cognitiveservices.azure.com/translator/text/batch/v1.0/batches/1722e8e6-3bc4-48dd-8fa5-cf1aaf978bdb
response:
body:
string: '{"id":"1722e8e6-3bc4-48dd-8fa5-cf1aaf978bdb","createdDateTimeUtc":"2021-10-21T16:24:18.9192862Z","lastActionDateTimeUtc":"2021-10-21T16:24:20.6763938Z","status":"Failed","summary":{"total":1,"failed":1,"success":0,"inProgress":0,"notYetStarted":0,"cancelled":0,"totalCharacterCharged":0}}'
headers:
apim-request-id:
- beffce8d-2b96-44ef-804c-1509c55ed285
cache-control:
- public,max-age=1
content-length:
- '288'
content-type:
- application/json; charset=utf-8
date:
- Wed, 02 Jun 2021 07:02:47 GMT
- Thu, 21 Oct 2021 16:24:21 GMT
etag:
- '"6ED5F477EBC611A428E0CC54B364CDD28525164E61F4F9439DC3BE5CD6D3B139"'
- '"34C367899FEB7BA18820DF56A932E5ED928640E8D1340109474346553ACBFDCA"'
set-cookie:
- ARRAffinity=20358cd7aa5d6b0695f01ef171fc9a95880154357830e1c6bb513b73834a2e5f;Path=/;HttpOnly;Secure;Domain=mtbatch.nam.microsofttranslator.com
- ARRAffinitySameSite=20358cd7aa5d6b0695f01ef171fc9a95880154357830e1c6bb513b73834a2e5f;Path=/;HttpOnly;SameSite=None;Secure;Domain=mtbatch.nam.microsofttranslator.com
- ARRAffinity=09a10d9e036c982a6acf1ed7f4e9558b44845127dddc55af67b87cd656dd4d77;Path=/;HttpOnly;Secure;Domain=mtbatch.nam.microsofttranslator.com
- ARRAffinitySameSite=09a10d9e036c982a6acf1ed7f4e9558b44845127dddc55af67b87cd656dd4d77;Path=/;HttpOnly;SameSite=None;Secure;Domain=mtbatch.nam.microsofttranslator.com
strict-transport-security:
- max-age=31536000; includeSubDomains; preload
transfer-encoding:
Expand All @@ -213,7 +260,7 @@ interactions:
x-powered-by:
- ASP.NET
x-requestid:
- 66a1627c-042c-47af-8813-f0a31dc87cdc
- beffce8d-2b96-44ef-804c-1509c55ed285
status:
code: 200
message: OK
Expand All @@ -227,30 +274,30 @@ interactions:
Connection:
- keep-alive
User-Agent:
- azsdk-python-ai-translation-document/1.0.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0)
- azsdk-python-ai-translation-document/1.0.0b5 Python/3.9.0 (Windows-10-10.0.19041-SP0)
method: GET
uri: https://redacted.cognitiveservices.azure.com/translator/text/batch/v1.0/batches/5948f436-c1b1-414c-9b2c-6d3af57f3021/documents?$skip=0
uri: https://redacted.cognitiveservices.azure.com/translator/text/batch/v1.0/batches/1722e8e6-3bc4-48dd-8fa5-cf1aaf978bdb/documents?$skip=0
response:
body:
string: '{"value":[{"sourcePath":"https://redacted.blob.core.windows.net/srcdf416b05-6dc9-4082-abe5-eb606774efdd/5989239b-a0bc-4f05-a12a-b461af735d1b.txt","createdDateTimeUtc":"2021-06-02T07:02:45.9579201Z","lastActionDateTimeUtc":"2021-06-02T07:02:46.1811007Z","status":"Failed","to":"es","error":{"code":"InvalidRequest","message":"Document
has wrong encoding or is binary file.","target":"Document","innerError":{"code":"WrongDocumentEncoding","message":"Document
has wrong encoding or is binary file."}},"progress":0,"id":"0007ee3d-0000-0000-0000-000000000000","characterCharged":0}]}'
string: '{"value":[{"sourcePath":"https://redacted.blob.core.windows.net/src36942309-8863-46f6-936b-5d575faaa14f/c5313540-4db3-4459-b092-fa031504ea64.txt","createdDateTimeUtc":"2021-10-21T16:24:20.14822Z","lastActionDateTimeUtc":"2021-10-21T16:24:20.6538416Z","status":"Failed","to":"es","error":{"code":"InvalidRequest","message":"The
document does not have any translatable text.","target":"Document","innerError":{"code":"NoTranslatableText","message":"The
document does not have any translatable text."}},"progress":0,"id":"000efdde-0000-0000-0000-000000000000","characterCharged":0}]}'
headers:
apim-request-id:
- 6c6d0f4e-0902-459c-8f11-ff070e6cc466
- 4a2a09b3-8389-489d-8b8f-4314d22c1d2d
cache-control:
- public,max-age=1
content-length:
- '583'
- '584'
content-type:
- application/json; charset=utf-8
date:
- Wed, 02 Jun 2021 07:02:48 GMT
- Thu, 21 Oct 2021 16:24:21 GMT
etag:
- '"E8EDCBBF14607A5F27B97D996EC6B54935A63AD8522BF0B4E56BF307B3ED4290"'
- '"73DF7E86592D6ED984CF81F8F537CB438D65202479D8F67BB914F9D0A8FB1E2C"'
set-cookie:
- ARRAffinity=0ff46fa6d58b00f2d44b7073721903c0eace480139d8ecfc38f61130af5e1587;Path=/;HttpOnly;Secure;Domain=mtbatch.nam.microsofttranslator.com
- ARRAffinitySameSite=0ff46fa6d58b00f2d44b7073721903c0eace480139d8ecfc38f61130af5e1587;Path=/;HttpOnly;SameSite=None;Secure;Domain=mtbatch.nam.microsofttranslator.com
- ARRAffinity=8cda94a7913d3ab33ee9f4c90adb24581c27bc03c71f0482ecf77d7381f35e6d;Path=/;HttpOnly;Secure;Domain=mtbatch.nam.microsofttranslator.com
- ARRAffinitySameSite=8cda94a7913d3ab33ee9f4c90adb24581c27bc03c71f0482ecf77d7381f35e6d;Path=/;HttpOnly;SameSite=None;Secure;Domain=mtbatch.nam.microsofttranslator.com
strict-transport-security:
- max-age=31536000; includeSubDomains; preload
transfer-encoding:
Expand All @@ -262,7 +309,7 @@ interactions:
x-powered-by:
- ASP.NET
x-requestid:
- 6c6d0f4e-0902-459c-8f11-ff070e6cc466
- 4a2a09b3-8389-489d-8b8f-4314d22c1d2d
status:
code: 200
message: OK
Expand Down
Loading

0 comments on commit 03186ba

Please sign in to comment.