Fix issue with wrong parameter signed to secret_binary during secret rotation in Secrets Manager (#3348)
* fix issue with wrong parameter signed to secret_binary * reformat test
This commit is contained in:
parent
a65c0f004c
commit
c1a7f29c62
@ -408,8 +408,8 @@ class SecretsManagerBackend(BaseBackend):
|
||||
self._add_secret(
|
||||
secret_id,
|
||||
old_secret_version["secret_string"],
|
||||
secret.description,
|
||||
secret.tags,
|
||||
description=secret.description,
|
||||
tags=secret.tags,
|
||||
version_id=new_version_id,
|
||||
version_stages=["AWSCURRENT"],
|
||||
)
|
||||
|
@ -502,7 +502,9 @@ def test_restore_secret_that_does_not_exist():
|
||||
@mock_secretsmanager
|
||||
def test_rotate_secret():
|
||||
conn = boto3.client("secretsmanager", region_name="us-west-2")
|
||||
conn.create_secret(Name=DEFAULT_SECRET_NAME, SecretString="foosecret")
|
||||
conn.create_secret(
|
||||
Name=DEFAULT_SECRET_NAME, SecretString="foosecret", Description="foodescription"
|
||||
)
|
||||
|
||||
rotated_secret = conn.rotate_secret(SecretId=DEFAULT_SECRET_NAME)
|
||||
|
||||
@ -511,6 +513,10 @@ def test_rotate_secret():
|
||||
assert rotated_secret["Name"] == DEFAULT_SECRET_NAME
|
||||
assert rotated_secret["VersionId"] != ""
|
||||
|
||||
describe_secret = conn.describe_secret(SecretId=DEFAULT_SECRET_NAME)
|
||||
|
||||
assert describe_secret["Description"] == "foodescription"
|
||||
|
||||
|
||||
@mock_secretsmanager
|
||||
def test_rotate_secret_enable_rotation():
|
||||
|
Loading…
Reference in New Issue
Block a user