Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,15 @@


class FunctionAppAccessRestrictionScenarioTest(ScenarioTest):
@unittest.skip('Recorded runtime reached end-of-life on 2026-11-10; update runtime and re-record.')
@ResourceGroupPreparer(parameter_name_for_location='location', location=WINDOWS_ASP_LOCATION_WEBAPP)
@StorageAccountPreparer(location=WINDOWS_ASP_LOCATION_WEBAPP)
@StorageAccountPreparer(location=WINDOWS_ASP_LOCATION_WEBAPP, kind='StorageV2')
def test_functionapp_access_restriction_show(self, resource_group, location):
self.kwargs.update({
'app_name': self.create_random_name(prefix='cli-funcapp-nwr', length=24),
'loc': location
})

self.cmd('functionapp create -g {rg} -n {app_name} --consumption-plan-location {loc} -s {sa} --functions-version 4', checks=[
self.cmd('functionapp create -g {rg} -n {app_name} --consumption-plan-location {loc} -s {sa} --functions-version 4 --runtime dotnet-isolated --runtime-version 10', checks=[
JMESPathCheck('state', 'Running')
])

Expand All @@ -50,16 +49,15 @@ def test_functionapp_access_restriction_show(self, resource_group, location):
JMESPathCheck('scmIpSecurityRestrictionsDefaultAction', None)
])

@unittest.skip('Recorded runtime reached end-of-life on 2026-11-10; update runtime and re-record.')
@ResourceGroupPreparer(parameter_name_for_location='location', location=WINDOWS_ASP_LOCATION_WEBAPP)
@StorageAccountPreparer(location=WINDOWS_ASP_LOCATION_WEBAPP)
@StorageAccountPreparer(location=WINDOWS_ASP_LOCATION_WEBAPP, kind='StorageV2')
def test_functionapp_access_restriction_set_simple(self, resource_group, location):
self.kwargs.update({
'app_name': self.create_random_name(prefix='cli-funcapp-nwr', length=24),
'loc': location
})

