Skip to content

Commit 4351786

Browse files
author
Zhewei Hu
committed
chore: add test case 'test_aks_create_and_update_with_gateway_api_without_azureservicemesh'
1 parent 80154a3 commit 4351786

File tree

1 file changed

+62
-3
lines changed

1 file changed

+62
-3
lines changed

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

Lines changed: 62 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22541,6 +22541,68 @@ def test_aks_create_and_update_with_gateway_api_and_azureservicemesh(
2254122541
],
2254222542
)
2254322543

22544+
@AllowLargeResponse()
22545+
@AKSCustomResourceGroupPreparer(
22546+
random_name_length=17, name_prefix="clitest", location="centraluseuap"
22547+
)
22548+
def test_aks_create_and_update_with_gateway_api_without_azureservicemesh(
22549+
self, resource_group, resource_group_location
22550+
):
22551+
aks_name = self.create_random_name("cliakstest", 16)
22552+
_, create_version = self._get_versions(resource_group_location)
22553+
self.kwargs.update(
22554+
{
22555+
"resource_group": resource_group,
22556+
"name": aks_name,
22557+
"ssh_key_value": self.generate_ssh_keys(),
22558+
"k8s_version": create_version,
22559+
}
22560+
)
22561+
22562+
# Test successful creation with Gateway API enabled and without Azure Service Mesh addon
22563+
create_cmd = (
22564+
"aks create --resource-group={resource_group} --name={name} "
22565+
"--enable-gateway-api "
22566+
"--ssh-key-value={ssh_key_value} -o json "
22567+
"--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/ManagedGatewayAPIPreview "
22568+
)
22569+
self.cmd(
22570+
create_cmd,
22571+
checks=[
22572+
self.check("provisioningState", "Succeeded"),
22573+
self.check("serviceMeshProfile", None),
22574+
self.check("ingressProfile.gatewayApi.installation", "Standard"),
22575+
],
22576+
)
22577+
22578+
# Test disabling Gateway API
22579+
update_cmd = (
22580+
"aks update --resource-group={resource_group} --name={name} "
22581+
"--disable-gateway-api "
22582+
"--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/ManagedGatewayAPIPreview "
22583+
)
22584+
self.cmd(
22585+
update_cmd,
22586+
checks=[
22587+
self.check("provisioningState", "Succeeded"),
22588+
self.check("ingressProfile.gatewayApi.installation", "Disabled"),
22589+
],
22590+
)
22591+
22592+
# Test re-enabling Gateway API
22593+
update_cmd = (
22594+
"aks update --resource-group={resource_group} --name={name} "
22595+
"--enable-gateway-api "
22596+
"--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/ManagedGatewayAPIPreview "
22597+
)
22598+
self.cmd(
22599+
update_cmd,
22600+
checks=[
22601+
self.check("provisioningState", "Succeeded"),
22602+
self.check("ingressProfile.gatewayApi.installation", "Standard"),
22603+
],
22604+
)
22605+
2254422606
@AllowLargeResponse()
2254522607
@AKSCustomResourceGroupPreparer(
2254622608
random_name_length=17, name_prefix="clitest", location="westus2"
@@ -22701,9 +22763,6 @@ def test_aks_update_with_both_enable_and_disable_continuous_monitor(
2270122763
# TODO (indusridhar): Add tests for `test_aks_nodepool_get_rollback_versions` and `test_aks_nodepool_rollback`
2270222764
# after AKS RP Jan 2026 release is complete and recently_used_versions field is populated in upgrade profile API
2270322765

22704-
# TODO (zheweihu): add test `test_aks_create_and_update_with_gateway_api_without_azureservicemesh`
22705-
# once https://msazure.visualstudio.com/CloudNativeCompute/_git/aks-rp/pullrequest/14404771 is rolled out
22706-
2270722766
@AllowLargeResponse()
2270822767
@AKSCustomResourceGroupPreparer(
2270922768
random_name_length=17, name_prefix="clitest", location="centraluseuap"

0 commit comments

Comments
 (0)