Skip to content

Commit b652a47

Browse files
committed
update tests
1 parent 051507e commit b652a47

File tree

12 files changed

+13548
-1915
lines changed

12 files changed

+13548
-1915
lines changed

src/azure-cli/azure/cli/command_modules/containerapp/tests/latest/recordings/test_containerapp_get_customdomainverificationid_e2e.yaml

Lines changed: 2149 additions & 26 deletions
Large diffs are not rendered by default.

src/azure-cli/azure/cli/command_modules/monitor/aaz/latest/monitor/log_analytics/workspace/_failback.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,16 @@ def __call__(self, *args, **kwargs):
8484
return self.client.build_lro_polling(
8585
self.ctx.args.no_wait,
8686
session,
87-
None,
87+
self.on_200,
88+
self.on_error,
89+
lro_options={"final-state-via": "azure-async-operation"},
90+
path_format_arguments=self.url_parameters,
91+
)
92+
if session.http_response.status_code in [200]:
93+
return self.client.build_lro_polling(
94+
self.ctx.args.no_wait,
95+
session,
96+
self.on_200,
8897
self.on_error,
8998
lro_options={"final-state-via": "azure-async-operation"},
9099
path_format_arguments=self.url_parameters,
@@ -135,6 +144,9 @@ def query_parameters(self):
135144
}
136145
return parameters
137146

147+
def on_200(self, session):
148+
pass
149+
138150

139151
class _FailbackHelper:
140152
"""Helper class for Failback"""

src/azure-cli/azure/cli/command_modules/monitor/aaz/latest/monitor/log_analytics/workspace/_failover.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,16 @@ def __call__(self, *args, **kwargs):
9191
return self.client.build_lro_polling(
9292
self.ctx.args.no_wait,
9393
session,
94-
None,
94+
self.on_200,
95+
self.on_error,
96+
lro_options={"final-state-via": "azure-async-operation"},
97+
path_format_arguments=self.url_parameters,
98+
)
99+
if session.http_response.status_code in [200]:
100+
return self.client.build_lro_polling(
101+
self.ctx.args.no_wait,
102+
session,
103+
self.on_200,
95104
self.on_error,
96105
lro_options={"final-state-via": "azure-async-operation"},
97106
path_format_arguments=self.url_parameters,
@@ -146,6 +155,9 @@ def query_parameters(self):
146155
}
147156
return parameters
148157

158+
def on_200(self, session):
159+
pass
160+
149161

150162
class _FailoverHelper:
151163
"""Helper class for Failover"""

src/azure-cli/azure/cli/command_modules/monitor/tests/latest/recordings/test_monitor_log_analytics_workspace_data_collection_rules.yaml

