Skip to content

Commit c776401

Browse files
Added test for restore-defaults
1 parent ded2bbe commit c776401

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

src/containerapp/azext_containerapp/tests/latest/test_containerapp_commands.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -684,6 +684,24 @@ def test_containerapp_env_ingress_commands(self, resource_group):
684684
JMESPathCheck('properties.ingressConfiguration.headerCountLimit', 40),
685685
])
686686

687+
self.cmd('containerapp env ingress restore-defaults --environment {} -g {}'.format(env_name, resource_group), checks=[
688+
JMESPathCheck('properties.ingressConfiguration.workloadProfileName', 'Consumption'),
689+
JMESPathCheck('properties.ingressConfiguration.minReplicas', 2),
690+
JMESPathCheck('properties.ingressConfiguration.maxReplicas', 10),
691+
JMESPathCheck('properties.ingressConfiguration.terminationGracePeriod', 8),
692+
JMESPathCheck('properties.ingressConfiguration.requestIdleTimeout', 4),
693+
JMESPathCheck('properties.ingressConfiguration.headerCountLimit', 100),
694+
])
695+
696+
self.cmd('containerapp env ingress show --environment {} -g {}'.format(env_name, resource_group), checks=[
697+
JMESPathCheck('properties.ingressConfiguration.workloadProfileName', 'Consumption'),
698+
JMESPathCheck('properties.ingressConfiguration.minReplicas', 2),
699+
JMESPathCheck('properties.ingressConfiguration.maxReplicas', 10),
700+
JMESPathCheck('properties.ingressConfiguration.terminationGracePeriod', 480),
701+
JMESPathCheck('properties.ingressConfiguration.requestIdleTimeout', 240),
702+
JMESPathCheck('properties.ingressConfiguration.headerCountLimit', 100),
703+
])
704+
687705
# Clean up
688706
self.cmd(f'containerapp env delete -g {resource_group} -n {env_name} --yes')
689707

0 commit comments

Comments
 (0)