Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

This file was deleted.

This file was deleted.

13 changes: 13 additions & 0 deletions sdk/schemaregistry/azure-schemaregistry-avroencoder/conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import pytest
from devtools_testutils import add_general_regex_sanitizer, test_proxy, add_oauth_response_sanitizer

# autouse=True will trigger this fixture on each pytest run, even if it's not explicitly used by a test method
@pytest.fixture(scope="session", autouse=True)
def add_sanitizers(test_proxy):
add_general_regex_sanitizer(regex="(?<=\\/\\/)[a-z-]+(?=\\.servicebus\\.windows\\.net)", value="fake_resource")
add_oauth_response_sanitizer()

# autouse=True will trigger this fixture on each pytest run, even if it's not explicitly used by a test method
@pytest.fixture(scope="session", autouse=True)
def start_proxy(test_proxy):
return
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@
],
python_requires=">=3.6",
zip_safe=False,
packages=find_packages(exclude=exclude_packages),
packages=[
'azure.schemaregistry.encoder.avroencoder',
'azure.schemaregistry.encoder.avroencoder.aio',
],
install_requires=install_packages
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,286 @@
{
"Entries": [
{
"RequestUri": "https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47/v2.0/.well-known/openid-configuration",
"RequestMethod": "GET",
"RequestHeaders": {
"Accept": "*/*",
"Accept-Encoding": "gzip, deflate",
"Connection": "keep-alive",
"User-Agent": "azsdk-python-identity/1.9.0b2 Python/3.9.0 (Windows-10-10.0.22000-SP0)"
},
"RequestBody": null,
"StatusCode": 200,
"ResponseHeaders": {
"Access-Control-Allow-Methods": "GET, OPTIONS",
"Access-Control-Allow-Origin": "*",
"Cache-Control": "max-age=86400, private",
"Content-Length": "1753",
"Content-Type": "application/json; charset=utf-8",
"Date": "Wed, 09 Mar 2022 22:12:41 GMT",
"P3P": "CP=\u0022DSP CUR OTPi IND OTRi ONL FIN\u0022",
"Set-Cookie": [
"fpc=Ak4mIDH0nB1Cll0P1J4o7uKlEE-xAgAAAFQdu9kOAAAA; expires=Fri, 08-Apr-2022 22:12:41 GMT; path=/; secure; HttpOnly; SameSite=None",
"x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly",
"stsservicecookie=estsfd; path=/; secure; samesite=none; httponly"
],
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
"X-Content-Type-Options": "nosniff",
"x-ms-ests-server": "2.1.12559.5 - WUS2 ProdSlices",
"x-ms-request-id": "02c60093-8ad2-4291-a2e8-a23d5a0e0a00"
},
"ResponseBody": {
"token_endpoint": "https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47/oauth2/v2.0/token",
"token_endpoint_auth_methods_supported": [
"client_secret_post",
"private_key_jwt",
"client_secret_basic"
],
"jwks_uri": "https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47/discovery/v2.0/keys",
"response_modes_supported": [
"query",
"fragment",
"form_post"
],
"subject_types_supported": [
"pairwise"
],
"id_token_signing_alg_values_supported": [
"RS256"
],
"response_types_supported": [
"code",
"id_token",
"code id_token",
"id_token token"
],
"scopes_supported": [
"openid",
"profile",
"email",
"offline_access"
],
"issuer": "https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47/v2.0",
"request_uri_parameter_supported": false,
"userinfo_endpoint": "https://graph.microsoft.com/oidc/userinfo",
"authorization_endpoint": "https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47/oauth2/v2.0/authorize",
"device_authorization_endpoint": "https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47/oauth2/v2.0/devicecode",
"http_logout_supported": true,
"frontchannel_logout_supported": true,
"end_session_endpoint": "https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47/oauth2/v2.0/logout",
"claims_supported": [
"sub",
"iss",
"cloud_instance_name",
"cloud_instance_host_name",
"cloud_graph_host_name",
"msgraph_host",
"aud",
"exp",
"iat",
"auth_time",
"acr",
"nonce",
"preferred_username",
"name",
"tid",
"ver",
"at_hash",
"c_hash",
"email"
],
"kerberos_endpoint": "https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47/kerberos",
"tenant_region_scope": "WW",
"cloud_instance_name": "microsoftonline.com",
"cloud_graph_host_name": "graph.windows.net",
"msgraph_host": "graph.microsoft.com",
"rbac_url": "https://pas.windows.net"
}
},
{
"RequestUri": "https://login.microsoftonline.com/common/discovery/instance?api-version=1.1\u0026authorization_endpoint=https://login.microsoftonline.com/common/oauth2/authorize",
"RequestMethod": "GET",
"RequestHeaders": {
"Accept": "application/json",
"Accept-Encoding": "gzip, deflate",
"Connection": "keep-alive",
"Cookie": "fpc=Ak4mIDH0nB1Cll0P1J4o7uKlEE-xAgAAAFQdu9kOAAAA; stsservicecookie=estsfd; x-ms-gateway-slice=estsfd",
"User-Agent": "azsdk-python-identity/1.9.0b2 Python/3.9.0 (Windows-10-10.0.22000-SP0)"
},
"RequestBody": null,
"StatusCode": 200,
"ResponseHeaders": {
"Access-Control-Allow-Methods": "GET, OPTIONS",
"Access-Control-Allow-Origin": "*",
"Cache-Control": "max-age=86400, private",
"Content-Length": "945",
"Content-Type": "application/json; charset=utf-8",
"Date": "Wed, 09 Mar 2022 22:12:41 GMT",
"P3P": "CP=\u0022DSP CUR OTPi IND OTRi ONL FIN\u0022",
"Set-Cookie": [
"fpc=Ak4mIDH0nB1Cll0P1J4o7uKlEE-xAgAAAFQdu9kOAAAA; expires=Fri, 08-Apr-2022 22:12:41 GMT; path=/; secure; HttpOnly; SameSite=None",
"x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly",
"stsservicecookie=estsfd; path=/; secure; samesite=none; httponly"
],
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
"X-Content-Type-Options": "nosniff",
"x-ms-ests-server": "2.1.12559.4 - WUS2 ProdSlices",
"x-ms-request-id": "e3a1998c-105f-4d55-8383-46b500a61700"
},
"ResponseBody": {
"tenant_discovery_endpoint": "https://login.microsoftonline.com/common/.well-known/openid-configuration",
"api-version": "1.1",
"metadata": [
{
"preferred_network": "login.microsoftonline.com",
"preferred_cache": "login.windows.net",
"aliases": [
"login.microsoftonline.com",
"login.windows.net",
"login.microsoft.com",
"sts.windows.net"
]
},
{
"preferred_network": "login.partner.microsoftonline.cn",
"preferred_cache": "login.partner.microsoftonline.cn",
"aliases": [
"login.partner.microsoftonline.cn",
"login.chinacloudapi.cn"
]
},
{
"preferred_network": "login.microsoftonline.de",
"preferred_cache": "login.microsoftonline.de",
"aliases": [
"login.microsoftonline.de"
]
},
{
"preferred_network": "login.microsoftonline.us",
"preferred_cache": "login.microsoftonline.us",
"aliases": [
"login.microsoftonline.us",
"login.usgovcloudapi.net"
]
},
{
"preferred_network": "login-us.microsoftonline.com",
"preferred_cache": "login-us.microsoftonline.com",
"aliases": [
"login-us.microsoftonline.com"
]
}
]
}
},
{
"RequestUri": "https://fake_resource.servicebus.windows.net/$schemaGroups/fakegroup/schemas/example.avro.User?api-version=2021-10",
"RequestMethod": "PUT",
"RequestHeaders": {
"Accept": "application/json",
"Accept-Encoding": "gzip, deflate",
"Authorization": "Sanitized",
"Connection": "keep-alive",
"Content-Length": "201",
"Content-Type": "application/json; serialization=Avro",
"User-Agent": "azsdk-python-azureschemaregistry/1.0.0 Python/3.9.0 (Windows-10-10.0.22000-SP0)",
"x-ms-client-request-id": "0a391aaf-9ff6-11ec-86cf-9c2976df0bde"
},
"RequestBody": {
"namespace": "example.avro",
"type": "record",
"name": "User",
"fields": [
{
"name": "name",
"type": "string"
},
{
"name": "favorite_number",
"type": [
"int",
"null"
]
},
{
"name": "favorite_color",
"type": [
"string",
"null"
]
}
]
},
"StatusCode": 204,
"ResponseHeaders": {
"Content-Length": "0",
"Date": "Wed, 09 Mar 2022 22:12:42 GMT",
"Location": "https://fake_resource.servicebus.windows.net/$schemagroups/fakegroup/schemas/example.avro.User/versions/1?api-version=2021-10",
"Schema-Group-Name": "fakegroup",
"Schema-Id": "4fda72215677413b8888f87e9db90b87",
"Schema-Id-Location": "https://fake_resource.servicebus.windows.net:443/$schemagroups/$schemas/4fda72215677413b8888f87e9db90b87?api-version=2021-10",
"Schema-Name": "example.avro.User",
"Schema-Version": "1",
"Schema-Versions-Location": "https://fake_resource.servicebus.windows.net:443/$schemagroups/fakegroup/schemas/example.avro.User/versions?api-version=2021-10",
"Server": "Microsoft-HTTPAPI/2.0",
"Strict-Transport-Security": "max-age=31536000"
},
"ResponseBody": null
},
{
"RequestUri": "https://fake_resource.servicebus.windows.net/$schemaGroups/$schemas/4fda72215677413b8888f87e9db90b87?api-version=2021-10",
"RequestMethod": "GET",
"RequestHeaders": {
"Accept": "application/json; serialization=Avro",
"Accept-Encoding": "gzip, deflate",
"Authorization": "Sanitized",
"Connection": "keep-alive",
"User-Agent": "azsdk-python-azureschemaregistry/1.0.0 Python/3.9.0 (Windows-10-10.0.22000-SP0)",
"x-ms-client-request-id": "0ae08e62-9ff6-11ec-b673-9c2976df0bde"
},
"RequestBody": null,
"StatusCode": 200,
"ResponseHeaders": {
"Content-Type": "application/json; serialization=Avro",
"Date": "Wed, 09 Mar 2022 22:12:42 GMT",
"Location": "https://fake_resource.servicebus.windows.net/$schemagroups/fakegroup/schemas/example.avro.User/versions/1?api-version=2021-10",
"Schema-Group-Name": "fakegroup",
"Schema-Id": "4fda72215677413b8888f87e9db90b87",
"Schema-Id-Location": "https://fake_resource.servicebus.windows.net:443/$schemagroups/$schemas/4fda72215677413b8888f87e9db90b87?api-version=2021-10",
"Schema-Name": "example.avro.User",
"Schema-Version": "1",
"Schema-Versions-Location": "https://fake_resource.servicebus.windows.net:443/$schemagroups/fakegroup/schemas/example.avro.User/versions?api-version=2021-10",
"Server": "Microsoft-HTTPAPI/2.0",
"Strict-Transport-Security": "max-age=31536000",
"Transfer-Encoding": "chunked"
},
"ResponseBody": {
"namespace": "example.avro",
"type": "record",
"name": "User",
"fields": [
{
"name": "name",
"type": "string"
},
{
"name": "favorite_number",
"type": [
"int",
"null"
]
},
{
"name": "favorite_color",
"type": [
"string",
"null"
]
}
]
}
}
],
"Variables": {}
}
Loading