Lines changed: 37 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -13,25 +13,26 @@ interactions:
1313
ParameterSetName:
1414
- -g -n --data-collection-rule
1515
User-Agent:
16-
- AZURECLI/2.59.0 azsdk-python-core/1.28.0 Python/3.10.11 (Windows-10-10.0.19045-SP0)
16+
- AZURECLI/2.72.0 azsdk-python-core/1.31.0 Python/3.11.9 (Windows-10-10.0.26100-SP0)
1717
method: GET
18-
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/tbtest/providers/Microsoft.OperationalInsights/workspaces/wsn1?api-version=2023-09-01
18+
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/tbtest/providers/Microsoft.OperationalInsights/workspaces/wsn1?api-version=2025-02-01
1919
response:
2020
body:
21-
string: '{"properties":{"customerId":"d8cd7529-0c44-4d52-ac05-79a617c0a2f4","provisioningState":"Succeeded","sku":{"name":"PerGB2018","lastSkuUpdate":"2024-04-16T06:13:02.4926861Z"},"retentionInDays":30,"features":{"legacy":0,"searchVersion":1,"enableLogAccessUsingOnlyResourcePermissions":true},"workspaceCapping":{"dailyQuotaGb":1.0,"quotaNextResetTime":"2024-04-16T13:00:00Z","dataIngestionStatus":"RespectQuota"},"publicNetworkAccessForIngestion":"Enabled","publicNetworkAccessForQuery":"Enabled","createdDate":"2024-04-16T06:13:02.4926861Z","modifiedDate":"2024-04-16T07:22:37.758097Z","defaultDataCollectionRuleResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tbtest/providers/Microsoft.Insights/dataCollectionRules/rule11"},"location":"westus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tbtest/providers/Microsoft.OperationalInsights/workspaces/wsn1","name":"wsn1","type":"Microsoft.OperationalInsights/workspaces","etag":"\"0601c95e-0000-0700-0000-661e273e0000\""}'
21+
string: '{"properties":{"customerId":"2e1a28c6-23b6-49d4-8efe-ea0d2e8ea0eb","provisioningState":"Succeeded","sku":{"name":"CapacityReservation","capacityReservationLevel":100,"lastSkuUpdate":"2025-05-08T11:12:13.8982941Z"},"retentionInDays":30,"features":{"legacy":0,"searchVersion":1,"enableLogAccessUsingOnlyResourcePermissions":true},"workspaceCapping":{"dailyQuotaGb":1.0,"quotaNextResetTime":"2025-05-08T18:00:00Z","dataIngestionStatus":"RespectQuota"},"publicNetworkAccessForIngestion":"Enabled","publicNetworkAccessForQuery":"Enabled","createdDate":"2025-05-08T11:12:13.8982941Z","modifiedDate":"2025-05-08T11:12:28.7123482Z"},"location":"westus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tbtest/providers/Microsoft.OperationalInsights/workspaces/wsn1","name":"wsn1","type":"Microsoft.OperationalInsights/workspaces","etag":"\"ed04f172-0000-0700-0000-681c919c0000\""}'
2222
headers:
2323
access-control-allow-origin:
2424
- '*'
2525
api-supported-versions:
26-
- 2015-03-20, 2020-08-01, 2020-10-01, 2021-06-01, 2022-10-01, 2023-09-01
26+
- 2015-03-20, 2020-08-01, 2020-10-01, 2021-06-01, 2022-10-01, 2023-09-01, 2025-02-01,
27+
2025-04-01
2728
cache-control:
2829
- no-cache
2930
content-length:
30-
- '1024'
31+
- '896'
3132
content-type:
3233
- application/json; charset=utf-8
3334
date:
34-
- Tue, 16 Apr 2024 08:17:30 GMT
35+
- Thu, 08 May 2025 11:13:31 GMT
3536
expires:
3637
- '-1'
3738
pragma:
@@ -44,17 +45,20 @@ interactions:
4445
- CONFIG_NOCACHE
4546
x-content-type-options:
4647
- nosniff
48+
x-ms-ratelimit-remaining-subscription-global-reads:
49+
- '3749'
4750
x-msedge-ref:
48-
- 'Ref A: E83E377EC76945CA880D8E3BA1235609 Ref B: MAA201060516019 Ref C: 2024-04-16T08:17:30Z'
51+
- 'Ref A: E985CB39224A4032B97ECDA834F4F1C4 Ref B: TYO201100115049 Ref C: 2025-05-08T11:13:31Z'
4952
status:
5053
code: 200
5154
message: OK
5255
- request:
53-
body: '{"etag": "\"0601c95e-0000-0700-0000-661e273e0000\"", "location": "westus",
56+
body: '{"etag": "\"ed04f172-0000-0700-0000-681c919c0000\"", "location": "westus",
5457
"properties": {"defaultDataCollectionRuleResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tbtest/providers/Microsoft.Insights/dataCollectionRules/rule11",
55-
"features": {"enableLogAccessUsingOnlyResourcePermissions": true}, "publicNetworkAccessForIngestion":
56-
"Enabled", "publicNetworkAccessForQuery": "Enabled", "retentionInDays": 30,
57-
"sku": {"name": "PerGB2018"}, "workspaceCapping": {"dailyQuotaGb": 1.0}}}'
58+
"features": {"legacy": 0, "searchVersion": 1, "enableLogAccessUsingOnlyResourcePermissions":
59+
true}, "publicNetworkAccessForIngestion": "Enabled", "publicNetworkAccessForQuery":
60+
"Enabled", "retentionInDays": 30, "sku": {"capacityReservationLevel": 100, "name":
61+
"CapacityReservation"}, "workspaceCapping": {"dailyQuotaGb": 1.0}}}'
5862
headers:
5963
Accept:
6064
- application/json
@@ -65,48 +69,55 @@ interactions:
6569
Connection:
6670
- keep-alive
6771
Content-Length:
68-
- '513'
72+
- '589'
6973
Content-Type:
7074
- application/json
7175
ParameterSetName:
7276
- -g -n --data-collection-rule
7377
User-Agent:
74-
- AZURECLI/2.59.0 azsdk-python-core/1.28.0 Python/3.10.11 (Windows-10-10.0.19045-SP0)
78+
- AZURECLI/2.72.0 azsdk-python-core/1.31.0 Python/3.11.9 (Windows-10-10.0.26100-SP0)
7579
method: PUT
76-
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/tbtest/providers/Microsoft.OperationalInsights/workspaces/wsn1?api-version=2023-09-01
80+
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/tbtest/providers/Microsoft.OperationalInsights/workspaces/wsn1?api-version=2025-02-01
7781
response:
7882
body:
79-
string: '{"properties":{"customerId":"d8cd7529-0c44-4d52-ac05-79a617c0a2f4","provisioningState":"Succeeded","sku":{"name":"PerGB2018","lastSkuUpdate":"2024-04-16T06:13:02.4926861Z"},"retentionInDays":30,"features":{"legacy":0,"searchVersion":1,"enableLogAccessUsingOnlyResourcePermissions":true},"workspaceCapping":{"dailyQuotaGb":1.0,"quotaNextResetTime":"2024-04-16T13:00:00Z","dataIngestionStatus":"RespectQuota"},"publicNetworkAccessForIngestion":"Enabled","publicNetworkAccessForQuery":"Enabled","createdDate":"2024-04-16T06:13:02.4926861Z","modifiedDate":"2024-04-16T08:17:32.048614Z","defaultDataCollectionRuleResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tbtest/providers/Microsoft.Insights/dataCollectionRules/rule11"},"location":"westus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tbtest/providers/Microsoft.OperationalInsights/workspaces/wsn1","name":"wsn1","type":"Microsoft.OperationalInsights/workspaces","etag":"\"0601fdf0-0000-0700-0000-661e341c0000\""}'
83+
string: '{"error":{"code":"DataCollectionRuleDestinationIsInvalid","message":"This
84+
workspace is missing from data collection rule /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tbtest/providers/Microsoft.Insights/dataCollectionRules/rule11
85+
destination list. Operation Id: ''2b6b23e739faf41777533a319057453e''"}}'
8086
headers:
8187
access-control-allow-origin:
8288
- '*'
8389
api-supported-versions:
84-
- 2015-03-20, 2020-08-01, 2020-10-01, 2021-06-01, 2022-10-01, 2023-09-01
90+
- 2015-03-20, 2020-08-01, 2020-10-01, 2021-06-01, 2022-10-01, 2023-09-01, 2025-02-01,
91+
2025-04-01
8592
cache-control:
86-
- no-cache
93+
- no-store, no-cache
8794
content-length:
88-
- '1024'
95+
- '320'
8996
content-type:
90-
- application/json; charset=utf-8
97+
- application/json
9198
date:
92-
- Tue, 16 Apr 2024 08:17:32 GMT
99+
- Thu, 08 May 2025 11:13:32 GMT
100+
diagnostic-context:
101+
- 2b6b23e739faf41777533a319057453e
93102
expires:
94103
- '-1'
95104
pragma:
96105
- no-cache
97-
request-context:
98-
- appId=cid-v1:e6336c63-aab2-45f0-996a-e5dbab2a1508
99106
strict-transport-security:
100107
- max-age=31536000; includeSubDomains
101108
x-cache:
102109
- CONFIG_NOCACHE
103110
x-content-type-options:
104111
- nosniff
112+
x-ms-operation-identifier:
113+
- tenantId=54826b22-38d6-4fb2-bad9-b7b93a3e9c5a,objectId=cded80ac-7840-4070-a783-db73a7c3ee4c/japaneast/589a3d59-7c87-414b-81c9-fa8af7803e17
114+
x-ms-ratelimit-remaining-subscription-global-writes:
115+
- '2999'
105116
x-ms-ratelimit-remaining-subscription-writes:
106-
- '1199'
117+
- '199'
107118
x-msedge-ref:
108-
- 'Ref A: 37B808574EF042989D83DA5698810D22 Ref B: MAA201060516019 Ref C: 2024-04-16T08:17:31Z'
119+
- 'Ref A: 0DA8556A7EDA46CC8784A00853225CC7 Ref B: TYO201100115049 Ref C: 2025-05-08T11:13:32Z'
109120
status:
110-
code: 200
111-
message: OK
121+
code: 400
122+
message: Bad Request
112123
version: 1

src/azure-cli/azure/cli/command_modules/monitor/tests/latest/test_monitor_log_analytics_cluster.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ def test_monitor_log_analytics_cluster_default(self, rg1):
5959
])
6060

6161
@record_only()
62+
@unittest.skip('resource not available')
6263
def test_monitor_log_analytics_cluster_update_key(self):
6364
new_key_name = 'log-analytics-cluster'
6465
new_key_version = '5f37dcb0f24642c3ab800ab845acde4f'

src/azure-cli/azure/cli/command_modules/monitor/tests/latest/test_monitor_log_analytics_workspace.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@ def test_monitor_log_analytics_workspace_data_export(self, resource_group, accou
532532
self.check('length(@)', 0)
533533
])
534534

535-
@record_only()
535+
# @record_only()
536536
def test_monitor_log_analytics_workspace_data_collection_rules(self):
537537
self.kwargs.update({
538538
'ws_name': 'wsn1',

0 commit comments

Comments
 (0)