Moto-1781: Create initial stub of rotate_secret and tests.

This commit is contained in:
Neil Roberts 2018-08-15 10:52:30 -07:00
commit 69a78ba7c9
2 changed files with 31 additions and 0 deletions

View file

@ -179,3 +179,19 @@ def test_describe_secret_that_does_not_match():
with assert_raises(ClientError):
result = conn.get_secret_value(SecretId='i-dont-match')
@mock_secretsmanager
def test_rotate_secret_that_does_not_exist():
conn = boto3.client('secretsmanager', 'us-west-2')
with assert_raises(ClientError):
result = conn.rotate_secret(SecretId='i-dont-exist')
@mock_secretsmanager
def test_rotate_secret_that_does_not_match():
conn = boto3.client('secretsmanager', region_name='us-west-2')
conn.create_secret(Name='test-secret',
SecretString='foosecret')
with assert_raises(ClientError):
result = conn.rotate_secret(SecretId='i-dont-match')