Allow Glacier VaultName to contain period (#3964)
This commit is contained in:
parent
6adb570c48
commit
3265e89fd3
@ -5,7 +5,7 @@ url_bases = ["https?://glacier.(.+).amazonaws.com"]
|
||||
|
||||
url_paths = {
|
||||
"{0}/(?P<account_number>.+)/vaults$": GlacierResponse.all_vault_response,
|
||||
"{0}/(?P<account_number>.+)/vaults/(?P<vault_name>[^/.]+)$": GlacierResponse.vault_response,
|
||||
"{0}/(?P<account_number>.+)/vaults/(?P<vault_name>[^/]+)$": GlacierResponse.vault_response,
|
||||
"{0}/(?P<account_number>.+)/vaults/(?P<vault_name>.+)/archives$": GlacierResponse.vault_archive_response,
|
||||
"{0}/(?P<account_number>.+)/vaults/(?P<vault_name>.+)/archives/(?P<archive_id>.+)$": GlacierResponse.vault_archive_individual_response,
|
||||
"{0}/(?P<account_number>.+)/vaults/(?P<vault_name>.+)/jobs$": GlacierResponse.vault_jobs_response,
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user