Skip to content

Commit aca6de4

Browse files
authored
[Storage] Fix Azure#16979: az storage container create fails when providing storage container metadata (Azure#17202)
* add rdbms code owner * validate metadata * tests * test record
1 parent 5b95a87 commit aca6de4

File tree

3 files changed

+50
-46
lines changed

3 files changed

+50
-46
lines changed

src/azure-cli/azure/cli/command_modules/storage/_validators.py

+1
Original file line numberDiff line numberDiff line change
@@ -1368,6 +1368,7 @@ def validate_client_auth_parameter(cmd, ns):
13681368
"when creating container.")
13691369
else:
13701370
validate_client_parameters(cmd, ns)
1371+
validate_metadata(ns)
13711372

13721373

13731374
def validate_encryption_scope_client_params(ns):

src/azure-cli/azure/cli/command_modules/storage/tests/latest/recordings/test_legal_hold.yaml

+48-45
Large diffs are not rendered by default.

src/azure-cli/azure/cli/command_modules/storage/tests/latest/test_storage_container_legal_hold.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def test_legal_hold(self, resource_group):
1515
self.cmd('storage account create -g {} -n {} --kind StorageV2'.format(
1616
resource_group, storage_account))
1717
container_name = 'container1'
18-
self.cmd('storage container create --account-name {} -n {}'.format(storage_account, container_name))
18+
self.cmd('storage container create --account-name {} -n {} --metadata k1=v1 k2=v2'.format(storage_account, container_name))
1919

2020
self.cmd('storage container legal-hold show --account-name {} -c {} -g {}'.format(
2121
storage_account, container_name, resource_group), checks=[

0 commit comments

Comments
 (0)