Skip to content

Commit

Permalink
Create file share only when storage acct network restricted, and run …
Browse files Browse the repository at this point in the history
…tests in live mode
  • Loading branch information
kamperiadis committed Jan 22, 2025
1 parent f3384cf commit 9156908
Show file tree
Hide file tree
Showing 19 changed files with 2,885 additions and 7,050 deletions.
3 changes: 2 additions & 1 deletion src/azure-cli/azure/cli/command_modules/appservice/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -5158,7 +5158,8 @@ def create_functionapp(cmd, resource_group_name, name, storage_account, plan=Non
value=con_string))
content_share_name = _get_content_share_name(name)
site_config.app_settings.append(NameValuePair(name='WEBSITE_CONTENTSHARE', value=content_share_name))
create_file_share(cmd.cli_ctx, resource_group_name, storage_account, content_share_name)
if is_storage_account_network_restricted(cmd.cli_ctx, resource_group_name, storage_account):
create_file_share(cmd.cli_ctx, resource_group_name, storage_account, content_share_name)

create_app_insights = False

Expand Down

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.

This file was deleted.

This file was deleted.

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 @@ -2822,6 +2822,7 @@ def test_functionapp_elastic_premium_restricted_public_network_access_storage_mu
with self.assertRaises(ValidationError):
self.cmd('functionapp create -g {} -n {} -s {} -p {} --functions-version 4 --vnet {} --subnet {} --configure-networking-later'.format(resource_group, functionapp_name, storage_account, ep_plan_name, vnet_name, subnet_name))

@live_only()
@ResourceGroupPreparer(location=WINDOWS_ASP_LOCATION_FUNCTIONAPP)
def test_functionapp_elastic_premium_restricted_public_network_access_storage_vnet(self, resource_group):
functionapp_name = self.create_random_name('functionapp', 24)
Expand All @@ -2843,6 +2844,7 @@ def test_functionapp_elastic_premium_restricted_public_network_access_storage_vn
JMESPathCheck('virtualNetworkSubnetId', subnet_id)
])

@live_only()
@ResourceGroupPreparer(location=WINDOWS_ASP_LOCATION_FUNCTIONAPP)
def test_functionapp_elastic_premium_restricted_public_network_access_storage_configure_vnet_later(self, resource_group):
functionapp_name = self.create_random_name('functionapp', 24)
Expand Down

0 comments on commit 9156908

Please sign in to comment.