Skip to content

Commit

Permalink
{AKS} Fix failed live test cases (#18310)
Browse files Browse the repository at this point in the history
* fix virtual network preparer

* remove outdated checks
  • Loading branch information
FumingZhang authored Jun 2, 2021
1 parent 8611f47 commit 476c43d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,12 @@ def create_resource(self, name, **kwargs):
}
if "ENV_JOB_NAME" in os.environ:
tags["job"] = os.environ["ENV_JOB_NAME"]
tags = " ".join(["{}={}".format(key, value) for key, value in tags.items()])
tags = " ".join(
["{}={}".format(key, value) for key, value in tags.items()]
)
template = (
"az network vnet create --resource-group {} --location {} --name {}"
"--subnet-name default --address-prefixes {} --tag " + tags
" --subnet-name default --address-prefixes {} --tag " + tags
)
self._update_address_prefixes(**kwargs)
self.live_only_execute(
Expand Down Expand Up @@ -129,4 +131,6 @@ def remove_resource(self, name, **kwargs):

def _update_address_prefixes(self, **kwargs):
if self.address_prefixes_parameter_name in kwargs:
self.address_prefixes = kwargs.get(self.address_prefixes_parameter_name)
self.address_prefixes = kwargs.get(
self.address_prefixes_parameter_name
)
Original file line number Diff line number Diff line change
Expand Up @@ -261,8 +261,7 @@ def test_aks_create_scale_with_custom_nodepool_name(self, resource_group, resour
self.check('agentPoolProfiles[0].osType', 'Linux'),
self.check('agentPoolProfiles[0].name', '{nodepool_name}'),
self.check('dnsPrefix', '{dns_name_prefix}'),
self.check('provisioningState', 'Succeeded'),
self.check('addonProfiles.KubeDashboard.enabled', False)
self.check('provisioningState', 'Succeeded')
])

# scale up
Expand Down Expand Up @@ -2695,8 +2694,7 @@ def test_aks_create_scale_with_custom_nodepool_name_msi(self, resource_group, re
self.check('agentPoolProfiles[0].osType', 'Linux'),
self.check('agentPoolProfiles[0].name', '{nodepool_name}'),
self.check('dnsPrefix', '{dns_name_prefix}'),
self.check('provisioningState', 'Succeeded'),
self.check('addonProfiles.KubeDashboard.enabled', False)
self.check('provisioningState', 'Succeeded')
])

# scale up
Expand Down

0 comments on commit 476c43d

Please sign in to comment.