Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
Netyyyy committed Jul 2, 2024
1 parent da691cd commit c010023
Show file tree
Hide file tree
Showing 5 changed files with 173 additions and 125 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ interactions:
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.AppPlatform/Spring/clitest000002?api-version=2024-05-01-preview
response:
body:
string: '{"properties":{"provisioningState":"Succeeded","zoneRedundant":false,"version":3,"serviceId":"8d4afadc536241c398ed2002ea35289c","networkProfile":{"outboundIPs":{"publicIPs":["20.162.176.193","4.158.38.222"]},"outboundType":"loadBalancer"},"powerState":"Running","fqdn":"clitest000002.azuremicroservices.io","marketplaceResource":{"plan":"asa-ent-hr-mtr","publisher":"vmware-inc","product":"azure-spring-cloud-vmware-tanzu-2"}},"type":"Microsoft.AppPlatform/Spring","sku":{"name":"E0","tier":"Enterprise"},"location":"uksouth","tags":null,"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.AppPlatform/Spring/clitest000002","name":"clitest000002","systemData":{"createdBy":"[email protected]","createdByType":"User","createdAt":"2024-06-19T02:34:24.2348658Z","lastModifiedBy":"[email protected]","lastModifiedByType":"User","lastModifiedAt":"2024-06-19T02:34:24.2348658Z"}}'
string: '{"properties":{"provisioningState":"Succeeded","zoneRedundant":false,"version":3,"serviceId":"9b9e547a4196418d96427d7fe1421e91","networkProfile":{"outboundIPs":{"publicIPs":["20.162.177.38","20.254.82.240"]},"outboundType":"loadBalancer"},"powerState":"Running","fqdn":"clitest000002.azuremicroservices.io","marketplaceResource":{"plan":"asa-ent-hr-mtr","publisher":"vmware-inc","product":"azure-spring-cloud-vmware-tanzu-2"}},"type":"Microsoft.AppPlatform/Spring","sku":{"name":"E0","tier":"Enterprise"},"location":"uksouth","tags":null,"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.AppPlatform/Spring/clitest000002","name":"clitest000002","systemData":{"createdBy":"[email protected]","createdByType":"User","createdAt":"2024-06-19T04:54:54.0896323Z","lastModifiedBy":"[email protected]","lastModifiedByType":"User","lastModifiedAt":"2024-06-19T04:54:54.0896323Z"}}'
headers:
cache-control:
- no-cache
Expand All @@ -27,7 +27,7 @@ interactions:
content-type:
- application/json
date:
- Wed, 19 Jun 2024 02:40:44 GMT
- Wed, 19 Jun 2024 05:01:38 GMT
expires:
- '-1'
pragma:
Expand All @@ -43,7 +43,7 @@ interactions:
x-ms-ratelimit-remaining-subscription-resource-requests:
- '11999'
x-msedge-ref:
- 'Ref A: 43CD1A2F78C74292BF93E59889660351 Ref B: TYO201100113037 Ref C: 2024-06-19T02:40:43Z'
- 'Ref A: 4CA6CB34EF2D4906A7F467EED45E16F4 Ref B: TYO201151006034 Ref C: 2024-06-19T05:01:37Z'
x-rp-server-mvid:
- 16f8ed7c-99fe-42f5-98dc-7ba9e82d32d1
status:
Expand Down Expand Up @@ -77,7 +77,7 @@ interactions:
content-type:
- application/json
date:
- Wed, 19 Jun 2024 02:40:45 GMT
- Wed, 19 Jun 2024 05:01:40 GMT
expires:
- '-1'
pragma:
Expand All @@ -91,7 +91,7 @@ interactions:
x-content-type-options:
- nosniff
x-msedge-ref:
- 'Ref A: 22E1B558AB9C48F49AD48367F977FAF4 Ref B: TYO201100116039 Ref C: 2024-06-19T02:40:45Z'
- 'Ref A: 58002E6001B742868F4DD3B1F661E7BA Ref B: TYO201151004034 Ref C: 2024-06-19T05:01:39Z'
x-rp-server-mvid:
- 16f8ed7c-99fe-42f5-98dc-7ba9e82d32d1
status:
Expand Down Expand Up @@ -122,7 +122,7 @@ interactions:
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.AppPlatform/Spring/clitest000002/jobs/myjob?api-version=2024-05-01-preview
response:
body:
string: '{"properties":{"provisioningState":"Succeeded","triggerConfig":{"triggerType":"Manual"},"template":{"environmentVariables":[],"resourceRequests":{"cpu":"1","memory":"2Gi"}},"managedComponentReferences":[]},"type":"Microsoft.AppPlatform/Spring/jobs","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.AppPlatform/Spring/clitest000002/jobs/myjob","name":"myjob","systemData":{"createdBy":"[email protected]","createdByType":"User","createdAt":"2024-06-19T02:40:48.2574098Z","lastModifiedBy":"[email protected]","lastModifiedByType":"User","lastModifiedAt":"2024-06-19T02:40:48.2574098Z"}}'
string: '{"properties":{"provisioningState":"Succeeded","triggerConfig":{"triggerType":"Manual"},"template":{"environmentVariables":[],"resourceRequests":{"cpu":"1","memory":"2Gi"}},"managedComponentReferences":[]},"type":"Microsoft.AppPlatform/Spring/jobs","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.AppPlatform/Spring/clitest000002/jobs/myjob","name":"myjob","systemData":{"createdBy":"[email protected]","createdByType":"User","createdAt":"2024-06-19T05:01:42.0072873Z","lastModifiedBy":"[email protected]","lastModifiedByType":"User","lastModifiedAt":"2024-06-19T05:01:42.0072873Z"}}'
headers:
cache-control:
- no-cache
Expand All @@ -131,7 +131,7 @@ interactions:
content-type:
- application/json
date:
- Wed, 19 Jun 2024 02:40:49 GMT
- Wed, 19 Jun 2024 05:01:43 GMT
expires:
- '-1'
pragma:
Expand All @@ -145,9 +145,9 @@ interactions:
x-content-type-options:
- nosniff
x-ms-ratelimit-remaining-subscription-writes:
- '1198'
- '1199'
x-msedge-ref:
- 'Ref A: C0766283383B4DE7AFA882271D40E615 Ref B: TYO201100114011 Ref C: 2024-06-19T02:40:47Z'
- 'Ref A: 7DE6AE5D3AED45DB9D3EBB3A8D500705 Ref B: TYO201100115025 Ref C: 2024-06-19T05:01:41Z'
x-rp-server-mvid:
- 16f8ed7c-99fe-42f5-98dc-7ba9e82d32d1
status:
Expand All @@ -172,7 +172,7 @@ interactions:
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.AppPlatform/Spring/clitest000002/jobs/myjob?api-version=2024-05-01-preview
response:
body:
string: '{"properties":{"provisioningState":"Succeeded","triggerConfig":{"triggerType":"Manual"},"template":{"environmentVariables":[],"resourceRequests":{"cpu":"1","memory":"2Gi"}},"managedComponentReferences":[]},"type":"Microsoft.AppPlatform/Spring/jobs","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.AppPlatform/Spring/clitest000002/jobs/myjob","name":"myjob","systemData":{"createdBy":"[email protected]","createdByType":"User","createdAt":"2024-06-19T02:40:48.2574098Z","lastModifiedBy":"[email protected]","lastModifiedByType":"User","lastModifiedAt":"2024-06-19T02:40:48.2574098Z"}}'
string: '{"properties":{"provisioningState":"Succeeded","triggerConfig":{"triggerType":"Manual"},"template":{"environmentVariables":[],"resourceRequests":{"cpu":"1","memory":"2Gi"}},"managedComponentReferences":[]},"type":"Microsoft.AppPlatform/Spring/jobs","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.AppPlatform/Spring/clitest000002/jobs/myjob","name":"myjob","systemData":{"createdBy":"[email protected]","createdByType":"User","createdAt":"2024-06-19T05:01:42.0072873Z","lastModifiedBy":"[email protected]","lastModifiedByType":"User","lastModifiedAt":"2024-06-19T05:01:42.0072873Z"}}'
headers:
cache-control:
- no-cache
Expand All @@ -181,7 +181,7 @@ interactions:
content-type:
- application/json
date:
- Wed, 19 Jun 2024 02:40:51 GMT
- Wed, 19 Jun 2024 05:01:45 GMT
expires:
- '-1'
pragma:
Expand All @@ -195,7 +195,7 @@ interactions:
x-content-type-options:
- nosniff
x-msedge-ref:
- 'Ref A: 92F2E316BF284AE39A8E769014D7823D Ref B: TYO201100116025 Ref C: 2024-06-19T02:40:50Z'
- 'Ref A: 8121A5E1437D4652AAB3271D1AB24773 Ref B: TYO201151005060 Ref C: 2024-06-19T05:01:44Z'
x-rp-server-mvid:
- 16f8ed7c-99fe-42f5-98dc-7ba9e82d32d1
status:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@ def test_asa_job_deploy(self, resource_group, spring):
])

# deploy unexist file, the fail is expected
with self.assertRaisesRegexp(CLIError, "artifact path does not exist."):
with self.assertRaisesRegexp(CLIError, "artifact path {} does not exist.".format(file_path)):
self.cmd('spring job deploy -n {job} -g {rg} -s {serviceName} --artifact-path {file}')
Loading

0 comments on commit c010023

Please sign in to comment.