Skip to content

Commit db304ed

Browse files
committed
revert
1 parent e5db703 commit db304ed

File tree

1 file changed

+26
-1
lines changed

1 file changed

+26
-1
lines changed

src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5685,7 +5685,32 @@ def test_aks_create_with_monitoring_legacy_auth(
56855685
dataCollectionRuleName = f"MSCI-{location}-{aks_name}"
56865686
dataCollectionRuleName = dataCollectionRuleName[0:64]
56875687
dcr_resource_id = f"/subscriptions/{subscription}/resourceGroups/{resource_group}/providers/Microsoft.Insights/dataCollectionRules/{dataCollectionRuleName}"
5688-
get_cmd = f"rest --method get --url https://***@AllowLargeResponse()
5688+
get_cmd = f"rest --method get --url https://management.azure.com{dcr_resource_id}?api-version=2022-06-01"
5689+
self.cmd(
5690+
get_cmd,
5691+
checks=[
5692+
self.check(
5693+
"properties.destinations.logAnalytics[0].workspaceResourceId",
5694+
f"{workspace_resource_id}",
5695+
)
5696+
],
5697+
)
5698+
5699+
assert False
5700+
except Exception:
5701+
# do nothing as this is expected
5702+
{}
5703+
5704+
# make sure monitoring can be smoothly disabled
5705+
self.cmd(f"aks disable-addons -a monitoring -g={resource_group} -n={aks_name}")
5706+
5707+
# delete
5708+
self.cmd(
5709+
f"aks delete -g {resource_group} -n {aks_name} --yes --no-wait",
5710+
checks=[self.is_empty()],
5711+
)
5712+
5713+
@AllowLargeResponse()
56895714
@AKSCustomResourceGroupPreparer(
56905715
random_name_length=17, name_prefix="clitest", location="westus2"
56915716
)

0 commit comments

Comments
 (0)