self.cmd('functionapp create -g {rg} -n {app_name} --consumption-plan-location {loc} -s {sa} --functions-version 4', checks=[
self.cmd('functionapp create -g {rg} -n {app_name} --consumption-plan-location {loc} -s {sa} --functions-version 4 --runtime dotnet-isolated --runtime-version 10', checks=[
JMESPathCheck('state', 'Running')
])

Expand All @@ -69,7 +67,7 @@ def test_functionapp_access_restriction_set_simple(self, resource_group, locatio

self.cmd('functionapp config access-restriction set -g {rg} -n {app_name} --default-action Deny', checks=[
JMESPathCheck('ipSecurityRestrictionsDefaultAction', 'Deny'),
JMESPathCheck('scmIpSecurityRestrictionsDefaultAction', None)
JMESPathCheck('scmIpSecurityRestrictionsDefaultAction', 'Deny')
])

self.cmd('functionapp config access-restriction set -g {rg} -n {app_name} --default-action Allow --scm-default-action Deny', checks=[
Expand All @@ -82,16 +80,15 @@ def test_functionapp_access_restriction_set_simple(self, resource_group, locatio
JMESPathCheck('scmIpSecurityRestrictionsDefaultAction', 'Deny')
])

@unittest.skip('Recorded runtime reached end-of-life on 2026-11-10; update runtime and re-record.')
@ResourceGroupPreparer(parameter_name_for_location='location', location=WINDOWS_ASP_LOCATION_WEBAPP)
@StorageAccountPreparer(location=WINDOWS_ASP_LOCATION_WEBAPP)
@StorageAccountPreparer(location=WINDOWS_ASP_LOCATION_WEBAPP, kind='StorageV2')
def test_functionapp_access_restriction_set_complex(self, resource_group, location):
self.kwargs.update({
'app_name': self.create_random_name(prefix='cli-funcapp-nwr', length=24),
'loc': location
})

self.cmd('functionapp create -g {rg} -n {app_name} --consumption-plan-location {loc} -s {sa} --functions-version 4', checks=[
self.cmd('functionapp create -g {rg} -n {app_name} --consumption-plan-location {loc} -s {sa} --functions-version 4 --runtime dotnet-isolated --runtime-version 10', checks=[
JMESPathCheck('state', 'Running')
])

Expand All @@ -103,17 +100,16 @@ def test_functionapp_access_restriction_set_complex(self, resource_group, locati
JMESPathCheck('scmIpSecurityRestrictionsUseMain', False)
])

@unittest.skip('Recorded runtime reached end-of-life on 2026-11-10; update runtime and re-record.')
@ResourceGroupPreparer(random_name_length=17, parameter_name_for_location='location', location=WINDOWS_ASP_LOCATION_WEBAPP)
# random_name_length is temporary until the bug fix in the API is deployed successfully & then should be removed.
@StorageAccountPreparer(location=WINDOWS_ASP_LOCATION_WEBAPP)
@StorageAccountPreparer(location=WINDOWS_ASP_LOCATION_WEBAPP, kind='StorageV2')
def test_functionapp_access_restriction_add(self, resource_group, location):
self.kwargs.update({
'app_name': self.create_random_name(prefix='cli-funcapp-nwr', length=24),
'loc': location
})

self.cmd('functionapp create -g {rg} -n {app_name} --consumption-plan-location {loc} -s {sa} --functions-version 4', checks=[
self.cmd('functionapp create -g {rg} -n {app_name} --consumption-plan-location {loc} -s {sa} --functions-version 4 --runtime dotnet-isolated --runtime-version 10', checks=[
JMESPathCheck('state', 'Running')
])

Expand All @@ -125,16 +121,15 @@ def test_functionapp_access_restriction_add(self, resource_group, location):
JMESPathCheck('[1].action', 'Deny')
])

@unittest.skip('Recorded runtime reached end-of-life on 2026-11-10; update runtime and re-record.')
@ResourceGroupPreparer(parameter_name_for_location='location', location=WINDOWS_ASP_LOCATION_WEBAPP)
@StorageAccountPreparer(location=WINDOWS_ASP_LOCATION_WEBAPP)
@StorageAccountPreparer(location=WINDOWS_ASP_LOCATION_WEBAPP, kind='StorageV2')
def test_functionapp_access_restriction_add_ip_address_validation(self, resource_group, location):
self.kwargs.update({
'app_name': self.create_random_name(prefix='cli-funcapp-nwr', length=24),
'loc': location
})

self.cmd('functionapp create -g {rg} -n {app_name} --consumption-plan-location {loc} -s {sa} --functions-version 4', checks=[
self.cmd('functionapp create -g {rg} -n {app_name} --consumption-plan-location {loc} -s {sa} --functions-version 4 --runtime dotnet-isolated --runtime-version 10', checks=[
JMESPathCheck('state', 'Running')
])

Expand Down Expand Up @@ -181,16 +176,15 @@ def test_functionapp_access_restriction_add_service_endpoint(self, resource_grou
JMESPathCheck('[1].action', 'Deny')
])

@unittest.skip('Recorded runtime reached end-of-life on 2026-11-10; update runtime and re-record.')
@ResourceGroupPreparer(parameter_name_for_location='location', location=WINDOWS_ASP_LOCATION_WEBAPP)
@StorageAccountPreparer(location=WINDOWS_ASP_LOCATION_WEBAPP)
@StorageAccountPreparer(location=WINDOWS_ASP_LOCATION_WEBAPP, kind='StorageV2')
def test_functionapp_access_restriction_remove(self, resource_group, location):
self.kwargs.update({
'app_name': self.create_random_name(prefix='cli-funcapp-nwr', length=24),
'loc': location
})

self.cmd('functionapp create -g {rg} -n {app_name} --consumption-plan-location {loc} -s {sa} --functions-version 4', checks=[
self.cmd('functionapp create -g {rg} -n {app_name} --consumption-plan-location {loc} -s {sa} --functions-version 4 --runtime dotnet-isolated --runtime-version 10', checks=[
JMESPathCheck('state', 'Running')
])

Expand All @@ -208,16 +202,15 @@ def test_functionapp_access_restriction_remove(self, resource_group, location):
JMESPathCheck('[0].action', 'Allow')
])

@unittest.skip('Recorded runtime reached end-of-life on 2026-11-10; update runtime and re-record.')
@ResourceGroupPreparer(parameter_name_for_location='location', location=WINDOWS_ASP_LOCATION_WEBAPP)
@StorageAccountPreparer(location=WINDOWS_ASP_LOCATION_WEBAPP)
@StorageAccountPreparer(location=WINDOWS_ASP_LOCATION_WEBAPP, kind='StorageV2')
def test_functionapp_access_restriction_add_scm(self, resource_group, location):
self.kwargs.update({
'app_name': self.create_random_name(prefix='cli-funcapp-nwr', length=24),
'loc': location
})

self.cmd('functionapp create -g {rg} -n {app_name} --consumption-plan-location {loc} -s {sa} --functions-version 4', checks=[
self.cmd('functionapp create -g {rg} -n {app_name} --consumption-plan-location {loc} -s {sa} --functions-version 4 --runtime dotnet-isolated --runtime-version 10', checks=[
JMESPathCheck('state', 'Running')
])

Expand All @@ -229,16 +222,15 @@ def test_functionapp_access_restriction_add_scm(self, resource_group, location):
JMESPathCheck('[1].action', 'Deny')
])

@unittest.skip('Recorded runtime reached end-of-life on 2026-11-10; update runtime and re-record.')
@ResourceGroupPreparer(parameter_name_for_location='location', location=WINDOWS_ASP_LOCATION_WEBAPP)
@StorageAccountPreparer(location=WINDOWS_ASP_LOCATION_WEBAPP)
@StorageAccountPreparer(location=WINDOWS_ASP_LOCATION_WEBAPP, kind='StorageV2')
def test_functionapp_access_restriction_remove_scm(self, resource_group, location):
self.kwargs.update({
'app_name': self.create_random_name(prefix='cli-funcapp-nwr', length=24),
'loc': location
})

self.cmd('functionapp create -g {rg} -n {app_name} --consumption-plan-location {loc} -s {sa} --functions-version 4', checks=[
self.cmd('functionapp create -g {rg} -n {app_name} --consumption-plan-location {loc} -s {sa} --functions-version 4 --runtime dotnet-isolated --runtime-version 10', checks=[
JMESPathCheck('state', 'Running')
])

Expand Down
Loading
Loading