Skip to content

Commit

Permalink
change --store-connstr to --config-connstr to match webapp word (#23332)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChenTanyi authored Jul 26, 2022
1 parent 3e26929 commit 05bd04a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,9 @@ def add_vnet_block(context, target):

def add_connection_string_argument(context, source, target):
if source == RESOURCE.WebApp and target in TARGET_RESOURCES_CONNECTION_STRING:
context.argument('store_in_connection_string', options_list=['--store-connstr'],
context.argument('store_in_connection_string', options_list=['--config-connstr'],
arg_type=get_three_state_flag(), default=False, is_preview=True,
help='Store configuration into connection string, '
help='Store configuration into connection strings, '
'only could be used together with dotnet client_type')
else:
context.ignore('store_in_connection_string')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ def connection_create(cmd, client, # pylint: disable=too-many-locals disable=to
if client_type == CLIENT_TYPE.Dotnet.value:
client_type = CLIENT_TYPE.DotnetConnectionString.value
else:
logger.warning('client_type is not dotnet, ignore "--store-in-connection-string"')
logger.warning('client_type is not dotnet, ignore "--config-connstr"')

parameters = {
'target_service': {
Expand Down Expand Up @@ -325,7 +325,7 @@ def connection_update(cmd, client, # pylint: disable=too-many-locals
if client_type == CLIENT_TYPE.Dotnet.value:
client_type = CLIENT_TYPE.DotnetConnectionString.value
else:
logger.warning('client_type is not dotnet, ignore "--store-in-connection-string"')
logger.warning('client_type is not dotnet, ignore "--config-connstr"')

parameters = {
'target_service': linker.get('targetService'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -938,7 +938,7 @@ def test_webapp_sql_connection_string(self):

# create connection
self.cmd('webapp connection create sql --connection {} --source-id {} --target-id {} --secret name={} secret={} '
'--client-type dotnet --store-connstr'.format(name, source_id, target_id, user, password))
'--client-type dotnet --config-connstr'.format(name, source_id, target_id, user, password))

# list connection
connections = self.cmd(
Expand All @@ -952,7 +952,7 @@ def test_webapp_sql_connection_string(self):
connection_id = connections[0].get('id')

# update connection
self.cmd('webapp connection update sql --id {} --client-type dotnet --store-connstr '
self.cmd('webapp connection update sql --id {} --client-type dotnet --config-connstr '
'--secret name={} secret={}'.format(connection_id, user, password),
checks = [ self.check('clientType', 'dotnet-connectionString') ])

Expand Down

0 comments on commit 05bd04a

Please sign in to comment.