Skip to content

Commit

Permalink
test - support (Azure#11175)
Browse files Browse the repository at this point in the history
* testing support

* disabled tests that can't be tested in our sub

* created recordings

* Packaging update of azure-mgmt-support

Co-authored-by: Azure SDK Bot <[email protected]>
  • Loading branch information
Zim Kalinowski and AutorestCI authored May 6, 2020
1 parent a55ca31 commit 5951e07
Show file tree
Hide file tree
Showing 3 changed files with 699 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sdk/support/azure-mgmt-support/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@
pass

# Version extraction inspired from 'requests'
with open(os.path.join(package_folder_path, 'version.py'), 'r') as fd:
with open(os.path.join(package_folder_path, 'version.py')
if os.path.exists(os.path.join(package_folder_path, 'version.py'))
else os.path.join(package_folder_path, '_version.py'), 'r') as fd:
version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]',
fd.read(), re.MULTILINE).group(1)

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
interactions:
- request:
body: null
headers:
Accept:
- application/json
Accept-Encoding:
- gzip, deflate
Connection:
- keep-alive
User-Agent:
- python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10
msrest_azure/0.6.2 azure-mgmt-support/1.0.0 Azure-SDK-For-Python
accept-language:
- en-US
method: GET
uri: https://management.azure.com/providers/Microsoft.Support/services/06bfd9d3-516b-d5c6-5802-169c800dec89/problemClassifications/831b2fb3-4db3-3d32-af35-bbb3d3eaeba2?api-version=2020-04-01
response:
body:
string: '{"id":"/providers/Microsoft.Support/services/06bfd9d3-516b-d5c6-5802-169c800dec89/problemClassifications/831b2fb3-4db3-3d32-af35-bbb3d3eaeba2","name":"831b2fb3-4db3-3d32-af35-bbb3d3eaeba2","type":"Microsoft.Support/problemClassifications","properties":{"displayName":"Batch"}}'
headers:
cache-control:
- no-cache
content-length:
- '276'
content-type:
- application/json; charset=utf-8
date:
- Fri, 01 May 2020 15:29:04 GMT
expires:
- '-1'
pragma:
- no-cache
server:
- Kestrel
strict-transport-security:
- max-age=31536000; includeSubDomains
transfer-encoding:
- chunked
vary:
- Accept-Encoding
x-content-type-options:
- nosniff
status:
code: 200
message: OK
- request:
body: '{"name": "sampleName", "type": "Microsoft.Support/communications"}'
headers:
Accept:
- application/json
Accept-Encoding:
- gzip, deflate
Connection:
- keep-alive
Content-Length:
- '66'
Content-Type:
- application/json; charset=utf-8
User-Agent:
- python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10
msrest_azure/0.6.2 azure-mgmt-support/1.0.0 Azure-SDK-For-Python
accept-language:
- en-US
method: POST
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Support/supportTickets/mySupportTicket/checkNameAvailability?api-version=2020-04-01
response:
body:
string: '{"nameAvailable":true}'
headers:
cache-control:
- no-cache
content-length:
- '22'
content-type:
- application/json; charset=utf-8
date:
- Fri, 01 May 2020 15:29:05 GMT
expires:
- '-1'
pragma:
- no-cache
server:
- Kestrel
strict-transport-security:
- max-age=31536000; includeSubDomains
transfer-encoding:
- chunked
vary:
- Accept-Encoding
x-content-type-options:
- nosniff
x-ms-ratelimit-remaining-subscription-writes:
- '1199'
status:
code: 200
message: OK
- request:
body: '{"name": "sampleName", "type": "Microsoft.Support/supportTickets"}'
headers:
Accept:
- application/json
Accept-Encoding:
- gzip, deflate
Connection:
- keep-alive
Content-Length:
- '66'
Content-Type:
- application/json; charset=utf-8
User-Agent:
- python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10
msrest_azure/0.6.2 azure-mgmt-support/1.0.0 Azure-SDK-For-Python
accept-language:
- en-US
method: POST
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Support/checkNameAvailability?api-version=2020-04-01
response:
body:
string: '{"nameAvailable":true}'
headers:
cache-control:
- no-cache
content-length:
- '22'
content-type:
- application/json; charset=utf-8
date:
- Fri, 01 May 2020 15:29:05 GMT
expires:
- '-1'
pragma:
- no-cache
server:
- Kestrel
strict-transport-security:
- max-age=31536000; includeSubDomains
transfer-encoding:
- chunked
vary:
- Accept-Encoding
x-content-type-options:
- nosniff
x-ms-ratelimit-remaining-subscription-writes:
- '1198'
status:
code: 200
message: OK
version: 1
Loading

0 comments on commit 5951e07

Please sign in to comment.