fix(add-secret): SecretString can be None#5672
Merged
bblommers merged 2 commits intogetmoto:masterfrom Nov 18, 2022
Merged
Conversation
bblommers
requested changes
Nov 16, 2022
Collaborator
bblommers
left a comment
There was a problem hiding this comment.
Hi @jfagoagas, thanks for the PR! Would you mind adding a unit test for this?
af9f93b to
1183940
Compare
Contributor
Author
Sure, done! |
1183940 to
cf20a78
Compare
Codecov Report
@@ Coverage Diff @@
## master #5672 +/- ##
=======================================
Coverage 96.20% 96.20%
=======================================
Files 743 743
Lines 72740 72808 +68
=======================================
+ Hits 69977 70043 +66
- Misses 2763 2765 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Contributor
|
This is now part of moto >= 4.0.10.dev40 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
As per Boto3 documentation the
SecretStringcreate_secretAPI parameter is not required.So if you try to enable rotation in a previously created secret without a
SecretString, the motorotate_secretfails with aKeyErrordue to the inexistence ofold_secret_version["secret_string"]