Skip to content

Commit

Permalink
test: add tests for optional params
Browse files Browse the repository at this point in the history
  • Loading branch information
blackchoey committed May 17, 2024
1 parent 271d27e commit 6b37bcd
Show file tree
Hide file tree
Showing 18 changed files with 1,474 additions and 98 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ interactions:
cache-control:
- no-cache
date:
- Tue, 07 May 2024 11:32:34 GMT
- Fri, 17 May 2024 03:17:25 GMT
expires:
- '-1'
pragma:
Expand All @@ -41,10 +41,60 @@ interactions:
x-ms-ratelimit-remaining-subscription-deletes:
- '14999'
x-msedge-ref:
- 'Ref A: DB255A79DE584A6E96C87DCCEE911204 Ref B: MAA201060515039 Ref C: 2024-05-07T11:32:33Z'
- 'Ref A: E19B9F85D64543C8A6D0A898B3BF8D2B Ref B: MAA201060513021 Ref C: 2024-05-17T03:17:24Z'
x-powered-by:
- ASP.NET
status:
code: 204
message: No Content
- request:
body: null
headers:
Accept:
- application/json
Accept-Encoding:
- gzip, deflate
CommandName:
- apic api show
Connection:
- keep-alive
ParameterSetName:
- -g -s --api-id
User-Agent:
- AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.10.11 (Windows-10-10.0.22631-SP0)
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000003?api-version=2024-03-01
response:
body:
string: '{"code":"404"}'
headers:
api-supported-versions:
- 2023-07-01-preview, 2024-03-01, 2024-03-15-preview
cache-control:
- no-cache
content-length:
- '14'
content-type:
- application/json; charset=utf-8
date:
- Fri, 17 May 2024 03:17:27 GMT
expires:
- '-1'
pragma:
- no-cache
strict-transport-security:
- max-age=31536000; includeSubDomains
vary:
- Accept-Encoding
x-cache:
- CONFIG_NOCACHE
x-content-type-options:
- nosniff
x-msedge-ref:
- 'Ref A: AF791DC5CCB94CA4BF9BA275AD679992 Ref B: MAA201060515017 Ref C: 2024-05-17T03:17:26Z'
x-powered-by:
- ASP.NET
status:
code: 404
message: Not Found
version: 1
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ interactions:
content-length:
- '0'
date:
- Tue, 07 May 2024 12:33:17 GMT
- Fri, 17 May 2024 03:18:34 GMT
expires:
- '-1'
pragma:
Expand All @@ -41,12 +41,62 @@ interactions:
x-content-type-options:
- nosniff
x-ms-ratelimit-remaining-subscription-deletes:
- '14998'
- '14999'
x-msedge-ref:
- 'Ref A: 375D48828C5C438C8C025235B5D631D0 Ref B: MAA201060515017 Ref C: 2024-05-07T12:33:16Z'
- 'Ref A: 4BCCF1879F33461394491BD332646B13 Ref B: MAA201060514039 Ref C: 2024-05-17T03:18:34Z'
x-powered-by:
- ASP.NET
status:
code: 200
message: OK
- request:
body: null
headers:
Accept:
- application/json
Accept-Encoding:
- gzip, deflate
CommandName:
- apic api definition show
Connection:
- keep-alive
ParameterSetName:
- -g -s --api-id --version-id --definition-id
User-Agent:
- AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.10.11 (Windows-10-10.0.22631-SP0)
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000003/versions/clitest000004/definitions/clitest000005?api-version=2024-03-01
response:
body:
string: '{"code":"404"}'
headers:
api-supported-versions:
- 2023-07-01-preview, 2024-03-01, 2024-03-15-preview
cache-control:
- no-cache
content-length:
- '14'
content-type:
- application/json; charset=utf-8
date:
- Fri, 17 May 2024 03:18:37 GMT
expires:
- '-1'
pragma:
- no-cache
strict-transport-security:
- max-age=31536000; includeSubDomains
vary:
- Accept-Encoding
x-cache:
- CONFIG_NOCACHE
x-content-type-options:
- nosniff
x-msedge-ref:
- 'Ref A: F52D3686703249E59A8577C5C9700D57 Ref B: MAA201060514017 Ref C: 2024-05-17T03:18:36Z'
x-powered-by:
- ASP.NET
status:
code: 404
message: Not Found
version: 1

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,21 @@ interactions:
ParameterSetName:
- -g -s --yes
User-Agent:
- AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.11.9 (Windows-10-10.0.19045-SP0)
- AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.10.11 (Windows-10-10.0.22631-SP0)
method: DELETE
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002a?api-version=2024-03-01
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002?api-version=2024-03-01
response:
body:
string: ''
headers:
api-supported-versions:
- 2023-07-01-preview, 2024-03-01, 2024-03-15-preview
cache-control:
- no-cache
content-length:
- '0'
date:
- Thu, 25 Apr 2024 05:47:24 GMT
- Fri, 17 May 2024 05:03:39 GMT
expires:
- '-1'
pragma:
Expand All @@ -39,8 +43,58 @@ interactions:
x-ms-ratelimit-remaining-subscription-deletes:
- '14999'
x-msedge-ref:
- 'Ref A: 50BEA56C7F8448F2A9889B4487CB4C1A Ref B: MAA201060516021 Ref C: 2024-04-25T05:47:25Z'
- 'Ref A: D0045B874A554F9B9E64B2FC1D1A8E5A Ref B: MAA201060514033 Ref C: 2024-05-17T05:03:35Z'
x-powered-by:
- ASP.NET
status:
code: 200
message: OK
- request:
body: null
headers:
Accept:
- application/json
Accept-Encoding:
- gzip, deflate
CommandName:
- apic service show
Connection:
- keep-alive
ParameterSetName:
- -g -s
User-Agent:
- AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.10.11 (Windows-10-10.0.22631-SP0)
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002?api-version=2024-03-01
response:
body:
string: '{"error":{"code":"ResourceNotFound","message":"The Resource ''Microsoft.ApiCenter/services/clitest000002''
under resource group ''clirg000001'' was not found. For more details please
go to https://aka.ms/ARMResourceNotFoundFix"}}'
headers:
cache-control:
- no-cache
content-length:
- '225'
content-type:
- application/json; charset=utf-8
date:
- Fri, 17 May 2024 05:03:40 GMT
expires:
- '-1'
pragma:
- no-cache
strict-transport-security:
- max-age=31536000; includeSubDomains
x-cache:
- CONFIG_NOCACHE
x-content-type-options:
- nosniff
x-ms-failure-cause:
- gateway
x-msedge-ref:
- 'Ref A: 219F8D63770B45668E30C56B5FD51B7C Ref B: MAA201060516033 Ref C: 2024-05-17T05:03:41Z'
status:
code: 204
message: No Content
code: 404
message: Not Found
version: 1
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
interactions:
- request:
body: '{"properties": {"customProperties": {"clitest000007": true}, "definitionId":
"/workspaces/default/apis/clitest000004/versions/clitest000005/definitions/clitest000006",
"description": "deployment description", "environmentId": "/workspaces/default/environments/clitest000003",
"server": {"runtimeUri": ["https://example.com"]}, "state": "active", "title":
"test deployment"}}'
headers:
Accept:
- application/json
Accept-Encoding:
- gzip, deflate
CommandName:
- apic api deployment create
Connection:
- keep-alive
Content-Length:
- '374'
Content-Type:
- application/json
ParameterSetName:
- -g -s --api-id --definition-id --environment-id --deployment-id --title --server
--description --state --custom-properties
User-Agent:
- AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.10.11 (Windows-10-10.0.22631-SP0)
method: PUT
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000004/deployments/mock-deployment?api-version=2024-03-01
response:
body:
string: '{"type":"Microsoft.ApiCenter/services/workspaces/apis/deployments","properties":{"title":"test
deployment","description":"deployment description","environmentId":"/workspaces/default/environments/clitest000003","definitionId":"/workspaces/default/apis/clitest000004/versions/clitest000005/definitions/clitest000006","server":{"runtimeUri":["https://example.com"]},"customProperties":{"clitest000007":true},"recommended":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000004/deployments/cli000008","name":"cli000008","systemData":{"createdAt":"2024-05-17T05:03:38.370645Z","lastModifiedAt":"2024-05-17T05:03:38.3706282Z"}}'
headers:
api-supported-versions:
- 2023-07-01-preview, 2024-03-01, 2024-03-15-preview
cache-control:
- no-cache
content-length:
- '750'
content-type:
- application/json; charset=utf-8
date:
- Fri, 17 May 2024 05:03:38 GMT
etag:
- 4b011192-0000-0100-0000-6646e52a0000
expires:
- '-1'
pragma:
- no-cache
strict-transport-security:
- max-age=31536000; includeSubDomains
vary:
- Accept-Encoding
x-cache:
- CONFIG_NOCACHE
x-content-type-options:
- nosniff
x-ms-ratelimit-remaining-subscription-writes:
- '1199'
x-msedge-ref:
- 'Ref A: 19D3A21284B740909A39DFD512E47B9C Ref B: MAA201060516051 Ref C: 2024-05-17T05:03:36Z'
x-powered-by:
- ASP.NET
status:
code: 200
message: OK
version: 1
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ interactions:
cache-control:
- no-cache
date:
- Wed, 08 May 2024 06:33:39 GMT
- Fri, 17 May 2024 03:19:11 GMT
expires:
- '-1'
pragma:
Expand All @@ -41,7 +41,7 @@ interactions:
x-ms-ratelimit-remaining-subscription-deletes:
- '14999'
x-msedge-ref:
- 'Ref A: 14721096882D4A6E91B43F7F1338140E Ref B: MAA201060515017 Ref C: 2024-05-08T06:33:37Z'
- 'Ref A: C12AE808D53942E0A538081BAC7C0688 Ref B: MAA201060514053 Ref C: 2024-05-17T03:19:11Z'
x-powered-by:
- ASP.NET
status:
Expand Down Expand Up @@ -77,7 +77,7 @@ interactions:
content-type:
- application/json; charset=utf-8
date:
- Wed, 08 May 2024 06:33:41 GMT
- Fri, 17 May 2024 03:19:13 GMT
expires:
- '-1'
pragma:
Expand All @@ -91,7 +91,7 @@ interactions:
x-content-type-options:
- nosniff
x-msedge-ref:
- 'Ref A: 73A4BFBDAF8249DABDFBC1445BE4BB34 Ref B: MAA201060515029 Ref C: 2024-05-08T06:33:40Z'
- 'Ref A: E210093F1CA8405FB3680BD8F49E2631 Ref B: MAA201060516035 Ref C: 2024-05-17T03:19:13Z'
x-powered-by:
- ASP.NET
status:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
interactions:
- request:
body: null
headers:
Accept:
- application/json
Accept-Encoding:
- gzip, deflate
CommandName:
- apic api deployment list
Connection:
- keep-alive
ParameterSetName:
- -g -s --api-id --filter
User-Agent:
- AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.10.11 (Windows-10-10.0.22631-SP0)
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000004/deployments?$filter=name%20eq%20%27clitest000007%27&api-version=2024-03-01
response:
body:
string: '{"value":[{"type":"Microsoft.ApiCenter/services/workspaces/apis/deployments","properties":{"title":"test
deployment","environmentId":"/workspaces/default/environments/clitest000003","definitionId":"/workspaces/default/apis/clitest000004/versions/clitest000005/definitions/clitest000006","server":{"runtimeUri":["https://example.com"]},"customProperties":{},"recommended":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000004/deployments/clitest000007","name":"clitest000007","systemData":{"createdAt":"2024-05-17T02:54:50.9103478Z","lastModifiedAt":"2024-05-17T02:54:50.9103462Z"}}]}'
headers:
api-supported-versions:
- 2023-07-01-preview, 2024-03-01, 2024-03-15-preview
cache-control:
- no-cache
content-length:
- '712'
content-type:
- application/json; charset=utf-8
date:
- Fri, 17 May 2024 02:54:56 GMT
expires:
- '-1'
pragma:
- no-cache
strict-transport-security:
- max-age=31536000; includeSubDomains
vary:
- Accept-Encoding
x-cache:
- CONFIG_NOCACHE
x-content-type-options:
- nosniff
x-msedge-ref:
- 'Ref A: 565B79A7B2AE4F6197AFD32258D9C18D Ref B: MAA201060516047 Ref C: 2024-05-17T02:54:55Z'
x-powered-by:
- ASP.NET
status:
code: 200
message: OK
version: 1
Loading

0 comments on commit 6b37bcd

Please sign in to comment.