File tree Expand file tree Collapse file tree 1 file changed +26
-1
lines changed
src/aks-preview/azext_aks_preview/tests/latest Expand file tree Collapse file tree 1 file changed +26
-1
lines changed Original file line number Diff line number Diff 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 )
You can’t perform that action at this time.
0 commit comments