Allow Glacier VaultName to contain period (#3964)

This commit is contained in:
Brian Pandola 2021-05-27 00:44:20 -07:00 committed by GitHub
commit 3265e89fd3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 2 deletions

View file

@ -1,9 +1,10 @@
from __future__ import unicode_literals
import boto.glacier
import boto3
import sure # noqa
from moto import mock_glacier_deprecated
from moto import mock_glacier_deprecated, mock_glacier
@mock_glacier_deprecated
@ -29,3 +30,11 @@ def test_delete_vault():
conn.delete_vault("my_vault")
vaults = conn.list_vaults()
vaults.should.have.length_of(0)
@mock_glacier
def test_vault_name_with_special_characters():
vault_name = "Vault.name-with_Special.characters"
glacier = boto3.resource("glacier", region_name="us-west-2")
vault = glacier.create_vault(accountId="-", vaultName=vault_name)
vault.name.should.equal(vault_name)