Skip to content

Commit

Permalink
fix test failure
Browse files Browse the repository at this point in the history
  • Loading branch information
ganga1980 committed Nov 4, 2024
1 parent 2af456d commit a3d8831
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5309,15 +5309,15 @@ def create_new_cluster_with_monitoring_aad_auth(self, resource_group, resource_g
create_cmd += f'--ampls-resource-id {ampls_resource_id} ' if use_ampls else ''
create_cmd += f'--enable-high-log-scale-mode ' if highlogscale_mode_enabled else ''

if enableOtherAddon:
# enable other addon such azure-policy to verify the monitoring addon and DCRs etc.. remainins intact.
self.cmd(f'aks enable-addons -a azure-policy -g={resource_group} -n={aks_name}')

response = self.cmd(create_cmd, checks=[
self.check('addonProfiles.omsagent.enabled', True),
self.check('addonProfiles.omsagent.config.useAADAuth', 'true')
]).get_output_in_json()

if enableOtherAddon:
# enable other addon such azure-policy to verify the monitoring addon and DCRs etc.. remainins intact.
self.cmd(f'aks enable-addons -a azure-policy -g={resource_group} -n={aks_name}')

cluster_resource_id = response["id"]
subscription = cluster_resource_id.split("/")[2]
workspace_resource_id = response["addonProfiles"]["omsagent"]["config"]["logAnalyticsWorkspaceResourceID"]
Expand Down

0 comments on commit a3d8831

Please sign in to comment.