forked from Azure/azure-sdk-for-python
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Storage] Setup datalake test proxy and migrate first two files (Azur…
- Loading branch information
1 parent
4698c86
commit b0c68de
Showing
101 changed files
with
5,466 additions
and
6,751 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,37 @@ | ||
# coding: utf-8 | ||
|
||
# ------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for | ||
# license information. | ||
# -------------------------------------------------------------------------- | ||
|
||
import sys | ||
import pytest | ||
import os | ||
import platform | ||
|
||
# Ignore async tests for Python < 3.5 | ||
import pytest | ||
|
||
from devtools_testutils import ( | ||
add_general_regex_sanitizer, | ||
add_header_regex_sanitizer, | ||
add_oauth_response_sanitizer, | ||
add_uri_string_sanitizer, | ||
test_proxy | ||
) | ||
|
||
# Ignore async tests for PyPy | ||
collect_ignore_glob = [] | ||
if sys.version_info < (3, 5) or platform.python_implementation() == "PyPy": | ||
if platform.python_implementation() == "PyPy": | ||
collect_ignore_glob.append("tests/*_async.py") | ||
|
||
@pytest.fixture(scope="session", autouse=True) | ||
def add_sanitizers(test_proxy): | ||
subscription_id = os.environ.get("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") | ||
tenant_id = os.environ.get("STORAGE_TENANT_ID", "00000000-0000-0000-0000-000000000000") | ||
add_general_regex_sanitizer(regex=subscription_id, value="00000000-0000-0000-0000-000000000000") | ||
add_general_regex_sanitizer(regex=tenant_id, value="00000000-0000-0000-0000-000000000000") | ||
add_header_regex_sanitizer(key="Set-Cookie", value="[set-cookie;]") | ||
add_header_regex_sanitizer(key="Cookie", value="cookie;") | ||
add_oauth_response_sanitizer() | ||
|
||
add_header_regex_sanitizer(key="x-ms-encryption-key", value="Sanitized") | ||
|
||
add_uri_string_sanitizer(target=".preprod.", value=".") |
64 changes: 64 additions & 0 deletions
64
...e-file-datalake/tests/recordings/test_cpk.pyTestDatalakeCpktest_create_directory_cpk.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
{ | ||
"Entries": [ | ||
{ | ||
"RequestUri": "https://storagename.blob.core.windows.net/utfilesystemd8a42943?restype=container\u0026timeout=5", | ||
"RequestMethod": "PUT", | ||
"RequestHeaders": { | ||
"Accept": "application/xml", | ||
"Accept-Encoding": "gzip, deflate", | ||
"Connection": "keep-alive", | ||
"Content-Length": "0", | ||
"User-Agent": "azsdk-python-storage-dfs/12.9.0b1 Python/3.10.5 (Windows-10-10.0.22000-SP0)", | ||
"x-ms-date": "Tue, 09 Aug 2022 22:25:31 GMT", | ||
"x-ms-version": "2021-08-06" | ||
}, | ||
"RequestBody": null, | ||
"StatusCode": 201, | ||
"ResponseHeaders": { | ||
"Content-Length": "0", | ||
"Date": "Tue, 09 Aug 2022 22:25:31 GMT", | ||
"ETag": "\u00220x8DA7A56127F53C3\u0022", | ||
"Last-Modified": "Tue, 09 Aug 2022 22:25:32 GMT", | ||
"Server": [ | ||
"Windows-Azure-Blob/1.0", | ||
"Microsoft-HTTPAPI/2.0" | ||
], | ||
"x-ms-version": "2021-08-06" | ||
}, | ||
"ResponseBody": null | ||
}, | ||
{ | ||
"RequestUri": "https://storagename.dfs.core.windows.net/utfilesystemd8a42943/cpkdirectory?resource=directory", | ||
"RequestMethod": "PUT", | ||
"RequestHeaders": { | ||
"Accept": "application/json", | ||
"Accept-Encoding": "gzip, deflate", | ||
"Connection": "keep-alive", | ||
"Content-Length": "0", | ||
"User-Agent": "azsdk-python-storage-dfs/12.9.0b1 Python/3.10.5 (Windows-10-10.0.22000-SP0)", | ||
"x-ms-date": "Tue, 09 Aug 2022 22:25:32 GMT", | ||
"x-ms-encryption-algorithm": "AES256", | ||
"x-ms-encryption-key": "Sanitized", | ||
"x-ms-encryption-key-sha256": "3QFFFpRA5\u002BXANHqwwbT4yXDmrT/2JaLt/FKHjzhOdoE=", | ||
"x-ms-version": "2021-08-06" | ||
}, | ||
"RequestBody": null, | ||
"StatusCode": 201, | ||
"ResponseHeaders": { | ||
"Content-Length": "0", | ||
"Date": "Tue, 09 Aug 2022 22:25:32 GMT", | ||
"ETag": "\u00220x8DA7A5612D1A50D\u0022", | ||
"Last-Modified": "Tue, 09 Aug 2022 22:25:32 GMT", | ||
"Server": [ | ||
"Windows-Azure-HDFS/1.0", | ||
"Microsoft-HTTPAPI/2.0" | ||
], | ||
"x-ms-encryption-key-sha256": "3QFFFpRA5\u002BXANHqwwbT4yXDmrT/2JaLt/FKHjzhOdoE=", | ||
"x-ms-request-server-encrypted": "true", | ||
"x-ms-version": "2021-08-06" | ||
}, | ||
"ResponseBody": null | ||
} | ||
], | ||
"Variables": {} | ||
} |
96 changes: 96 additions & 0 deletions
96
...torage-file-datalake/tests/recordings/test_cpk.pyTestDatalakeCpktest_create_file_cpk.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
{ | ||
"Entries": [ | ||
{ | ||
"RequestUri": "https://storagename.blob.core.windows.net/utfilesystem8e8270e?restype=container\u0026timeout=5", | ||
"RequestMethod": "PUT", | ||
"RequestHeaders": { | ||
"Accept": "application/xml", | ||
"Accept-Encoding": "gzip, deflate", | ||
"Connection": "keep-alive", | ||
"Content-Length": "0", | ||
"User-Agent": "azsdk-python-storage-dfs/12.9.0b1 Python/3.10.5 (Windows-10-10.0.22000-SP0)", | ||
"x-ms-date": "Tue, 09 Aug 2022 22:25:34 GMT", | ||
"x-ms-version": "2021-08-06" | ||
}, | ||
"RequestBody": null, | ||
"StatusCode": 201, | ||
"ResponseHeaders": { | ||
"Content-Length": "0", | ||
"Date": "Tue, 09 Aug 2022 22:25:33 GMT", | ||
"ETag": "\u00220x8DA7A5613B02B01\u0022", | ||
"Last-Modified": "Tue, 09 Aug 2022 22:25:34 GMT", | ||
"Server": [ | ||
"Windows-Azure-Blob/1.0", | ||
"Microsoft-HTTPAPI/2.0" | ||
], | ||
"x-ms-version": "2021-08-06" | ||
}, | ||
"ResponseBody": null | ||
}, | ||
{ | ||
"RequestUri": "https://storagename.dfs.core.windows.net/utfilesystem8e8270e/directory8e8270e?resource=directory", | ||
"RequestMethod": "PUT", | ||
"RequestHeaders": { | ||
"Accept": "application/json", | ||
"Accept-Encoding": "gzip, deflate", | ||
"Connection": "keep-alive", | ||
"Content-Length": "0", | ||
"User-Agent": "azsdk-python-storage-dfs/12.9.0b1 Python/3.10.5 (Windows-10-10.0.22000-SP0)", | ||
"x-ms-date": "Tue, 09 Aug 2022 22:25:34 GMT", | ||
"x-ms-encryption-algorithm": "AES256", | ||
"x-ms-encryption-key": "Sanitized", | ||
"x-ms-encryption-key-sha256": "3QFFFpRA5\u002BXANHqwwbT4yXDmrT/2JaLt/FKHjzhOdoE=", | ||
"x-ms-version": "2021-08-06" | ||
}, | ||
"RequestBody": null, | ||
"StatusCode": 201, | ||
"ResponseHeaders": { | ||
"Content-Length": "0", | ||
"Date": "Tue, 09 Aug 2022 22:25:34 GMT", | ||
"ETag": "\u00220x8DA7A5613BBFA1B\u0022", | ||
"Last-Modified": "Tue, 09 Aug 2022 22:25:34 GMT", | ||
"Server": [ | ||
"Windows-Azure-HDFS/1.0", | ||
"Microsoft-HTTPAPI/2.0" | ||
], | ||
"x-ms-encryption-key-sha256": "3QFFFpRA5\u002BXANHqwwbT4yXDmrT/2JaLt/FKHjzhOdoE=", | ||
"x-ms-request-server-encrypted": "true", | ||
"x-ms-version": "2021-08-06" | ||
}, | ||
"ResponseBody": null | ||
}, | ||
{ | ||
"RequestUri": "https://storagename.dfs.core.windows.net/utfilesystem8e8270e/directory8e8270e%2Fcpkfile?resource=file", | ||
"RequestMethod": "PUT", | ||
"RequestHeaders": { | ||
"Accept": "application/json", | ||
"Accept-Encoding": "gzip, deflate", | ||
"Connection": "keep-alive", | ||
"Content-Length": "0", | ||
"User-Agent": "azsdk-python-storage-dfs/12.9.0b1 Python/3.10.5 (Windows-10-10.0.22000-SP0)", | ||
"x-ms-date": "Tue, 09 Aug 2022 22:25:34 GMT", | ||
"x-ms-encryption-algorithm": "AES256", | ||
"x-ms-encryption-key": "Sanitized", | ||
"x-ms-encryption-key-sha256": "3QFFFpRA5\u002BXANHqwwbT4yXDmrT/2JaLt/FKHjzhOdoE=", | ||
"x-ms-version": "2021-08-06" | ||
}, | ||
"RequestBody": null, | ||
"StatusCode": 201, | ||
"ResponseHeaders": { | ||
"Content-Length": "0", | ||
"Date": "Tue, 09 Aug 2022 22:25:34 GMT", | ||
"ETag": "\u00220x8DA7A5613C476EF\u0022", | ||
"Last-Modified": "Tue, 09 Aug 2022 22:25:34 GMT", | ||
"Server": [ | ||
"Windows-Azure-HDFS/1.0", | ||
"Microsoft-HTTPAPI/2.0" | ||
], | ||
"x-ms-encryption-key-sha256": "3QFFFpRA5\u002BXANHqwwbT4yXDmrT/2JaLt/FKHjzhOdoE=", | ||
"x-ms-request-server-encrypted": "true", | ||
"x-ms-version": "2021-08-06" | ||
}, | ||
"ResponseBody": null | ||
} | ||
], | ||
"Variables": {} | ||
} |
140 changes: 140 additions & 0 deletions
140
...le-datalake/tests/recordings/test_cpk.pyTestDatalakeCpktest_create_sub_directory_cpk.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,140 @@ | ||
{ | ||
"Entries": [ | ||
{ | ||
"RequestUri": "https://storagename.blob.core.windows.net/utfilesystem85452aec?restype=container\u0026timeout=5", | ||
"RequestMethod": "PUT", | ||
"RequestHeaders": { | ||
"Accept": "application/xml", | ||
"Accept-Encoding": "gzip, deflate", | ||
"Connection": "keep-alive", | ||
"Content-Length": "0", | ||
"User-Agent": "azsdk-python-storage-dfs/12.9.0b1 Python/3.10.5 (Windows-10-10.0.22000-SP0)", | ||
"x-ms-date": "Tue, 09 Aug 2022 22:25:33 GMT", | ||
"x-ms-version": "2021-08-06" | ||
}, | ||
"RequestBody": null, | ||
"StatusCode": 201, | ||
"ResponseHeaders": { | ||
"Content-Length": "0", | ||
"Date": "Tue, 09 Aug 2022 22:25:32 GMT", | ||
"ETag": "\u00220x8DA7A561336C7DA\u0022", | ||
"Last-Modified": "Tue, 09 Aug 2022 22:25:33 GMT", | ||
"Server": [ | ||
"Windows-Azure-Blob/1.0", | ||
"Microsoft-HTTPAPI/2.0" | ||
], | ||
"x-ms-version": "2021-08-06" | ||
}, | ||
"ResponseBody": null | ||
}, | ||
{ | ||
"RequestUri": "https://storagename.dfs.core.windows.net/utfilesystem85452aec/directory85452aec?resource=directory", | ||
"RequestMethod": "PUT", | ||
"RequestHeaders": { | ||
"Accept": "application/json", | ||
"Accept-Encoding": "gzip, deflate", | ||
"Connection": "keep-alive", | ||
"Content-Length": "0", | ||
"User-Agent": "azsdk-python-storage-dfs/12.9.0b1 Python/3.10.5 (Windows-10-10.0.22000-SP0)", | ||
"x-ms-date": "Tue, 09 Aug 2022 22:25:33 GMT", | ||
"x-ms-encryption-algorithm": "AES256", | ||
"x-ms-encryption-key": "Sanitized", | ||
"x-ms-encryption-key-sha256": "3QFFFpRA5\u002BXANHqwwbT4yXDmrT/2JaLt/FKHjzhOdoE=", | ||
"x-ms-version": "2021-08-06" | ||
}, | ||
"RequestBody": null, | ||
"StatusCode": 201, | ||
"ResponseHeaders": { | ||
"Content-Length": "0", | ||
"Date": "Tue, 09 Aug 2022 22:25:33 GMT", | ||
"ETag": "\u00220x8DA7A561341340A\u0022", | ||
"Last-Modified": "Tue, 09 Aug 2022 22:25:33 GMT", | ||
"Server": [ | ||
"Windows-Azure-HDFS/1.0", | ||
"Microsoft-HTTPAPI/2.0" | ||
], | ||
"x-ms-encryption-key-sha256": "3QFFFpRA5\u002BXANHqwwbT4yXDmrT/2JaLt/FKHjzhOdoE=", | ||
"x-ms-request-server-encrypted": "true", | ||
"x-ms-version": "2021-08-06" | ||
}, | ||
"ResponseBody": null | ||
}, | ||
{ | ||
"RequestUri": "https://storagename.dfs.core.windows.net/utfilesystem85452aec/directory85452aec%2Fcpksubdirectory?resource=directory", | ||
"RequestMethod": "PUT", | ||
"RequestHeaders": { | ||
"Accept": "application/json", | ||
"Accept-Encoding": "gzip, deflate", | ||
"Connection": "keep-alive", | ||
"Content-Length": "0", | ||
"User-Agent": "azsdk-python-storage-dfs/12.9.0b1 Python/3.10.5 (Windows-10-10.0.22000-SP0)", | ||
"x-ms-date": "Tue, 09 Aug 2022 22:25:33 GMT", | ||
"x-ms-encryption-algorithm": "AES256", | ||
"x-ms-encryption-key": "Sanitized", | ||
"x-ms-encryption-key-sha256": "3QFFFpRA5\u002BXANHqwwbT4yXDmrT/2JaLt/FKHjzhOdoE=", | ||
"x-ms-version": "2021-08-06" | ||
}, | ||
"RequestBody": null, | ||
"StatusCode": 201, | ||
"ResponseHeaders": { | ||
"Content-Length": "0", | ||
"Date": "Tue, 09 Aug 2022 22:25:33 GMT", | ||
"ETag": "\u00220x8DA7A56134BF9F6\u0022", | ||
"Last-Modified": "Tue, 09 Aug 2022 22:25:33 GMT", | ||
"Server": [ | ||
"Windows-Azure-HDFS/1.0", | ||
"Microsoft-HTTPAPI/2.0" | ||
], | ||
"x-ms-encryption-key-sha256": "3QFFFpRA5\u002BXANHqwwbT4yXDmrT/2JaLt/FKHjzhOdoE=", | ||
"x-ms-request-server-encrypted": "true", | ||
"x-ms-version": "2021-08-06" | ||
}, | ||
"ResponseBody": null | ||
}, | ||
{ | ||
"RequestUri": "https://storagename.blob.core.windows.net/utfilesystem85452aec/directory85452aec/cpksubdirectory", | ||
"RequestMethod": "HEAD", | ||
"RequestHeaders": { | ||
"Accept": "application/xml", | ||
"Accept-Encoding": "gzip, deflate", | ||
"Connection": "keep-alive", | ||
"User-Agent": "azsdk-python-storage-dfs/12.9.0b1 Python/3.10.5 (Windows-10-10.0.22000-SP0)", | ||
"x-ms-date": "Tue, 09 Aug 2022 22:25:33 GMT", | ||
"x-ms-encryption-algorithm": "AES256", | ||
"x-ms-encryption-key": "Sanitized", | ||
"x-ms-encryption-key-sha256": "3QFFFpRA5\u002BXANHqwwbT4yXDmrT/2JaLt/FKHjzhOdoE=", | ||
"x-ms-version": "2021-08-06" | ||
}, | ||
"RequestBody": null, | ||
"StatusCode": 200, | ||
"ResponseHeaders": { | ||
"Accept-Ranges": "bytes", | ||
"Content-Length": "0", | ||
"Content-Type": "application/octet-stream", | ||
"Date": "Tue, 09 Aug 2022 22:25:32 GMT", | ||
"ETag": "\u00220x8DA7A56134BF9F6\u0022", | ||
"Last-Modified": "Tue, 09 Aug 2022 22:25:33 GMT", | ||
"Server": [ | ||
"Windows-Azure-Blob/1.0", | ||
"Microsoft-HTTPAPI/2.0" | ||
], | ||
"x-ms-access-tier": "Hot", | ||
"x-ms-access-tier-inferred": "true", | ||
"x-ms-blob-type": "BlockBlob", | ||
"x-ms-creation-time": "Tue, 09 Aug 2022 22:25:33 GMT", | ||
"x-ms-encryption-key-sha256": "3QFFFpRA5\u002BXANHqwwbT4yXDmrT/2JaLt/FKHjzhOdoE=", | ||
"x-ms-group": "$superuser", | ||
"x-ms-lease-state": "available", | ||
"x-ms-lease-status": "unlocked", | ||
"x-ms-meta-hdi_isfolder": "true", | ||
"x-ms-owner": "$superuser", | ||
"x-ms-permissions": "rwxr-x---", | ||
"x-ms-resource-type": "directory", | ||
"x-ms-server-encrypted": "true", | ||
"x-ms-version": "2021-08-06" | ||
}, | ||
"ResponseBody": null | ||
} | ||
], | ||
"Variables": {} | ||
} |
Oops, something went wrong.